summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proc/mgt.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/proc/mgt.c b/proc/mgt.c
index 5db1fe8c..11b2f397 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -516,6 +516,20 @@ S_proc_exception_raise (mach_port_t excport,
}
+/* This function is used as callback in S_proc_getallpids. */
+static void
+count_up (struct proc *p, void *counter)
+{
+ ++*(int *)counter;
+}
+
+/* This function is used as callback in S_proc_getallpids. */
+static void
+store_pid (struct proc *p, void *loc)
+{
+ *(*(pid_t **)loc)++ = p->p_pid;
+}
+
/* Implement proc_getallpids as described in <hurd/process.defs>. */
kern_return_t
S_proc_getallpids (struct proc *p,
@@ -525,15 +539,6 @@ S_proc_getallpids (struct proc *p,
int nprocs;
pid_t *loc;
- void count_up (struct proc *p, void *counter)
- {
- ++*(int *)counter;
- }
- void store_pid (struct proc *p, void *loc)
- {
- *(*(pid_t **)loc)++ = p->p_pid;
- }
-
/* No need to check P here; we don't use it. */
add_tasks (0);