Created
February 16, 2016 18:04
-
-
Save m6w6/6fb8f7eb2f18db3c0af9 to your computer and use it in GitHub Desktop.
pesky system interfaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function psi\sigaction(int $sig, object $act, object &$oact = null) : int { | |
let sig = intval($sig); | |
let act = arrval($act, | |
callback void( | |
sa_handler( | |
to_int(signo) | |
) | |
), | |
objval(sa_mask), | |
intval(sa_flags), | |
callback void( | |
sa_sigaction( | |
to_int(signo), | |
to_array(info, | |
to_int(si_signo), | |
to_int(si_code), | |
to_int(si_errno), | |
to_int(si_pid), | |
to_int(si_uid), | |
to_obj(si_addr), | |
to_int(si_status), | |
to_int(si_band), | |
to_array(si_value, | |
to_int(sival_int), | |
to_object(sival_ptr) | |
) | |
), | |
to_array(uctx, | |
to_array(uc_link, ...), | |
to_object(uc_sigmask), | |
to_array(uc_stack, | |
to_object(ss_sp), | |
to_int(ss_size), | |
to_int(ss_flags) | |
), | |
to_object(uc_mcontext) | |
) | |
) | |
) | |
); | |
let oact = NULL; | |
return to_int(sigaction); | |
set $oact = to_array(oact, | |
to_object(sa_handler), | |
to_object(sa_mask), | |
to_int(sa_flags), | |
to_object(sa_sigaction) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment