a C standard library for fx Casio calculators
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
fxlibc/src/posix/sys/wait/target/vhex-sh/waitpid.S

29 lines
922 B

#ifdef __SUPPORT_VHEX_KERNEL
#include <bits/asm/unistd_32.h>
.text
.global _waitpid
.type _waitpid, @function
.align 2
/*
** extern pid_t waitpid(pid_t pid, int *wstatus, int options);
** Wait for a child matching PID to die.
** - If PID is greater than 0, match any process whose process ID is PID.
** - If PID is (pid_t) -1, match any process.
** - If PID is (pid_t) 0, match any process with the same process group as the
** current process.
** - If PID is less than -1, match any process whose process group is the absolute
** value of PID.
** - If the WNOHANG bit is set in OPTIONS, and that child is not already dead,
** return (pid_t) 0. If successful, return PID and store the dead child's
** status in STAT_LOC.
** - Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS,
** return status for stopped children; otherwise don't.
*/
_waitpid:
trapa #__NR_waitpid
rts
nop
.end
#endif