Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libpthread



Module Name:    src
Committed By:   pooka
Date:           Tue Dec 16 20:05:54 UTC 2014

Modified Files:
        src/lib/libpthread: Makefile pthread.c pthread_int.h
Added Files:
        src/lib/libpthread: pthread_makelwp.h pthread_makelwp_netbsd.c

Log Message:
Allow for arbitrary MI scheduler implementations.

A concrete result is enabling unpatched libpthread to run on the
rumprun stacks (e.g. Xen and bare metal) with a non-NetBSD scheduler.
Those schedulers hook into the existing _lwp_frobnitz() NetBSD syscall
interfaces (well, "syscall" interfaces in that scenario ;)

More specifically about the change itself:

1) instead of calling _lwp_makecontext() followed by _lwp_create()
   and passing the entry point in ucontext_t (MD) through the calls, roll
   the calls into pthread__makelwp() and allow alternate implementations
   for that MI interface.

2) allow compile-time overriding of __lwp_gettcb_fast() or
   __lwp_getprivate_fast, which are inline and leak MD scheduler/thread
   details into libpthread

Additionally, two small nits:

I)  define LIB=pthread before including mk.conf so that it's possible
    to test for LIB==pthread in mk.conf

II) make it possible to leave out pthread_cancelstub.c.  This is required
    by the current implementation of rumprun-posix (i.e. rumprun on
    POSIX hosts) due to symbol collisions.  It needs to be fixed properly
    some day, but for now allows an almost-correct libpthread to run.
    I am sure @justin will be happy to explain the details ;)

no change to NetBSD
tested: anita+atf


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/lib/libpthread/Makefile
cvs rdiff -u -r1.144 -r1.145 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.89 -r1.90 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r0 -r1.1 src/lib/libpthread/pthread_makelwp.h \
    src/lib/libpthread/pthread_makelwp_netbsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index