[160] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

Re: An idea for pthreads

daemon@ATHENA.MIT.EDU (Ken Raeburn)
Wed Oct 25 15:48:16 1995

Date: Wed, 25 Oct 1995 15:14:48 -0400
From: Ken Raeburn <raeburn@cygnus.com>
To: pthreads@MIT.EDU
In-Reply-To: Greg Hudson's message of Wed, 25 Oct 1995 14:25:59 EDT


   From: Greg Hudson <ghudson@MIT.EDU>
   Date: Wed, 25 Oct 1995 14:25:59 EDT

   > % ld -r -o syscalls.o -u <list of system call symbols ie _write etc>
   > /usr/lib/libc.a

   The C library system call routines set the global errno value, which
   isn't appropriate for a threaded program.  There's no way to get at
   "just the system call" inside the C library, so the assembly code
   really is necessary.

I believe on many systems the system call routines branch to a common
error handling routine by name (often "cerror").  Supply your own
routine with that name....

Of course, on some systems only a shared library is available, so the
system calls *can't* be extracted this way.

home help back first fref pref prev next nref lref last post