73 kmutex_t acct_list_lock;
74
75 static struct sysent acctsysent = {
76 1,
77 SE_NOUNLOAD | SE_ARGC | SE_32RVAL1,
78 sysacct
79 };
80
81 static struct modlsys modlsys = {
82 &mod_syscallops, "acct(2) syscall", &acctsysent
83 };
84
85 #ifdef _SYSCALL32_IMPL
86 static struct modlsys modlsys32 = {
87 &mod_syscallops32, "32-bit acct(2) syscall", &acctsysent
88 };
89 #endif
90
91 static struct modlinkage modlinkage = {
92 MODREV_1,
93 &modlsys,
94 #ifdef _SYSCALL32_IMPL
95 &modlsys32,
96 #endif
97 NULL
98 };
99
100 /*ARGSUSED*/
101 static void *
102 acct_init(zoneid_t zoneid)
103 {
104 struct acct_globals *ag;
105
106 ag = kmem_alloc(sizeof (*ag), KM_SLEEP);
107 bzero(&ag->acctbuf, sizeof (ag->acctbuf));
108 mutex_init(&ag->aclock, NULL, MUTEX_DEFAULT, NULL);
109 ag->acctvp = NULL;
110
111 mutex_enter(&acct_list_lock);
112 list_insert_tail(&acct_list, ag);
113 mutex_exit(&acct_list_lock);
114 return (ag);
115 }
116
117 /* ARGSUSED */
|
73 kmutex_t acct_list_lock;
74
75 static struct sysent acctsysent = {
76 1,
77 SE_NOUNLOAD | SE_ARGC | SE_32RVAL1,
78 sysacct
79 };
80
81 static struct modlsys modlsys = {
82 &mod_syscallops, "acct(2) syscall", &acctsysent
83 };
84
85 #ifdef _SYSCALL32_IMPL
86 static struct modlsys modlsys32 = {
87 &mod_syscallops32, "32-bit acct(2) syscall", &acctsysent
88 };
89 #endif
90
91 static struct modlinkage modlinkage = {
92 MODREV_1,
93 { &modlsys,
94 #ifdef _SYSCALL32_IMPL
95 &modlsys32,
96 #endif
97 NULL
98 }
99 };
100
101 /*ARGSUSED*/
102 static void *
103 acct_init(zoneid_t zoneid)
104 {
105 struct acct_globals *ag;
106
107 ag = kmem_alloc(sizeof (*ag), KM_SLEEP);
108 bzero(&ag->acctbuf, sizeof (ag->acctbuf));
109 mutex_init(&ag->aclock, NULL, MUTEX_DEFAULT, NULL);
110 ag->acctvp = NULL;
111
112 mutex_enter(&acct_list_lock);
113 list_insert_tail(&acct_list, ag);
114 mutex_exit(&acct_list_lock);
115 return (ag);
116 }
117
118 /* ARGSUSED */
|