: kn->kn_status |= KN_DELETING | KN_REPROCESS; : :So wouldn't another cpu running knote_release() while the 1st one :sleeps call knote_detach_and_drop() too :causing a crash when the 1st cpu resumes?
Only the thread which set KN_PROCESSING can release the knote,
so it shouldn't be possible. Other threads will see that KN_PROCESSING
is already set and not try to do anything drastic to the knote.
-Matt
Matthew Dillon
<[email protected]>
