Esempio n. 1
0
int
RunHelloProtocol(int argc, char **argv)
{

//	ThreadSetUniprocessorMode();

	NETDEBUG(MRSD, NETLOG_DEBUG1, ("starting hello protocol ... \n"));
	libavl_init(1);
	timerLibInit();
	// hcp_lock = LockAlloc();
	// LockInit(hcp_lock, 0);     /* Not sharing with other processes */
	
	hcpInit();


	timerInit(&hcp->Mtimer, 128, 0);
	NetFdsInit(&Hellotimerfds);

	IpcInit();

	ThreadLaunch(HelloHandleTimers, NULL, 1);

	pthread_mutex_lock(&(hellocv.mutex));
	hellocv.value = 1;
	pthread_cond_signal(&(hellocv.cond));
	pthread_mutex_unlock(&(hellocv.mutex));

	/* Main Loop */
	HelloProtMainLoop();

	return(0);
}
Esempio n. 2
0
void usrKernelExtraInit (void)
    {
    hashLibInit ();                     /* hash library */
    symLibInit ();                      /* Set of routines to manipulate symbols and symbol tables */
    taskVarInit ();                     /* allow global variables to be made private to a task */
    envLibInit (ENV_VAR_USE_HOOKS);     /* unix compatable environment variables */
    sigInit (POSIX_SIGNAL_MODE);        /* signals */
    sigeventLibInit ();                 /* Kernel signal event support.  Required for SIGEV_THREAD support in RTP. */
    mqPxLibInit (MQ_HASH_SIZE);         /* POSIX message queues */
    pthreadLibInit ();	                 /* Support for POSIX threads in the kernel */
    semPxLibInit ();                    /* POSIX semaphores */
    sigqueueInit (NUM_SIGNAL_QUEUES);   /* queued signals */
    clockLibInit ();                    /* POSIX clocks */
    timerLibInit ();                    /* POSIX timers */
    timerOpenInit ();                   /* open/close/unlink timer modules */
    intVecTableWriteProtect ();         /* write-protect vector table */
    syscallHookLibInit ();              /* Add hook routines to be called on system calls. */
    }