aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/proc.h
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2002-11-08 19:00:17 +0000
committerRobert Watson <rwatson@FreeBSD.org>2002-11-08 19:00:17 +0000
commit52378b8acd1fd13abecdfa874439930f7760d894 (patch)
treebb1b1d9947625f618e2a321ff0eb85de1e4b9c53 /sys/sys/proc.h
parent7593f63c911eee0a9b9ecfc02b1dc91ccba33c7e (diff)
downloadsrc-52378b8acd1fd13abecdfa874439930f7760d894.tar.gz
src-52378b8acd1fd13abecdfa874439930f7760d894.zip
To reduce per-return overhead of userret(), call into
mac_thread_userret() only if PS_MACPEND is set in the process AST mask. This avoids the cost of the entry point in the common case, but requires policies interested in the userret event to set the flag (protected by the scheduler lock) if they do want the event. Since all the policies that we're working with which use mac_thread_userret() use the entry point only selectively to perform operations deferred for locking reasons, this maintains the desired semantics. Approved by: re Requested by: bde Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Notes
Notes: svn path=/head/; revision=106655
Diffstat (limited to 'sys/sys/proc.h')
-rw-r--r--sys/sys/proc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index aa824d38abd4..dd129def1247 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -646,6 +646,7 @@ struct proc {
#define PS_SWAPPING 0x00200 /* Process is being swapped. */
#define PS_NEEDSIGCHK 0x02000 /* Process may need signal delivery. */
#define PS_SWAPPINGIN 0x04000 /* Swapin in progress. */
+#define PS_MACPEND 0x08000 /* Ast()-based MAC event pending. */
/* used only in legacy conversion code */
#define SIDL 1 /* Process being created by fork. */