| aMulti_Kill | Index |
Definition:
Parameters:
| procID | - | The ID of the process that is to be terminated. |
Return Value:
Description:
This routine terminates another process. A process may be launched from the Console, launched automatically at power-up, or launched by another process with the aMulti_Spawn function.
Example:
(TEA file stored in file slot 0)
#include <aCore.tea>
#include <aMulti.tea>
#include <aPrint.tea>
void main()
{
aMulti_Spawn(1,3);
aCore_Sleep(2000);
aMulti_Kill(3);
i=aMulti_PadRdInt(0);
aPrint_IntDec(i);
}
(TEA file stored in file slot 1)
#include <aMulti.tea>
void main(char callingProcID)
{
int i=0;
while (1);
{
aMulti_PadWrInt(0,i);
i=i+1;
}
}
The first program (0) launches the second program (1) as process 3. The second program goes into an infinite loop and continously updates a scratch pad location. The first program waits 200 milliseconds, then terminates the second program. While the first program is sleeping, the second program gets all the available CPU cycles. The first program displays the updated scratch pad location before exiting.
Related: