Esempio n. 1
0
int
down_trylock(struct semaphore * sem)
{
    Semaphore* s = (Semaphore*)sem;
    //Linux success == 0
    return !s->tryP();
}