PERFORCE change 101908 for review
Roman Divacky
rdivacky at FreeBSD.org
Wed Jul 19 10:07:23 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101908
Change 101908 by rdivacky at rdivacky_witten on 2006/07/19 10:06:21
Revert the change to process_exit eventhandler and separate this function
if its used both by process_exit and process_exec.
Affected files ...
.. //depot/projects/soc2006/rdivacky_linuxolator/dev/hwpmc/hwpmc_mod.c#3 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/fs/pseudofs/pseudofs_vncache.c#3 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#17 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/kern/kern_exit.c#5 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/kern/kern_time.c#3 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/kern/sysv_sem.c#5 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_mqueue.c#3 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_sem.c#3 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/kern/vfs_aio.c#4 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/netncp/ncp_subr.c#3 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/sys/eventhandler.h#3 edit
Differences ...
==== //depot/projects/soc2006/rdivacky_linuxolator/dev/hwpmc/hwpmc_mod.c#3 (text+ko) ====
@@ -182,7 +182,7 @@
static void pmc_maybe_remove_owner(struct pmc_owner *po);
static void pmc_process_csw_in(struct thread *td);
static void pmc_process_csw_out(struct thread *td);
-static void pmc_process_exit(void *arg, struct proc *p, struct image_params *imgp);
+static void pmc_process_exit(void *arg, struct proc *p);
static void pmc_process_fork(void *arg, struct proc *p1,
struct proc *p2, int n);
static void pmc_process_samples(int cpu);
@@ -3814,7 +3814,7 @@
*/
static void
-pmc_process_exit(void *arg __unused, struct proc *p, struct image_params *imgp __unused)
+pmc_process_exit(void *arg __unused, struct proc *p)
{
int is_using_hwpmcs;
int cpu;
==== //depot/projects/soc2006/rdivacky_linuxolator/fs/pseudofs/pseudofs_vncache.c#3 (text+ko) ====
@@ -50,7 +50,7 @@
static struct mtx pfs_vncache_mutex;
static struct pfs_vdata *pfs_vncache;
static eventhandler_tag pfs_exit_tag;
-static void pfs_exit(void *arg, struct proc *p, struct image_params *imgp);
+static void pfs_exit(void *arg, struct proc *p);
SYSCTL_NODE(_vfs_pfs, OID_AUTO, vncache, CTLFLAG_RW, 0,
"pseudofs vnode cache");
@@ -224,7 +224,7 @@
* isn't mounted.
*/
static void
-pfs_exit(void *arg, struct proc *p, struct image_params *imgp __unused)
+pfs_exit(void *arg, struct proc *p)
{
struct pfs_vdata *pvd;
struct vnode *vnp;
==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#17 (text+ko) ====
@@ -69,7 +69,7 @@
struct rwlock emul_lock;
static int linux_proc_init(struct thread *, pid_t);
-void linux_proc_exit(void *, struct proc *, struct image_params *);
+void linux_proc_exit(void *, struct proc *);
void linux_userret(void *, struct proc *);
void linux_proc_exec(void *, struct proc *, struct image_params *);
static struct linux_emuldata *em_find(pid_t pid, int locked);
@@ -1141,7 +1141,7 @@
}
void
-linux_proc_exit(void *arg __unused, struct proc *p, struct image_params *imgp __unused)
+linux_proc_exit(void *arg __unused, struct proc *p)
{
struct linux_emuldata *em;
int error;
==== //depot/projects/soc2006/rdivacky_linuxolator/kern/kern_exit.c#5 (text+ko) ====
@@ -234,7 +234,7 @@
* E.g. SYSV IPC stuff
* XXX what if one of these generates an error?
*/
- EVENTHANDLER_INVOKE(process_exit, p, NULL);
+ EVENTHANDLER_INVOKE(process_exit, p);
MALLOC(p->p_ru, struct rusage *, sizeof(struct rusage),
M_ZOMBIE, M_WAITOK);
==== //depot/projects/soc2006/rdivacky_linuxolator/kern/kern_time.c#3 (text+ko) ====
@@ -87,7 +87,8 @@
static void itimer_leave(struct itimer *);
static struct itimer *itimer_find(struct proc *, int, int);
static void itimers_alloc(struct proc *);
-static void itimers_event_hook(void *arg, struct proc *p, struct image_params *imgp);
+static void itimers_event_hook_exec(void *arg, struct proc *p, struct image_params *imgp);
+static void itimers_event_hook_exit(void *arg, struct proc *p);
static int realtimer_create(struct itimer *);
static int realtimer_gettime(struct itimer *, struct itimerspec *);
static int realtimer_settime(struct itimer *, int,
@@ -891,9 +892,9 @@
p31b_setcfg(CTL_P1003_1B_TIMERS, 200112L);
p31b_setcfg(CTL_P1003_1B_DELAYTIMER_MAX, INT_MAX);
p31b_setcfg(CTL_P1003_1B_TIMER_MAX, TIMER_MAX);
- EVENTHANDLER_REGISTER(process_exit, itimers_event_hook,
+ EVENTHANDLER_REGISTER(process_exit, itimers_event_hook_exit,
(void *)ITIMER_EV_EXIT, EVENTHANDLER_PRI_ANY);
- EVENTHANDLER_REGISTER(process_exec, itimers_event_hook,
+ EVENTHANDLER_REGISTER(process_exec, itimers_event_hook_exec,
(void *)ITIMER_EV_EXEC, EVENTHANDLER_PRI_ANY);
}
@@ -1509,9 +1510,15 @@
}
}
+static void
+itimers_event_hook_exec(void *arg, struct proc *p, struct image_params *imgp __unused)
+{
+ itimers_event_hook_exit(arg, p);
+}
+
/* Clean up timers when some process events are being triggered. */
static void
-itimers_event_hook(void *arg, struct proc *p, struct image_params *imgp __unused)
+itimers_event_hook_exit(void *arg, struct proc *p)
{
struct itimers *its;
struct itimer *it;
==== //depot/projects/soc2006/rdivacky_linuxolator/kern/sysv_sem.c#5 (text+ko) ====
@@ -77,7 +77,7 @@
static void seminit(void);
static int sysvsem_modload(struct module *, int, void *);
static int semunload(void);
-static void semexit_myhook(void *arg, struct proc *p, struct image_params *imgp);
+static void semexit_myhook(void *arg, struct proc *p);
static int sysctl_sema(SYSCTL_HANDLER_ARGS);
static int semvalid(int semid, struct semid_kernel *semakptr);
@@ -1299,10 +1299,9 @@
* semaphores.
*/
static void
-semexit_myhook(arg, p, imgp)
+semexit_myhook(arg, p)
void *arg;
struct proc *p;
- struct image_params *imgp;
{
struct sem_undo *suptr;
struct sem_undo **supptr;
==== //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_mqueue.c#3 (text+ko) ====
@@ -247,7 +247,7 @@
int timo);
static void mqueue_send_notification(struct mqueue *mq);
static void mqueue_fdclose(struct thread *td, int fd, struct file *fp);
-static void mq_proc_exit(void *arg, struct proc *p, struct image_params *imgp);
+static void mq_proc_exit(void *arg, struct proc *p);
/*
* kqueue filters
@@ -2280,7 +2280,7 @@
}
static void
-mq_proc_exit(void *arg __unused, struct proc *p, struct image_params *imgp __unused)
+mq_proc_exit(void *arg __unused, struct proc *p)
{
struct filedesc *fdp;
struct file *fp;
==== //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_sem.c#3 (text+ko) ====
@@ -71,7 +71,8 @@
static int sem_perm(struct thread *td, struct ksem *ks);
static void sem_enter(struct proc *p, struct ksem *ks);
static int sem_leave(struct proc *p, struct ksem *ks);
-static void sem_exithook(void *arg, struct proc *p, struct image_params *imgp);
+static void sem_exechook(void *arg, struct proc *p, struct image_params *imgp);
+static void sem_exithook(void *arg, struct proc *p);
static void sem_forkhook(void *arg, struct proc *p1, struct proc *p2,
int flags);
static int sem_hasopen(struct thread *td, struct ksem *ks);
@@ -921,6 +922,12 @@
static void
sem_exithook(void *arg, struct proc *p, struct image_params *imgp __unused)
{
+ sem_exechook(arg, p);
+}
+
+static void
+sem_exechook(void *arg, struct proc *p)
+{
struct ksem *ks, *ksnext;
mtx_lock(&sem_lock);
==== //depot/projects/soc2006/rdivacky_linuxolator/kern/vfs_aio.c#4 (text+ko) ====
@@ -321,7 +321,8 @@
static int aio_aqueue(struct thread *td, struct aiocb *job,
struct aioliojob *lio, int type, int osigev);
static void aio_physwakeup(struct buf *bp);
-static void aio_proc_rundown(void *arg, struct proc *p, struct image_params *imgp);
+static void aio_proc_rundown(void *arg, struct proc *p);
+static void aio_proc_rundown_exec(void *arg, struct proc *p, struct image_params *imgp);
static int aio_qphysio(struct proc *p, struct aiocblist *iocb);
static void biohelper(void *, int);
static void aio_daemon(void *param);
@@ -419,7 +420,7 @@
aio_swake = &aio_swake_cb;
exit_tag = EVENTHANDLER_REGISTER(process_exit, aio_proc_rundown, NULL,
EVENTHANDLER_PRI_ANY);
- exec_tag = EVENTHANDLER_REGISTER(process_exec, aio_proc_rundown, NULL,
+ exec_tag = EVENTHANDLER_REGISTER(process_exec, aio_proc_rundown_exec, NULL,
EVENTHANDLER_PRI_ANY);
kqueue_add_filteropts(EVFILT_AIO, &aio_filtops);
kqueue_add_filteropts(EVFILT_LIO, &lio_filtops);
@@ -630,11 +631,17 @@
return (0);
}
+static void
+aio_proc_rundown_exec(void *arg, struct proc *p, struct image_params *imgp __unused)
+{
+ aio_proc_rundown(arg, p);
+}
+
/*
* Rundown the jobs for a given process.
*/
static void
-aio_proc_rundown(void *arg, struct proc *p, struct image_params *imgp __unused)
+aio_proc_rundown(void *arg, struct proc *p)
{
struct kaioinfo *ki;
struct aioliojob *lj;
==== //depot/projects/soc2006/rdivacky_linuxolator/netncp/ncp_subr.c#3 (text+ko) ====
@@ -57,7 +57,7 @@
struct callout_handle ncp_timer_handle;
static eventhandler_tag ncp_exit_tag;
-static void ncp_at_exit(void *arg, struct proc *p, struct image_params *imgp);
+static void ncp_at_exit(void *arg, struct proc *p);
static void ncp_timer(void *arg);
/*
@@ -80,7 +80,7 @@
void
-ncp_at_exit(void *arg, struct proc *p, struct image_params *imgp __unused)
+ncp_at_exit(void *arg, struct proc *p)
{
struct ncp_conn *ncp, *nncp;
struct thread *td;
==== //depot/projects/soc2006/rdivacky_linuxolator/sys/eventhandler.h#3 (text+ko) ====
@@ -164,7 +164,7 @@
struct proc;
struct image_params;
-typedef void (*exitlist_fn)(void *, struct proc *, struct image_params *);
+typedef void (*exitlist_fn)(void *, struct proc *);
typedef void (*forklist_fn)(void *, struct proc *, struct proc *, int);
typedef void (*execlist_fn)(void *, struct proc *, struct image_params *);
More information about the p4-projects
mailing list