diff options
| author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-09-03 10:03:29 +0000 |
|---|---|---|
| committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-09-03 10:03:29 +0000 |
| commit | 7410da5e36a173772e7fd831933ea946759e4996 (patch) | |
| tree | f4fe6d924e25716b3638621099473443e2bd1dd4 | |
| parent | 9a3a4b3b3a4451b57d833e0d7dc91b7a14138e43 (diff) | |
| download | uClibc-alpine-7410da5e36a173772e7fd831933ea946759e4996.tar.bz2 uClibc-alpine-7410da5e36a173772e7fd831933ea946759e4996.tar.xz | |
Make sure that multi-threaded statically linked applications use the real
locking implementations instead of the empty stubs from libc.a.
Removed also old work-around added to opendir, due to wrong
pthread_mutex_init (from libc.a) used in static binaries.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
| -rw-r--r-- | libc/misc/dirent/opendir.c | 3 | ||||
| -rw-r--r-- | libpthread/nptl/pthread_create.c | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libc/misc/dirent/opendir.c b/libc/misc/dirent/opendir.c index 8577d0703..e431e1978 100644 --- a/libc/misc/dirent/opendir.c +++ b/libc/misc/dirent/opendir.c @@ -75,9 +75,8 @@ close_and_ret: if (!(ptr = malloc(sizeof(*ptr)))) goto nomem_close_and_ret; - memset(ptr, '\0', sizeof(DIR)); ptr->dd_fd = fd; - + ptr->dd_nextloc = ptr->dd_size = ptr->dd_nextoff = 0; ptr->dd_max = statbuf.st_blksize; if (ptr->dd_max < 512) ptr->dd_max = 512; diff --git a/libpthread/nptl/pthread_create.c b/libpthread/nptl/pthread_create.c index c544bc267..0b37b3655 100644 --- a/libpthread/nptl/pthread_create.c +++ b/libpthread/nptl/pthread_create.c @@ -477,3 +477,8 @@ PTHREAD_STATIC_FN_REQUIRE (pthread_cancel) PTHREAD_STATIC_FN_REQUIRE (pthread_key_create) PTHREAD_STATIC_FN_REQUIRE (pthread_setspecific) PTHREAD_STATIC_FN_REQUIRE (pthread_getspecific) + +/* UCLIBC_MUTEX_xxx macros expects to have these as well */ +PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_init) +PTHREAD_STATIC_FN_REQUIRE (_pthread_cleanup_push_defer) +PTHREAD_STATIC_FN_REQUIRE (_pthread_cleanup_pop_restore) |
