DragonFly-2.3.1.139.g82205 master lib/libc/gen Makefile.inc _pthread_stubs.c pthread_fake.c
Simon Schubert
corecode at crater.dragonflybsd.org
Wed May 27 07:36:39 PDT 2009
commit 82205bfb5bec67600a6b477c8acf5b7268bd3704
Author: Simon Schubert <simon.schubert at epfl.ch>
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
-lpthread.
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
properly.
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
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/82205bfb5bec67600a6b477c8acf5b7268bd3704
--
DragonFly BSD source repository
More information about the Commits
mailing list