This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: libc-980531 malloc/malloc.c,mach/Machrules
- To: uch@nop.or.jp
- Subject: Re: libc-980531 malloc/malloc.c,mach/Machrules
- From: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
- Date: 8 Jun 1998 11:33:33 -0000
- CC: libc-hacker@cygnus.com
- References: <19980608180659D.uch@nop.or.jp>
> In Hurd, mutex_init() expand to
>
> #define MACRO_BEGIN do {
> #define MACRO_END } while (0)
> #define mutex_init(m) \
> MACRO_BEGIN \
> spin_lock_init(&(m)->lock); \
> cthread_queue_init(&(m)->queue); \
> spin_lock_init(&(m)->held); \
> MACRO_END
>
> So (void)mutex_init() is syntax error.
...
> - (void)mutex_init(&ar_ptr->mutex);
> + mutex_init(&ar_ptr->mutex);
mutex_init is a wrapper macro defined in malloc/thread-m.h. It was
only left undefined in the Hurd section of thread-m.h by
accident/chance.
A better fix is to adapt thread-m.h so that mutex_init is defined to
be something that returns an int, as per the POSIX interface. I
thought that such a fix had already been checked into the CVS archive.
Regards,
Wolfram.
--
`Surf the sea, not double-u three...'
wmglo@dent.med.uni-muenchen.de