From owner-freebsd-current Sat Oct 31 12:35:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA13126 for freebsd-current-outgoing; Sat, 31 Oct 1998 12:35:46 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA13117 for ; Sat, 31 Oct 1998 12:35:43 -0800 (PST) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.9.1/8.9.1) id HAA10845; Sun, 1 Nov 1998 07:43:04 +1100 (EST) (envelope-from jb) From: John Birrell Message-Id: <199810312043.HAA10845@cimlogic.com.au> Subject: Re: Kernel threading (was Re: Thread Scheduler bug) In-Reply-To: <199810311956.NAA23144@ns.tar.com> from "Richard Seaman, Jr." at "Oct 31, 98 01:56:47 pm" To: lists@tar.com Date: Sun, 1 Nov 1998 07:43:04 +1100 (EST) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Richard Seaman, Jr. wrote: > Here's what my "poking around" amounts to at this point. I'd be willing > to carry it further, if there's interest. But, I also think that others > want to see a somewhat different direction (ie. mixed user/kernel threads). [...] > My general strategy was this. I took the existing libc_r code and > copied it to a new directory. The "uthread" code was split into 2 > directories: [...] > Then, I've created a third directory which contains the kernel thread > specific code. I've preserved separate make files so that both user > thread and kernel thread libraries can be generated useing the same > "generic" pthread code. > > If this general approach is of any interest, let me know. Kernel threads should use libpthread and libc, not libc_r. You can't mix kernel thread syscalls with user-thread syscalls because the styles are incompatible (blocking vs non-blocking). You can't mix kernel thread scheduling with user-thread scheduling. It doesn't sound like you have made any attempt to update the user-space knowledge of the running thread. As a result you will mix all errno codes and all user-space locking. This is a fundamental issue that needs to be designed, not hacked. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message