[uClibc]syscalls.c

Erik Andersen andersen at lineo.com
Mon Jun 25 20:03:44 UTC 2001


On Mon Jun 25, 2001 at 12:04:24PM -0700, Steve Thayer wrote:
> I think a reasonable compromise can be reached here. As Michael
> states below, Linuxthreads does override some of the syscalls
> to set the cancellation type, but only about 20 of the 120+
> syscalls implemented by uClibc.  So we'd be looking at only 
> 20 additional weak aliases.  If you'd like, I can have those
> optionally compiled in only if pthread support is compiled in to
> uClibc (this might make the code a little uglier, but it would
> save space in the binary).

Hmm.  As I think about it, we could add in a new define to include/features.h,
something like thread_dependant_weak() which conditionally includes the weak
symbol using an #ifdef HAVE_THREADS check.

> I also won't need to introduce any of the __function() calls to
> uClibc if I change Linuxthreads to use uClibc's naming convention
> instead (i.e. call function() instead of __function()).  The end
> result would be the same, and I wouldn't have to add any new weak
> aliases.

That would be best if you can find a way to manage it.

> Linuxthreads also uses some of the sched_* syscalls, which are not
> currently implemented in uClibc, so I would have to add those as
> well.  There's only about five needed, so they shouldn't take up
> much space, and again I can optionally compile them in when
> including pthread support.

Works for me.  How about we have you add a configuration point using
DO_THREADS=[true/false] to Config and also add a HAVE_THREADS define 
to uClibc_config.h (see the toplevel Makefile).

 -Erik

--
Erik B. Andersen   email:  andersen at lineo.com
--This message was written using 73% post-consumer electrons--





More information about the uClibc mailing list