diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2023-05-09 00:31:12 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-05-10 02:32:25 +0200 |
commit | 1932ab1888ff445092d124217f68948e2866d3d7 (patch) | |
tree | 4c810baccbed9cd8c5b93a8e39fb96a1da1e7249 /proc | |
parent | ce03504be83ef746720f0f0da3dee28cde9f60b9 (diff) | |
download | hurd-1932ab1888ff445092d124217f68948e2866d3d7.tar.gz hurd-1932ab1888ff445092d124217f68948e2866d3d7.tar.bz2 hurd-1932ab1888ff445092d124217f68948e2866d3d7.zip |
proc: Port to x86_64
Message-Id: <20230508213136.608575-18-bugaevc@gmail.com>
Diffstat (limited to 'proc')
-rw-r--r-- | proc/host.c | 10 | ||||
-rw-r--r-- | proc/info.c | 24 | ||||
-rw-r--r-- | proc/mgt.c | 12 | ||||
-rw-r--r-- | proc/msg.c | 5 | ||||
-rw-r--r-- | proc/pgrp.c | 6 |
5 files changed, 29 insertions, 28 deletions
diff --git a/proc/host.c b/proc/host.c index e78e70da..e9f36f51 100644 --- a/proc/host.c +++ b/proc/host.c @@ -80,9 +80,9 @@ S_proc_getprivports (struct proc *p, kern_return_t S_proc_setexecdata (struct proc *p, const mach_port_t *ports, - size_t nports, + mach_msg_type_number_t nports, const int *ints, - size_t nints) + mach_msg_type_number_t nints) { int i; struct execdata_notify *n; @@ -135,9 +135,9 @@ kern_return_t S_proc_getexecdata (struct proc *p, mach_port_t **ports, mach_msg_type_name_t *portspoly, - size_t *nports, + mach_msg_type_number_t *nports, int **ints, - size_t *nints) + mach_msg_type_number_t *nints) { int i; int ports_allocated = 0; @@ -344,7 +344,7 @@ initialize_version_info (void) kernel_version_t kv; char *p; struct host_basic_info info; - size_t n = sizeof info; + mach_msg_type_number_t n = sizeof info; error_t err; /* Fill in fixed slots sysname and machine. */ diff --git a/proc/info.c b/proc/info.c index c2d7ad67..12743465 100644 --- a/proc/info.c +++ b/proc/info.c @@ -235,7 +235,7 @@ get_string (task_t t, vm_address_t readaddr; vm_address_t data; - size_t readlen; + mach_msg_type_number_t readlen; error_t err; char *c; @@ -329,7 +329,7 @@ static error_t get_string_array (task_t t, vm_address_t loc, vm_address_t *buf, - size_t *buflen) + mach_msg_type_number_t *buflen) { char *bp; int *vector, *vp; @@ -400,9 +400,9 @@ get_string_array (task_t t, /* Implement proc_getprocargs as described in <hurd/process.defs>. */ kern_return_t S_proc_getprocargs (struct proc *callerp, - pid_t pid, - data_t *buf, - size_t *buflen) + pid_t pid, + data_t *buf, + mach_msg_type_number_t *buflen) { struct proc *p = pid_find (pid); @@ -438,9 +438,9 @@ S_proc_getprocargs (struct proc *callerp, /* Implement proc_getprocenv as described in <hurd/process.defs>. */ kern_return_t S_proc_getprocenv (struct proc *callerp, - pid_t pid, - data_t *buf, - size_t *buflen) + pid_t pid, + data_t *buf, + mach_msg_type_number_t *buflen) { struct proc *p = pid_find (pid); @@ -483,12 +483,12 @@ S_proc_getprocinfo (struct proc *callerp, pid_t pid, int *flags, int **piarray, - size_t *piarraylen, + mach_msg_type_number_t *piarraylen, data_t *waits, mach_msg_type_number_t *waits_len) { struct proc *p = pid_find (pid); struct procinfo *pi; - size_t nthreads; + mach_msg_type_number_t nthreads; thread_t *thds; error_t err = 0; size_t structsize; @@ -496,7 +496,7 @@ S_proc_getprocinfo (struct proc *callerp, int pi_alloced = 0, waits_alloced = 0; /* The amount of WAITS we've filled in so far. */ mach_msg_type_number_t waits_used = 0; - size_t tkcount, thcount; + mach_msg_type_number_t tkcount, thcount; struct proc *tp; task_t task; /* P's task port. */ mach_port_t msgport; /* P's msgport, or MACH_PORT_NULL if none. */ @@ -884,7 +884,7 @@ kern_return_t S_proc_getloginpids (struct proc *callerp, pid_t id, pid_t **pids, - size_t *npids) + mach_msg_type_number_t *npids) { error_t err = 0; struct proc *l = pid_find (id); @@ -102,7 +102,7 @@ S_proc_reauthenticate (struct proc *p, mach_port_t rendport) struct ids *new_ids; uid_t gubuf[50], aubuf[50], ggbuf[50], agbuf[50]; uid_t *gen_uids, *aux_uids, *gen_gids, *aux_gids; - size_t ngen_uids, naux_uids, ngen_gids, naux_gids; + mach_msg_type_number_t ngen_uids, naux_uids, ngen_gids, naux_gids; if (!p) return EOPNOTSUPP; @@ -352,7 +352,7 @@ S_proc_reauthenticate_reassign (struct proc *p, struct ids *new_ids; uid_t gubuf[50], aubuf[50], ggbuf[50], agbuf[50]; uid_t *gen_uids, *aux_uids, *gen_gids, *aux_gids; - size_t ngen_uids, naux_uids, ngen_gids, naux_gids; + mach_msg_type_number_t ngen_uids, naux_uids, ngen_gids, naux_gids; if (!p) return EOPNOTSUPP; @@ -579,7 +579,7 @@ S_proc_dostop (struct proc *p, thread_t contthread) { thread_t threadbuf[2], *threads = threadbuf; - size_t nthreads = sizeof (threadbuf) / sizeof (thread_t); + mach_msg_type_number_t nthreads = sizeof (threadbuf) / sizeof (thread_t); int i; error_t err; @@ -767,7 +767,7 @@ store_pid (struct proc *p, void *loc) kern_return_t S_proc_getallpids (struct proc *p, pid_t **pids, - size_t *pidslen) + mach_msg_type_number_t *pidslen) { int nprocs; pid_t *loc; @@ -1167,7 +1167,7 @@ struct proc * add_tasks (task_t task) { mach_port_t *psets; - size_t npsets; + mach_msg_type_number_t npsets; int i; struct proc *foundp = 0; @@ -1176,7 +1176,7 @@ add_tasks (task_t task) { mach_port_t psetpriv; mach_port_t *tasks; - size_t ntasks; + mach_msg_type_number_t ntasks; int j; if (!foundp) @@ -39,8 +39,9 @@ check_message_return (struct proc *p, void *availpaddr) static void * tickle_statup (void *statupport) { - startup_essential_task ((mach_port_t) statupport, mach_task_self (), - MACH_PORT_NULL, "proc", _hurd_host_priv); + startup_essential_task ((mach_port_t) (uintptr_t) statupport, + mach_task_self (), MACH_PORT_NULL, + "proc", _hurd_host_priv); return NULL; } diff --git a/proc/pgrp.c b/proc/pgrp.c index ea38625f..a1c9279c 100644 --- a/proc/pgrp.c +++ b/proc/pgrp.c @@ -180,7 +180,7 @@ kern_return_t S_proc_getsessionpids (struct proc *callerp, pid_t sid, pid_t **pids, - size_t *npidsp) + mach_msg_type_number_t *npidsp) { size_t count; struct pgrp *pg; @@ -252,7 +252,7 @@ kern_return_t S_proc_getsessionpgids (struct proc *callerp, pid_t sid, pid_t **pgids, - size_t *npgidsp) + mach_msg_type_number_t *npgidsp) { size_t count; struct proc *p; @@ -319,7 +319,7 @@ kern_return_t S_proc_getpgrppids (struct proc *callerp, pid_t pgid, pid_t **pids, - size_t *npidsp) + mach_msg_type_number_t *npidsp) { struct proc *p; |