From owner-freebsd-current Wed Nov 11 07:24:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA25636 for freebsd-current-outgoing; Wed, 11 Nov 1998 07:24:25 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ns.tar.com (ns.tar.com [204.95.187.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA25626 for ; Wed, 11 Nov 1998 07:24:21 -0800 (PST) (envelope-from lists@tar.com) Received: from ppro.tar.com (ppro.tar.com [204.95.187.9]) by ns.tar.com (8.9.1/8.8.7) with SMTP id JAA04046 for ; Wed, 11 Nov 1998 09:23:59 -0600 (CST) Message-Id: <199811111523.JAA04046@ns.tar.com> From: "Richard Seaman, Jr." To: "current@freebsd.org" Date: Wed, 11 Nov 98 09:23:59 -0600 Reply-To: "Richard Seaman, Jr." X-Mailer: PMMail 1.92 For OS/2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: RFSIGSHARE ready? Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ==================BEGIN FORWARDED MESSAGE================== >From: "Richard Seaman, Jr." >To: "Brian Feldman" >Cc: "current@freebsd." >Date: Wed, 11 Nov 98 09:19:25 -0600 >Reply-To: "Richard Seaman, Jr." >Subject: Re: RFSIGSHARE ready? > On Tue, 10 Nov 1998 21:22:05 -0500 (EST), Brian Feldman wrote: >This doesn't necessarily sound like it's the last bug to be fixed, but it >sure could be. Thanks a bunch! I have a ported version of linuxthreads that executes in FreeBSD. However, I haven't incorporated your RFSIGSHARE patches into the kernel, so I'm sure the signal handling is not quite right. It doesn't use the clone call, it just uses rfork instead. It also uses thr_sleep and thr_wakeup instead of the restart signal handling that linuxthreads uses for suspend and restart. This gets around some of the signal handling problems in FreeBSD vs. linux clone, and looks like it might be speedier. It still needs work, but if this is related to what you're trying to accomplish, I'll tar it up and send it to you, if you want. Three issues you need to be aware of, at least. 1) There is something wrong with the definition of THREAD_STACK_START_ADDRESS in internals.h when executing in FreeBSD. Setting: #define THREAD_STACK_START_ADDRESS (0xe0000000) works, but there's probably a better choice. 2) The mmap call in manager.c uses an option MAP_GROWSDOWN that doesn't seem to exist in FreeBSD. The user stack appears way too small (in fact I think its effectively zero length), since I assume the MAP_GROWSDOWN option adds to the mmaped region on demand as stack is needed. What I have done, until I think of something better, is change the call to this: if (mmap((caddr_t)((char *)(new_thread+1) - STACK_SIZE), STACK_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0) != (caddr_t) -1) break; 3) There are numerous libc issues to be dealt with to make linuxthreads work properly, though they are not unique to linuxthreads. The same issues apply to any pthreads implementation other than the existing FreeBSD libc_r version. When I have the issues clear in my own mind, I was planning on posting a message. ===================END FORWARDED MESSAGE=================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message