Add WAIT_EVENT_{CLASS,ID}_MASK in wait_event.c