Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140907151758.GE23797@brightrain.aerifal.cx>
Date: Sun, 7 Sep 2014 11:17:58 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 7/9] add the thrd_xxxxxx functions

On Sun, Sep 07, 2014 at 04:52:07PM +0200, Jens Gustedt wrote:
> Am Sonntag, den 07.09.2014, 10:24 -0400 schrieb Rich Felker:
> > > diff --git a/src/thread/thrd_current.c b/src/thread/thrd_current.c
> > > new file mode 100644
> > > index 0000000..d9dabde
> > > --- /dev/null
> > > +++ b/src/thread/thrd_current.c
> > > @@ -0,0 +1,11 @@
> > > +#include "pthread_impl.h"
> > > +#include <threads.h>
> > > +
> > > +/* Not all arch have __pthread_self as a symbol. On some this results
> > > +   in some magic. So this "call" to __pthread_self is not necessary a
> > > +   tail call. In particular, other than the appearance, thrd_current
> > > +   can not be implemented as a weak symbol. */
> > > +thrd_t thrd_current()
> > > +{
> > > +	return __pthread_self();
> > > +}
> > 
> > Moved this to an alias.
> 
> Did you read the comment? I think that this would be a bug. As the
> comment indicates, there is at least one arch variant that hasn't a
> symbol __pthread_self so you can't use that as an alias.

Not an alias of __pthread_self; that's not a function (or if it is an
inline one, that's an implementation detail). Rather I meant an alias
of the function that's in pthread_self.c (but with namespace
protection applied).

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.