Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This sort of thing can be implemented in the kernel without special hardware operations by adding the thread to the wake list, then suspending the thread, then checking the value. If the value has changed, undo that and return, else just return leaving the thread suspended. Special hardware multi-atomic instructions are not required, but the details are very dependent on how kernel's thread switching is designed.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: