Sebastien Marie wrote: > Hi, > > The following diff makes the effect of multiple threads calling > pledge(2) to be serializable. > > It adds a loop (with tsleep(9)) at pledge(2) entrance if another thread > is already inside (due to sleep), changes return to goto statment, and > wakeup other threads at end.
I am strongly opposed to adding new instances of the flag/tsleep locking pattern. There are inevitably bugs, or at the very least it creates more work later to make SMP safe. Don't invent new locks. Use the ones we have (rwlock).
