#define INTHREADING
#include <Threading.h>

void initThreadingDB( void )
{
int	i=0,k=0;

while ( i <= 4096 )
   {
   k=0;
   ThreadDB[i].State = PT_FREE;
   ThreadDB[i].WaitOnToExit = FALSE;
   ThreadDB[i].Mutex = PTHREAD_MUTEX_INITIALIZER;
   ThreadDB[i].CurMsg = 0;
   ThreadDB[i].ProcMsg = 0;
   while ( k <= 10 )
      {
      ThreadDB[i].MsgQue[k].State = PTM_FREE;
      ThreadDB[i].MsgQue[k].TimeStamp = 0;
      k++;
      }
   i++;
   }

/* Init error */
i=0;
while ( i <= 10 )
   {
   ErrorPath[i] = NULL;
   i++; 
   }

}
