trying to find a (compat) way to move to nptl (when ready)
Manuel Novoa III
mjn3 at codepoet.org
Fri Sep 2 23:19:51 UTC 2005
Hello Peter,
On Fri, Sep 02, 2005 at 06:34:00PM +0200, Peter S. Mazinger wrote:
> Hello!
>
> I am trying to remove libpthread dependency from a dev box, so that if
> nptl is done, we can move "smoothly" to it, looking for an update path.
> Attached is a patch that corrects the case if UCLIBC_HAS_THREADS is not
> enabled (removing related headers on install)
> at least 4 functions are calling for trouble (missing from the non-thread
> version of uClibc)
> _stdio_user_locking
This is for internal use by libc and libpthread only.
> __rpc_thread_destroy
Ditto... Anything using either of the above deserves to break.
> flockfile
> funlockfile
You should be able to enable both of the above plus ftrylockfile for the
non-thread build to produce stub versions in libc.
> I have overcome this by adding dummies to a shared lib that was preloaded
> until the apps were rebuilt, that needed these.
You'll also want to disable getc/putc macro support.
> Does anyone have an idea how this could be integrated into uClibc, so that
> an update path could be provided?
>
> Thanks, Peter
Just remove the UCLIBC_HAS_THREADS test in libc/stdio/Makefile to enable
flockfile and friends. The other symbols should never be referenced by
apps or other libs.
Manuel
More information about the uClibc
mailing list