This is the mail archive of the libc-alpha@sources.redhat.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: spinlocks


On Wed, Apr 25, 2001 at 11:34:03PM -0700, Ulrich Drepper wrote:
> Well, the patch isn't too bad.  There are a few things you'll have to
> change:
> 
> - the name _lt_spinlock_t isn't good.  We already have too many spinlocks.
>   I'd suggest rather something in the line of __lock_object_t or so (better
>   proposals are welcome).  The initializer will have to be renamed
>   appropriately.

That's fine.

> - I would not want the $NEWTYPE to be a struct for architectures which
>   don't have to do this.

Why not?  It prevents people thinking they know what it is, assigning a
value to it, and breaking hppa.  Perhaps people will not do that anyway
if the type is not `int', but I don't see that it costs anything.

> - related, the definition of __libc_lock_define_initialized etc must be
>   optimized for everything != hppa just as before.  This probably means
>   introducing another macro stating that the initializer is null.

Fine.

> - the return type for your test() function must be int not long int.
>   And while we're at it, this name is also not very good.  test is a far
>   too common identifier.

No problem with that either.

> I think that's it.

Thanks for the feedback.  I'll revise the patch.


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