Esempio n. 1
0
/*
 * uthread_cond_init
 *
 * Initialize the given condition variable
 * param cond: the pointer to the conditional object
 */
void
uthread_cond_init(uthread_cond_t *cond)
{
	assert(cond != NULL);

	utqueue_init(&cond->uc_waiters);
}
Esempio n. 2
0
/*
 * uthread_mtx_init
 *
 * Initialize the fields of the specified mutex.
 */
void
uthread_mtx_init(uthread_mtx_t *mtx)
{
        //NOT_YET_IMPLEMENTED("UTHREADS: uthread_mtx_init");
        assert(mtx != NULL);
        memset(mtx, 0, sizeof(uthread_mtx_t));
        utqueue_init(&mtx->m_waiters);
        mtx->m_owner = NULL;
}
Esempio n. 3
0
/*
 * uthread_sched_init
 *
 * Setup the scheduler. This is called once from uthread_init().
 */
void
uthread_sched_init(void)
{
	//NOT_YET_IMPLEMENTED("UTHREADS: uthread_sched_init");
        int i = 0;
        for(; i < UTH_MAXPRIO + 1; i ++){
            utqueue_init(&runq_table[i]);
        }

}
Esempio n. 4
0
/*
 * uthread_sched_init
 *
 * Setup the scheduler. This is called once from uthread_init().
 */
void
uthread_sched_init(void)
{	
    /* Just initialize the queue */
	int i;
	for(i = 0; i < UTH_MAXPRIO + 1; i++)
	{
		utqueue_init(&runq_table[i]);
	}
}