283 extern int rw_tryenter(krwlock_t *rwlp, krw_t rw);
284 extern int rw_tryupgrade(krwlock_t *rwlp);
285 extern void rw_exit(krwlock_t *rwlp);
286 #define rw_downgrade(rwlp) do { } while (0)
287
288 extern uid_t crgetuid(cred_t *cr);
289 extern gid_t crgetgid(cred_t *cr);
290 extern int crgetngroups(cred_t *cr);
291 extern gid_t *crgetgroups(cred_t *cr);
292
293 /*
294 * Condition variables
295 */
296 typedef cond_t kcondvar_t;
297
298 #define CV_DEFAULT USYNC_THREAD
299
300 extern void cv_init(kcondvar_t *cv, char *name, int type, void *arg);
301 extern void cv_destroy(kcondvar_t *cv);
302 extern void cv_wait(kcondvar_t *cv, kmutex_t *mp);
303 extern clock_t cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime);
304 extern void cv_signal(kcondvar_t *cv);
305 extern void cv_broadcast(kcondvar_t *cv);
306
307 /*
308 * kstat creation, installation and deletion
309 */
310 extern kstat_t *kstat_create(char *, int,
311 char *, char *, uchar_t, ulong_t, uchar_t);
312 extern void kstat_install(kstat_t *);
313 extern void kstat_delete(kstat_t *);
314
315 /*
316 * Kernel memory
317 */
318 #define KM_SLEEP UMEM_NOFAIL
319 #define KM_PUSHPAGE KM_SLEEP
320 #define KM_NOSLEEP UMEM_DEFAULT
321 #define KMC_NODEBUG UMC_NODEBUG
322 #define KMC_NOTOUCH 0 /* not needed for userland caches */
|
283 extern int rw_tryenter(krwlock_t *rwlp, krw_t rw);
284 extern int rw_tryupgrade(krwlock_t *rwlp);
285 extern void rw_exit(krwlock_t *rwlp);
286 #define rw_downgrade(rwlp) do { } while (0)
287
288 extern uid_t crgetuid(cred_t *cr);
289 extern gid_t crgetgid(cred_t *cr);
290 extern int crgetngroups(cred_t *cr);
291 extern gid_t *crgetgroups(cred_t *cr);
292
293 /*
294 * Condition variables
295 */
296 typedef cond_t kcondvar_t;
297
298 #define CV_DEFAULT USYNC_THREAD
299
300 extern void cv_init(kcondvar_t *cv, char *name, int type, void *arg);
301 extern void cv_destroy(kcondvar_t *cv);
302 extern void cv_wait(kcondvar_t *cv, kmutex_t *mp);
303 extern int cv_wait_sig(kcondvar_t *cv, kmutex_t *mp);
304 extern clock_t cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime);
305 extern void cv_signal(kcondvar_t *cv);
306 extern void cv_broadcast(kcondvar_t *cv);
307
308 /*
309 * kstat creation, installation and deletion
310 */
311 extern kstat_t *kstat_create(char *, int,
312 char *, char *, uchar_t, ulong_t, uchar_t);
313 extern void kstat_install(kstat_t *);
314 extern void kstat_delete(kstat_t *);
315
316 /*
317 * Kernel memory
318 */
319 #define KM_SLEEP UMEM_NOFAIL
320 #define KM_PUSHPAGE KM_SLEEP
321 #define KM_NOSLEEP UMEM_DEFAULT
322 #define KMC_NODEBUG UMC_NODEBUG
323 #define KMC_NOTOUCH 0 /* not needed for userland caches */
|