DragonFly commits List (threaded) for 2009-05
DragonFly-18.104.22.168.g82205 master lib/libc/gen Makefile.inc _pthread_stubs.c pthread_fake.c
Author: Simon Schubert <email@example.com>
Date: Tue May 26 22:15:47 2009 +0200
libc: consolidate pthread stub functions
To Hasso's and my surprise we are maintaining two sets of stub functions
for pthread. These stubs are present so that consumers that are thread
aware, but don't require pthreads, will successfully link even without
pthread_fake.c was introduced for external consumers, I believe Xorg.
It provided externally visible weak symbols for pthread_* functions that
all returned an error.
_pthread_stubs.c was introduced later so that libc could be made pthread
aware. It provided only stub functions that are used by libc itself,
provided by weak symbols for _pthread_* (notice leading underscore).
These functions returned always success, so that libc could operate
This consolidation now provides weak symbols for both pthread_* and
_pthread_* for all functions defined by libpthread, except for
pthread_create. These functions return success and/or behave properly.
Summary of changes:
lib/libc/gen/Makefile.inc | 2 +-
lib/libc/gen/_pthread_stubs.c | 358 +++++++++++++++++------------------------
lib/libc/gen/pthread_fake.c | 171 --------------------
3 files changed, 151 insertions(+), 380 deletions(-)
delete mode 100644 lib/libc/gen/pthread_fake.c
DragonFly BSD source repository