It's a queueing lock, but otherwise just a lock. Thus, you use it like lock(), that is
qlock(&l); ...isolated access to your shared data... qunlock(&l); The difference wrt lock/unlock is that it does not spin. If the lock cannot be set, the thread is put to sleep in queue waiting for the lock. So, it's better to use qlock in general than it is to use lock. (IIRC, lock is used to protect the data structure of the QLock, that might give you more insight regarding the difference b/w qlock and lock). hth On 8/10/07, david jeannot <[EMAIL PROTECTED]> wrote: > Hi, > > Does qlock block all threads on a same proc? > I read lock(2) and thread(2) but I am not sure yet. > > Merci beaucoup, david >
