Date: Sun, 8 Sep 2002 19:14:57 -0700 (PDT) From: Jonathan Mini <mini@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 17250 for review Message-ID: <200209090214.g892EvaU066518@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17250 Change 17250 by mini@mini_stylus on 2002/09/08 19:14:08 Enable KSE in libc_r. Affected files ... .. //depot/projects/kse/lib/libc_r/uthread/uthread_create.c#7 edit .. //depot/projects/kse/lib/libc_r/uthread/uthread_init.c#8 edit .. //depot/projects/kse/lib/libc_r/uthread/uthread_kern.c#9 edit Differences ... ==== //depot/projects/kse/lib/libc_r/uthread/uthread_create.c#7 (text+ko) ==== ==== //depot/projects/kse/lib/libc_r/uthread/uthread_init.c#8 (text+ko) ==== @@ -266,7 +266,7 @@ _thread_initial->attr.stackaddr_attr = _thread_initial->stack; _thread_initial->attr.stacksize_attr = PTHREAD_STACK_INITIAL; - /* Setup the context for the scheduler: */ + /* Setup the context for the scheduler. */ _thread_kern_kse_mailbox.km_stack.ss_sp = _thread_kern_sched_stack; _thread_kern_kse_mailbox.km_stack.ss_size = sched_stack_size; @@ -289,6 +289,7 @@ _thread_initial->stack; _thread_initial->mailbox.tm_context.uc_stack.ss_size = PTHREAD_STACK_INITIAL; + _thread_initial->mailbox.tm_udata = (void *)_thread_initial; /* Default the priority of the initial thread: */ _thread_initial->base_priority = PTHREAD_DEFAULT_PRIORITY; @@ -333,6 +334,11 @@ _clock_res_usec = clockinfo.tick > CLOCK_RES_USEC_MIN ? clockinfo.tick : CLOCK_RES_USEC_MIN; + /* Start KSE. */ + _thread_kern_kse_mailbox.km_curthread = + &_thread_initial->mailbox; + if (kse_new(&_thread_kern_kse_mailbox, 0) != 0) + PANIC("kse_new failed"); } /* Initialise the garbage collector mutex and condition variable. */ ==== //depot/projects/kse/lib/libc_r/uthread/uthread_kern.c#9 (text+ko) ==== @@ -259,6 +259,7 @@ while ((tm = p) != NULL) { p = tm->tm_next; tm->tm_next = NULL; + DBG_MSG("\tmailbox=%p pthread=%p\n", tm, tm->tm_udata); PTHREAD_PRIOQ_INSERT_TAIL((pthread_t)tm->tm_udata); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209090214.g892EvaU066518>