syscall wait mechanism