[interfacekit] Re: Fwd: BAutolock

> Yes, Lock() should generally return a status_t. But there is a 
> difference between a kernel acquire_sem() and a userland acquire_sem() 
> - the latter is interruptible, the former not. That's why you can 
> safely do:
> 
> acquire_sem(someLock);
> ...
> release_sem(someLock);
> 
> Without checking for the return argument of acquire_sem() safely in the 
> kernel, but not in userland. The only reason why the above call would 

So, in userland, we should always do 

while(acquire_sem(someLock) == B_INTERRUPTED)
     ;

right?

Even in case of acquire_sem_etc() calls ?

If so, you should better run and fix the opentracker right now :PPP,
since there is EXACTLY one acquire_sem_etc call around which is not like this :P




Other related posts: