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


willy@ldl.fc.hp.com (Matthew Wilcox) writes:

> Since I haven't tested it on other architectures, I have surely missed
> something.  I'm not asking for this to be applied, I'm just asking for
> comment on whether this is an acceptable approach to the problem.

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.

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

- 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.

- 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.


I think that's it.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


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