pthread_cond_signal(&lwp_cpptr->c);
LWP_INT_SIGNAL(&lwp_cpptr->c);
Dispatcher()		/* Lightweight process dispatcher */{	void *t;	int my_priority;	PROCESS	old_cpptr;#if 1	int i = Highest_runnable_priority;		Cal_Highest_runnable_priority();	if (Highest_runnable_priority != i)	  printf("hipri was %d actually %d\n", i, Highest_runnable_priority);	Highest_runnable_priority = i;#endif	my_priority = lwp_cpptr->priority;	Debug(0, ("Dispatcher: %d runnable at pri %d hi %d blk %d", 		  runnable[my_priority].count, my_priority, 		  Highest_runnable_priority, PRE_Block));	PRE_Block = 1;	if ((my_priority < Highest_runnable_priority) || 	    (runnable[my_priority].count > 0))	  {	    Debug(0, ("Dispatcher: %s is now yielding", lwp_cpptr->name));	    /* I have to quit */	    old_cpptr = lwp_cpptr;	    lwpinsert(old_cpptr, &runnable[my_priority]);	    gettimeofday(&old_cpptr->lastReady, 0);	    lwp_cpptr = runnable[Highest_runnable_priority].head;	    /* remove next process from runnable queue and signal it */	    lwpremove(lwp_cpptr, &runnable[Highest_runnable_priority]);	    pthread_mutex_lock(&ct_mutex);	    Debug(0, ("Dispatcher: %s going to signal %s condition\n", 		      old_cpptr->name, lwp_cpptr->name))	    pthread_cond_signal(&lwp_cpptr->c);	    /* now sleep until somebody wakes me */	    Debug(0, ("Dispatcher: %s going to wait on own condition\n", 		      old_cpptr->name))	    pthread_cond_wait(&old_cpptr->c, &ct_mutex);	    pthread_mutex_unlock(&ct_mutex);	    /* update global pointer */	    lwp_cpptr = old_cpptr;	} else {	    Debug(0, ("Dispatcher: %s still running", lwp_cpptr->name))	}	/* make sure HRP is set correct */	Highest_runnable_priority = lwp_cpptr->priority;	if (lwp_cpptr->status == DESTROYED){		/* the process was runnable but got destroyed by somebody */		Free_PCB(lwp_cpptr);		Cal_Highest_runnable_priority();		lwp_cpptr = runnable[Highest_runnable_priority].head;		lwpremove(lwp_cpptr, &runnable[Highest_runnable_priority]);		pthread_mutex_lock(&ct_mutex);		pthread_cond_signal(&lwp_cpptr->c);		pthread_mutex_unlock(&ct_mutex);		pthread_exit(t);	}#if 0	if (PRE_Block != 1) Abort_LWP("PRE_Block not 1");#endif	PRE_Block = 0;}