Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: blocking O_NONBLOCK process bug in sleep.c
There is a subtle bug that if the atomic flag changes between the time it was checked and the second time it was checked, sleep.c would potentially block a process that had specified O_NONBLOCK. This fixes the bug by using atomic_cmpxchg instead of atomic_read.
- Loading branch information