commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 14/98: proc: turn count_up and store_pid into normal functions


From: Samuel Thibault
Subject: [hurd] 14/98: proc: turn count_up and store_pid into normal functions
Date: Tue, 14 Jan 2014 01:59:58 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 5d255e321ace772df825d4ac2604b451bde7ba15
Author: Justus Winter <address@hidden>
Date:   Wed Nov 6 13:14:30 2013 +0100

    proc: turn count_up and store_pid into normal functions
    
    Previously count_up and store_pid were defined inside
    S_proc_getallpids. Move them out of that function and declare them
    static.
    
    * proc/mgt.c: Turn count_up and store_pid into normal functions.
---
 proc/mgt.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/proc/mgt.c b/proc/mgt.c
index 5db1fe8..11b2f39 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);

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]