diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2023-05-09 00:31:09 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-05-10 02:26:54 +0200 |
commit | 3295dbbe1cacfa59162c633aadd10db7614a98f4 (patch) | |
tree | 684cbff9eff6425c11c61a96a6a844689e279134 /utils/pids.c | |
parent | 88423259acc98ed389025d91985945ae561fc468 (diff) | |
download | hurd-3295dbbe1cacfa59162c633aadd10db7614a98f4.tar.gz hurd-3295dbbe1cacfa59162c633aadd10db7614a98f4.tar.bz2 hurd-3295dbbe1cacfa59162c633aadd10db7614a98f4.zip |
utils: Port to x86_64
Message-Id: <20230508213136.608575-15-bugaevc@gmail.com>
Diffstat (limited to 'utils/pids.c')
-rw-r--r-- | utils/pids.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/pids.c b/utils/pids.c index 82b75d1a..60067d9b 100644 --- a/utils/pids.c +++ b/utils/pids.c @@ -43,11 +43,12 @@ proc_server (void) /* Add the pids returned in vm_allocated memory by calling PIDS_FN with ID as an argument to PIDS and NUM_PIDS, reallocating it in malloced memory. */ error_t -add_fn_pids (pid_t **pids, size_t *num_pids, unsigned id, +add_fn_pids (pid_t **pids, mach_msg_type_number_t *num_pids, unsigned id, error_t (*pids_fn)(process_t proc, pid_t id, - pid_t **pids, size_t *num_pids)) + pid_t **pids, + mach_msg_type_number_t *num_pids)) { - size_t num_new_pids = 25; + mach_msg_type_number_t num_new_pids = 25; pid_t _new_pids[num_new_pids], *new_pids = _new_pids; error_t err = (*pids_fn)(proc_server (), id, &new_pids, &num_new_pids); @@ -73,7 +74,7 @@ add_fn_pids (pid_t **pids, size_t *num_pids, unsigned id, /* Add PID to PIDS and NUM_PIDS, reallocating it in malloced memory. */ error_t -add_pid (pid_t **pids, size_t *num_pids, pid_t pid) +add_pid (pid_t **pids, mach_msg_type_number_t *num_pids, pid_t pid) { size_t new_sz = *num_pids + 1; pid_t *new = realloc (*pids, new_sz * sizeof (pid_t)); |