Exemple #1
0
int Thread_Kill(thread_type type)
{
	int		i,
			k = 0;

	for (i = 0; i < MAX_THREADS; i++)
	{
		if (threads[i].type == type)
		{
			TerminateThread(threads[i].tHandle, 0);
			Thread_Clear(i);
			k++;
		}
	}

	return k;
}
Exemple #2
0
NIL_type Thread_Initialize(NIL_type)
  { Thread_Clear();
    Thread_Flush();
    Counter = 0;
    Main_Register((REF_type)&Thread_Current); }