update eventcalls.h eventcalls.c

use effective uid god
add spin lock on wait queue