From owner-p4-projects Sun Sep 8 19:15: 6 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7F8A637B401; Sun, 8 Sep 2002 19:14:58 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2995C37B400 for ; Sun, 8 Sep 2002 19:14:58 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D954143E72 for ; Sun, 8 Sep 2002 19:14:57 -0700 (PDT) (envelope-from mini@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g892EvJU066521 for ; Sun, 8 Sep 2002 19:14:57 -0700 (PDT) (envelope-from mini@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g892EvaU066518 for perforce@freebsd.org; Sun, 8 Sep 2002 19:14:57 -0700 (PDT) Date: Sun, 8 Sep 2002 19:14:57 -0700 (PDT) Message-Id: <200209090214.g892EvaU066518@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to mini@freebsd.org using -f From: Jonathan Mini Subject: PERFORCE change 17250 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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