This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libc-980531 malloc/malloc.c,mach/Machrules


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]