summaryrefslogtreecommitdiffstats
path: root/sys/sys/sysent.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-06-28 18:06:46 +0000
committerkib <kib@FreeBSD.org>2010-06-28 18:06:46 +0000
commitb6d8416eac525c06902bf03315b88189e10545e3 (patch)
tree2ffebda973ea179d4a39ddccaf5d3e9279811ad0 /sys/sys/sysent.h
parent2774f04de78aab6af0f10e1129f45bf8be19aae5 (diff)
downloadFreeBSD-src-b6d8416eac525c06902bf03315b88189e10545e3.zip
FreeBSD-src-b6d8416eac525c06902bf03315b88189e10545e3.tar.gz
Count number of threads that enter and leave dynamically registered
syscalls. On the dynamic syscall deregistration, wait until all threads leave the syscall code. This somewhat increases the safety of the loadable modules unloading. Reviewed by: jhb Tested by: pho MFC after: 1 month
Diffstat (limited to 'sys/sys/sysent.h')
-rw-r--r--sys/sys/sysent.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index 99e44a0..641bdae 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -61,8 +61,15 @@ struct sysent { /* system call table */
u_int32_t sy_entry; /* DTrace entry ID for systrace. */
u_int32_t sy_return; /* DTrace return ID for systrace. */
u_int32_t sy_flags; /* General flags for system calls. */
+ u_int32_t sy_thrcnt;
};
+#define SY_THR_FLAGMASK 0x7
+#define SY_THR_STATIC 0x1
+#define SY_THR_DRAINING 0x2
+#define SY_THR_ABSENT 0x4
+#define SY_THR_INCR 0x8
+
struct image_params;
struct __sigset;
struct syscall_args;
@@ -211,6 +218,9 @@ struct nosys_args;
int lkmnosys(struct thread *, struct nosys_args *);
int lkmressys(struct thread *, struct nosys_args *);
+int syscall_thread_enter(struct thread *td, struct sysent *se);
+void syscall_thread_exit(struct thread *td, struct sysent *se);
+
#endif /* _KERNEL */
#endif /* !_SYS_SYSENT_H_ */
OpenPOWER on IntegriCloud