From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] drawterm and linux 2.4.4 SMP From: forsyth@caldo.demon.co.uk MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-ojcncnktkhbgsftwnuojfodfht" Message-Id: <20010721074131.A63A2199C0@mail.cse.psu.edu> Date: Sat, 21 Jul 2001 08:37:09 +0100 Topicbox-Message-UUID: d2b2c236-eac9-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-ojcncnktkhbgsftwnuojfodfht Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit the pthreads implementations had several problems when we tried to use them for inferno, so we stopped banging our heads against them and did it ourselves. --upas-ojcncnktkhbgsftwnuojfodfht Content-Type: message/rfc822 Content-Disposition: inline Received: from finch-punt-12.mail.demon.net ([194.217.242.36]) by lavoro; Sat Jul 21 06:06:11 BST 2001 Received: from punt-1.mail.demon.net by mailstore for forsyth@caldo.demon.co.uk id 995691631:10:18680:0; Sat, 21 Jul 2001 05:00:31 GMT Received: from psuvax1.cse.psu.edu ([130.203.4.6]) by punt-1.mail.demon.net id aa1018506; 21 Jul 2001 5:00 GMT Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.20.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7145819A60; Sat, 21 Jul 2001 01:00:13 -0400 (EDT) Received: from honk.eecs.harvard.edu (honk.eecs.harvard.edu [140.247.60.101]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 75207199DC for <9fans@cse.psu.edu>; Sat, 21 Jul 2001 00:59:40 -0400 (EDT) Received: by honk.eecs.harvard.edu (Postfix, from userid 1000) id E950D3C11C; Sat, 21 Jul 2001 00:59:32 -0400 (EDT) From: "William K. Josephson" To: 9fans@cse.psu.edu Subject: Re: [9fans] drawterm and linux 2.4.4 SMP Message-ID: <20010721005932.A42689@honk.eecs.harvard.edu> References: <20010721023834.60B961998A@mail.cse.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010721023834.60B961998A@mail.cse.psu.edu>; from jmk@plan9.bell-labs.com on Fri, Jul 20, 2001 at 10:38:30PM -0400 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.5 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sat, 21 Jul 2001 00:59:32 -0400 On Fri, Jul 20, 2001 at 10:38:30PM -0400, jmk@plan9.bell-labs.com wrote: > On Fri Jul 20 21:16:24 EDT 2001, crdevilb@mtu.edu wrote: > > Was there some suggestion or patch anybody had to fix this, or am I > > going to be digging into the linux kernel to find yet another hack to > > solve this? > I haven't looked at that code but from the description it looks like > the thread switch hack Phil Winterbottom and I did when we ported Inferno > to Linux a very long time ago. At that time Linux used the task I haven't looked at the drawterm code in quite a while, but I'd suggest using the pthreads version. I'm fairly sure that that is what is done under FreeBSD instead of using their rfork(2) (or the new libc wrapper in 4.3-stable). The pthreads implementation for Linux is a good example of how not to use #ifdef (or it was last I looked), but in general the implementations I've seen appear to be compatible and stable enough to use on almost all the major Unix derivatives that mucking around with the tss stuff probably isn't worth it for something like drawterm. Especially when the kernel changes as often as it does under Linux. -WJ --upas-ojcncnktkhbgsftwnuojfodfht--