This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: still need Gloger's Sept 5 patch to pass make check
- To: drepper at cygnus dot com (Ulrich Drepper)
- Subject: Re: still need Gloger's Sept 5 patch to pass make check
- From: "Kevin B. Hendricks" <khendricks at ivey dot uwo dot ca>
- Date: Sun, 10 Sep 2000 13:34:37 -0400
- Cc: libc-alpha at sourceware dot cygnus dot com
- References: "Kevin B. Hendricks"'s message of "Sun, 10 Sep 2000 09:12:21-0400" <v03110700b5e1387a0989@[64.229.13.238]>
Hi Ulrich,
>I don't remember the patch and probably don't have it anymore.
Here it is. I have simply copied it from the libc-alpha mailing list archive.
It applies cleanly with the addition of -l to patch.
Thanks,
Kevin
---cut-here---
Here is the promised patch for the 1GB limit Steve Baur (and others)
were seeing.
Regards,
Wolfram.
2000-09-05 Wolfram Gloger <wg@malloc.de>
* malloc/thread-m.h [_LIBC]: Even if not linking with libpthread,
ensure usability of mutex as an `in use' flag.
--- malloc/thread-m.h.orig Fri Dec 10 19:10:09 1999
+++ malloc/thread-m.h Tue Sep 5 18:20:30 2000
@@ -42,14 +42,22 @@
#define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+/* Even if not linking with libpthread, ensure usability of mutex as
+ an `in use' flag, see also the NO_THREADS case below. Assume
+ pthread_mutex_t is at least one int wide. */
+
#define mutex_init(m) \
- (__pthread_mutex_init != NULL ? __pthread_mutex_init (m, NULL) : 0)
+ (__pthread_mutex_init != NULL ? __pthread_mutex_init (m, NULL) : \
+ (*(int*)(m) = 0))
#define mutex_lock(m) \
- (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (m) : 0)
+ (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (m) : \
+ ((*(int*)(m) = 1), 0))
#define mutex_trylock(m) \
- (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (m) : 0)
+ (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (m) : \
+ (*(int*)(m) ? 1 : ((*(int*)(m) = 1),
0)))
#define mutex_unlock(m) \
- (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (m) : 0)
+ (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (m) : \
+ (*(int*)(m) = 0))
#define thread_atfork(prepare, parent, child) \
(__pthread_atfork != NULL ? __pthread_atfork(prepare, parent, child) : 0)