X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=include%2Fsys%2Fzfs_context.h;h=ad282c43c4866f7cb0bb526b3da56837605da234;hb=d5446cfc528262ae3a41da31a8524c9d2e793f45;hp=8982c000b1a7863170f09a84efb51828482890b9;hpb=0ef0ff546eeab2f85690d59ee23fe30fa634dd38;p=zfs.git diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index 8982c00..ad282c4 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -24,6 +24,7 @@ */ /* * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ #ifndef _SYS_ZFS_CONTEXT_H @@ -201,6 +202,7 @@ typedef struct proc { } proc_t; extern struct proc p0; +#define curproc (&p0) typedef void (*thread_func_t)(void *); typedef void (*thread_func_arg_t)(void *); @@ -218,7 +220,7 @@ typedef struct kthread { #define thread_exit zk_thread_exit #define thread_create(stk, stksize, func, arg, len, pp, state, pri) \ zk_thread_create(stk, stksize, (thread_func_t)func, arg, \ - len, NULL, state, pri) + len, NULL, state, pri, PTHREAD_CREATE_DETACHED) #define thread_join(t) zk_thread_join(t) #define newproc(f,a,cid,pri,ctp,pid) (ENOSYS) @@ -226,7 +228,7 @@ extern kthread_t *zk_thread_current(void); extern void zk_thread_exit(void); extern kthread_t *zk_thread_create(caddr_t stk, size_t stksize, thread_func_t func, void *arg, size_t len, - proc_t *pp, int state, pri_t pri); + proc_t *pp, int state, pri_t pri, int detachstate); extern void zk_thread_join(kt_did_t tid); #define kpreempt_disable() ((void)0) @@ -493,7 +495,7 @@ typedef struct vsecattr { extern int fop_getattr(vnode_t *vp, vattr_t *vap); -#define VOP_CLOSE(vp, f, c, o, cr, ct) 0 +#define VOP_CLOSE(vp, f, c, o, cr, ct) vn_close(vp) #define VOP_PUTPAGE(vp, of, sz, fl, cr, ct) 0 #define VOP_GETATTR(vp, vap, fl, cr, ct) fop_getattr((vp), (vap));