From owner-freebsd-hackers Wed Dec 11 14:55:14 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73CF337B401; Wed, 11 Dec 2002 14:55:12 -0800 (PST) Received: from sccrmhc03.attbi.com (sccrmhc03.attbi.com [204.127.202.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD64543EB2; Wed, 11 Dec 2002 14:55:11 -0800 (PST) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by sccrmhc03.attbi.com (sccrmhc03) with ESMTP id <2002121122551000300e9jele>; Wed, 11 Dec 2002 22:55:10 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id OAA92731; Wed, 11 Dec 2002 14:45:16 -0800 (PST) Date: Wed, 11 Dec 2002 14:45:14 -0800 (PST) From: Julian Elischer To: ouyang kai Cc: hackers@FreeBSD.org, Peter Wemm Subject: Re: Some problems about KSE In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 11 Dec 2002, ouyang kai wrote: > Hi, everybody, > I want to make sure whether we can program the multi-thread code based on > KSE in FreeBSD5.0 RC-1. Well it's still being written so you may be a bit ahead of yourself.. > I have make in '/usr/src/lib/libpthread', I found some new things in > '/usr/lib' as follow: > lrwxr-xr-x 1 root wheel 11 Dec 11 16:04 libkse.so -> libkse.so.1 > -r--r--r-- 1 root wheel 68780 Dec 11 16:04 libkse.so.1 > -r--r--r-- 1 root wheel 164448 Dec 11 16:04 libkse_p.a > -r--r--r-- 1 root wheel 153854 Dec 11 16:04 libkse.a > So if I program. How can I use the kse? cc ... -lkse .... > I can use pthread(3) as traditional manner, only using '-lpthread' instead > of '-pthread' in my makefile, right? no use -lkse until we have if more finished... then it will become -lpthread > when I use /usr/src/tools/KSE/ksetest/ksetest program , it always cause my > box crash. I have report this issue to Julian. the fix was committed yesterday. > I am seeing KSE(2), I have some puzzles about that. > 1. upcall is really means what? Does it represent through 'km_func'? if it > were true, the 'km_func' is indicated by whom? UTS, Kernel, or user program, > I do not know. the UTS fills in km_func before creating the KSE and loaded by the kernel. At THIS time it is never looked at again, but that could change in the future. (see how ksetest is written) > 2. When one process has more than one KSEG, the signal should be delivered > to which KSEG? The manual said it is indeterminate. I do not know how the > signal could be delivered to the special KSEG exactly? It is indetirminate because that code has not been written. At this time the signal will be delivered in the normal way to the next thread to enter the kernel in any way. This actually works for a surprising number of programs as long as they do not need to do any thread_specific actions in the handler. How to route the signals to a specific thread is still under discussion. > > Thank you! > Best Regards > Ouyang Kai > > > > > _________________________________________________________________ > Add photos to your e-mail with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message