recursive locks

2001-07-05 Thread Thomas Bushnell, BSG
You want something like: struct recursive_lock { spin_lock_t guard; int count; thread_t owner; mutex_t lock; }; "guard" protects "count" and "owner", and it looks like this: lock: spin_lock (guard) if (not owned) assert (count == 0) owner = me mutex_lock (lock) if (

loading shared objects at run time and recursive locks (was: Re: dynamic-linking)

2001-06-02 Thread Marcus Brinkmann
_link. Then there seem to be some more layers in guile responsible to wrap up the dlopen call in frame #12. From there on it's glibc. So we can safely say it is a glibc bug. In fact, after some digging in the ChangeLogs and poking around in the glibc source tree, we find in sysdeps

sawfish/librep/gtk + dlopen() and recursive locks.

2001-03-10 Thread Arkadi E. Shishlov
alizer function of the loaded object might as well require a call to this function. At this time it is not anymore a problem to modify the tables. */ __libc_lock_define (extern, _dl_load_lock) libc/sysdeps/mach/bits/libc-lock.h: /* XXX until cthreads supports recu