|
From: Josh G. <jg...@us...> - 2002-11-16 03:22:30
|
On Fri, 2002-11-15 at 13:18, Matthias Weiss wrote: > On Wed, Nov 13, 2002 at 10:35:51PM -0800, Josh Green wrote: > > > > consist of samples, instruments, presets, zones etc, there are quite a > > lot of them. Thats a lot of wasted space just for a lock. I guess I'll > > have to look into some other threading libraries, perhaps just go > > pthread or something. The ideal would be a recursive R/W lock. I've seen > > these in the pthread library, but I'm not sure if they are recursive. > > AFAIK there are no r/w locks in the current linuxthread implementation. > I read about plans to include those in connection with the NPT (native > posix threads). > > matthias > What about pthread_rwlock_t (you can see this in /usr/include/pthread.h). I notice that the function prototypes are surrounded by an "#ifdef __USE_UNIX98" which I'm unfamiliar with. I can do a "p sizeof (pthread_rwlock_t)" in gdb with a pthread linked program, so it seems to be available (32 bytes a mutex, not bad I guess). Cheers. Josh Green |