Re: Internal libc lock interface

2001-06-21 Thread Roland McGrath
> I also found a stub in sysdes/generic for machine-lock.h. It defines > the atomic __spin_lock operations and there are non stub implementations > for severa arch's. It contains very few definitions. So I think I'll > add more definitions and use __spin_lock's throughout pthreads. You should pro

Re: Internal libc lock interface

2001-06-21 Thread Igor Khavkine
On Thu, Jun 21, 2001 at 06:32:12AM -0400, Roland McGrath wrote: > rwlock is to mutex as pthread_rwlock is to pthread_mutex I see. It's just a simple abstraction for the Readers-Writers problem. I also found a stub in sysdes/generic for machine-lock.h. It defines the atomic __spin_lock operations

Re: Internal libc lock interface

2001-06-21 Thread Roland McGrath
rwlock is to mutex as pthread_rwlock is to pthread_mutex ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd

Re: Internal libc lock interface

2001-06-21 Thread Marcus Brinkmann
On Thu, Jun 21, 2001 at 01:56:28AM -0400, Igor Khavkine wrote: > In the former case, how do I deal with > rwlocks (what are these btw?) A read write lock is like a file lock with LOCK_SH and LOCK_EX. Acquiring the reader lock locks out writers, and acquiring the writer lock locks out everybody.

Re: Internal libc lock interface

2001-06-20 Thread Roland McGrath
I think libc-lock.h's comments are pretty self-explanatory. It is the interface for locks internal to the "generic" parts of libc. In a full-fledged integrated pthreads implementation, linuxthreads/sysdeps/pthread/bits/libc-lock.h is probably about right. Note that the low-level hurd-specific

Internal libc lock interface

2001-06-20 Thread Igor Khavkine
I found a header in glibc that defines a generic lock interface. The file is sysdeps/generic/bits/libc-lock.h. There is a Mach specific version of it in sysdeps/mach/bits. It is implemented on top of cthread locks. Was intended to be a high level or low level lock inteface? So should I try to re