Subject: Re: pthreads
To: None <amiga@NetBSD.ORG>
From: Ty Sarna <tsarna@endicor.com>
List: amiga
Date: 06/10/1995 23:53:49
In article <9506102005.AA01973@cs.montana.edu>,
Lance Kind  <lancer@cs.montana.edu> wrote:
> 
> 	Are pthreads implemented in NetBSD-Amiga?  Does anyone have any
> good pointers to pthreads documentation?
> 
> 	I am looking into porting HotJava to NetBSD; HotJava apparently
> needs pthreads.

NetBSD has a pthreads library, but I beileiev it is out of date WRT the
rest of NetBSD. It does not support m68k. One difficulty with an Amiga
implementation is that the Ami doesn't support TAS, so a syscall would
be needed to simulate it (slow). And, since NetBSD/m68k8k binaries should
run across ALL NetBSD/m68k8k systems, this would hve to be done for all
of them. One optimization would be to add a sysarch() that implements
TAS and another that returns wether the m68k TAS instruction would be
supported. Then the pthreads library could have two functions for the
low level part that needs TAS. It would call these routines via a
function pointer. Early on the program could call the sysarch() to
decide if hardware TAS was OK, and if so set the function pointer to the
TAS-using routine, otherwise the syarch() version. This would allow
other m68k archs that DO support TAS to take advantage of it, while
maintaining compatibility with those that can't.