waipit kast
This commit is contained in:
parent
9b01ada0e4
commit
0695481526
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -25,10 +25,13 @@
|
||||||
pid_t
|
pid_t
|
||||||
waitpid (pid_t pid, int *status_ptr, int options)
|
waitpid (pid_t pid, int *status_ptr, int options)
|
||||||
{
|
{
|
||||||
|
long long_pid = pid;
|
||||||
|
long long_status_ptr = cast_voidp_to_long (status_ptr);
|
||||||
|
long long_options = options;
|
||||||
#if __i386__
|
#if __i386__
|
||||||
return _sys_call3 (SYS_waitpid, (long) pid, (long) status_ptr, (int) options);
|
return _sys_call3 (SYS_waitpid, long_pid, long_status_ptr, long_options);
|
||||||
#elif __x86_64__ || __arm__
|
#elif __x86_64__ || __arm__
|
||||||
return _sys_call4 (SYS_wait4, (long) pid, (long) status_ptr, (int) options, 0);
|
return _sys_call4 (SYS_wait4, long_pid, long_status_ptr, long_options, 0);
|
||||||
#else
|
#else
|
||||||
#error arch not supported
|
#error arch not supported
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue