Fixes potential race with SCPs blocking (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 19 Oct 2012 23:00:05 +0000 (16:00 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 19 Oct 2012 23:00:05 +0000 (16:00 -0700)
commit979bce860b13845aaeaf01a9ee0584d66e70e740
treee6e4daf2e7641993fc21094d1893b0cd48e9170b
parentd68c976dbdc5f759828f5bdeee2a44adf69155ba
Fixes potential race with SCPs blocking (XCC)

If we ever received an event/notif after registering the ev_q and before
yielding, that event would cause us to clear notif_pending.  This would
cause us to sleep permanently in yield, since we already both received
the 'syscall done' event and marked its reception.

If you want to write similar code, the important thing was that we need
notifs disabled before we check the syscall's SC_DONE.
tools/compilers/gcc-glibc/glibc-2.14.1-ros/sysdeps/ros/syscall.c