Statically initalize the systrace lock. systrace_init() is now not
needed on NetBSD. Remove the call from main().
This commit is contained in:
parent
bdfb565183
commit
959eb5dd8e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: init_main.c,v 1.257 2005/11/25 20:13:54 thorpej Exp $ */
|
||||
/* $NetBSD: init_main.c,v 1.258 2005/11/25 20:32:32 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
|
||||
@ -71,7 +71,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.257 2005/11/25 20:13:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.258 2005/11/25 20:32:32 thorpej Exp $");
|
||||
|
||||
#include "opt_ipsec.h"
|
||||
#include "opt_sysv.h"
|
||||
@ -353,10 +353,6 @@ main(void)
|
||||
/* Initialize system accouting. */
|
||||
acct_init();
|
||||
|
||||
#ifdef SYSTRACE
|
||||
systrace_init();
|
||||
#endif
|
||||
|
||||
/* Kick off timeout driven events by calling first time. */
|
||||
schedcpu(NULL);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_systrace.c,v 1.46 2005/06/27 17:11:21 elad Exp $ */
|
||||
/* $NetBSD: kern_systrace.c,v 1.47 2005/11/25 20:32:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002, 2003 Niels Provos <provos@citi.umich.edu>
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.46 2005/06/27 17:11:21 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.47 2005/11/25 20:32:33 thorpej Exp $");
|
||||
|
||||
#include "opt_systrace.h"
|
||||
|
||||
@ -202,14 +202,17 @@ POOL_INIT(systr_policy_pl, sizeof(struct str_policy), 0, 0, 0, "strpolpl",
|
||||
NULL);
|
||||
POOL_INIT(systr_msgcontainer_pl, sizeof(struct str_msgcontainer), 0, 0, 0,
|
||||
"strmsgpl", NULL);
|
||||
#else
|
||||
|
||||
struct lock systrace_lck = LOCK_INITIALIZER(PLOCK, "systrace", 0, 0);
|
||||
#else /* ! __NetBSD__ */
|
||||
struct pool systr_proc_pl;
|
||||
struct pool systr_policy_pl;
|
||||
struct pool systr_msgcontainer_pl;
|
||||
#endif
|
||||
|
||||
struct lock systrace_lck;
|
||||
#endif /* __NetBSD__ */
|
||||
|
||||
int systrace_debug = 0;
|
||||
struct lock systrace_lck;
|
||||
|
||||
#ifdef __NetBSD__
|
||||
const struct cdevsw systrace_cdevsw = {
|
||||
@ -546,20 +549,21 @@ systrace_unlock(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef __NetBSD__
|
||||
void
|
||||
systrace_init(void)
|
||||
{
|
||||
|
||||
#ifndef __NetBSD__
|
||||
pool_init(&systr_proc_pl, sizeof(struct str_process), 0, 0, 0,
|
||||
"strprocpl", NULL);
|
||||
pool_init(&systr_policy_pl, sizeof(struct str_policy), 0, 0, 0,
|
||||
"strpolpl", NULL);
|
||||
pool_init(&systr_msgcontainer_pl, sizeof(struct str_msgcontainer),
|
||||
0, 0, 0, "strmsgpl", NULL);
|
||||
#endif
|
||||
|
||||
lockinit(&systrace_lck, PLOCK, "systrace", 0, 0);
|
||||
}
|
||||
#endif /* ! __NetBSD__ */
|
||||
|
||||
int
|
||||
systraceopen(dev_t dev, int flag, int mode, struct proc *p)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: systrace.h,v 1.15 2005/06/30 18:20:24 elad Exp $ */
|
||||
/* $NetBSD: systrace.h,v 1.16 2005/11/25 20:32:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
|
||||
@ -228,7 +228,9 @@ void systrace_namei(struct nameidata *);
|
||||
void systrace_exit(struct proc *, register_t, void *, register_t [], int);
|
||||
void systrace_sys_exit(struct proc *);
|
||||
void systrace_sys_fork(struct proc *, struct proc *);
|
||||
#ifndef __NetBSD__
|
||||
void systrace_init(void);
|
||||
#endif /* ! __NetBSD__ */
|
||||
void systrace_execve0(struct proc *);
|
||||
void systrace_execve1(char *, struct proc *);
|
||||
int systrace_scriptname(struct proc *, char *);
|
||||
|
Loading…
x
Reference in New Issue
Block a user