Subject: mysql and MIT-pthreads
To: None <port-amiga@NetBSD.ORG>
From: George Harvey <fr30@dial.pipex.com@am061.du.pipex.com>
List: port-amiga
Date: 02/26/1997 22:36:35
The question:

Has anyone got a working POSIX threads library for NetBSD-Amiga?


The story:

I am attempting to compile the 'mysql' database package under
NetBSD-1.2 on an Amiga 3000. Mysql requires POSIX threads to run
and the current source distribution (http://www.tcx.se) includes 
the MIT pthreads library for this purpose. Unfortunately, although 
there is support for NetBSD, there is no support for the 680x0 
processor (the pthreads library uses assembler code routines in
a number of critical areas).

Here is where I have got to...

+ Created a set of machine-dependent files for NetBSD-68k based
  on the supplied NetBSD-i386 versions.
+ Replaced the i386 assembler code with what I hope is equivalent
  680x0 code (my 68k assembler knowledge is very limited).
+ Fixed the configure script, makefiles etc. to recognise the 68k.
+ Successfully compiled and linked everything.

BUT, the pthreads library doesn't work, any attempt to create a thread
causes the program to stick in an infinite loop somewhere. I know
it is going to be a fault in my assembler code but I need to understand 
how the registers are used in system calls in order to make any progress
in this area. Is there any sort of guide anywhere to assembler
programming for NetBSD on a 68k ?


Thanks,


    George Harvey                  | Amiga A3000T, CyberStorm-II 040,
    email: fr30@dial.pipex.com     | Picasso-II, MFC-III