[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
- [hurd] 48/98: libports: another right leak fix, (continued)
- [hurd] 48/98: libports: another right leak fix, Samuel Thibault, 2014/01/13
- [hurd] 73/98: trans: improve the error handling in fakeauth, Samuel Thibault, 2014/01/13
- [hurd] 06/98: proc: fix the declaraton of genpid, Samuel Thibault, 2014/01/13
- [hurd] 71/98: trans: fix locking in fakeroot's netfs_S_dir_lookup, Samuel Thibault, 2014/01/13
- [hurd] 70/98: trans: fix reference counting and destruction of fake nodes, Samuel Thibault, 2014/01/13
- [hurd] 77/98: trans/fakeroot: fix ownership of newly created files, Samuel Thibault, 2014/01/13
- [hurd] 64/98: libihash: remove dead code, Samuel Thibault, 2014/01/13
- [hurd] 74/98: trans: unlock nodes with faked attributes in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 75/98: console-client: remove spurious pthread_spin_unlocks, Samuel Thibault, 2014/01/13
- [hurd] 62/98: trans: make the fakeroot environment more transparent, Samuel Thibault, 2014/01/13
- [hurd] 14/98: proc: turn count_up and store_pid into normal functions,
Samuel Thibault <=
- [hurd] 67/98: trans: handle invalid responses to dir_lookup requests in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 78/98: trans/fakeroot: drop else, Samuel Thibault, 2014/01/13
- [hurd] 13/98: term: fix error handling in hurdio_mdmctl, Samuel Thibault, 2014/01/13
- [hurd] 08/98: proc: fix error handling in S_proc_exception_raise, Samuel Thibault, 2014/01/13
- [hurd] 07/98: proc: fix a use-after-free error, Samuel Thibault, 2014/01/13
- [hurd] 18/98: libdiskfs: remove dead assignment, Samuel Thibault, 2014/01/13
- [hurd] 60/98: trans: fix the creation of files in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 69/98: trans: return nodes locked when creating fake nodes in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 20/98: ext2fs: fix error handling, Samuel Thibault, 2014/01/13
- [hurd] 21/98: libshouldbeinlibc: fix dead assignment, Samuel Thibault, 2014/01/13