aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/kse.h
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2003-04-21 07:27:59 +0000
committerDavid Xu <davidxu@FreeBSD.org>2003-04-21 07:27:59 +0000
commit1ecb38a3654dce8df5ad4857b48c2601f8a2d46c (patch)
treea648d5aaf81e6ea53d50e99c01210ec4ccf6b301 /sys/sys/kse.h
parentbb3578eb6584f1960c283347887dbca6d5070a7e (diff)
downloadsrc-1ecb38a3654dce8df5ad4857b48c2601f8a2d46c.tar.gz
src-1ecb38a3654dce8df5ad4857b48c2601f8a2d46c.zip
Introduce two flags to control upcall behaviour:
o KMF_NOUPCALL Ask kse_release to not return to userland upcall entry, but instead direct returns to userland by using current thread's stack and return address on stack. This flags is intended to be used by UTS in critical region to wait another UTS thread to leave critical region, by using kse_release with this flag to avoid spinnng and burning CPU. Also this flags can be used by UTS to poll completed context when there is nothing to do in userland and needn't restart from its entry like normal upcall. o KMF_NOCOMPLETED Ask kernel to not bring completed thread contexts back to userland when doing upcall, this flags is intend to be used with above flag when an upcall thread is in critical region and can not process completed contexts at that time. Tested by: deischen
Notes
Notes: svn path=/head/; revision=113793
Diffstat (limited to 'sys/sys/kse.h')
-rw-r--r--sys/sys/kse.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/kse.h b/sys/sys/kse.h
index 8e96525d71e9..a69adcdcde88 100644
--- a/sys/sys/kse.h
+++ b/sys/sys/kse.h
@@ -85,6 +85,10 @@ struct kse_mailbox {
#define KSE_VER_0 0
#define KSE_VERSION KSE_VER_0
+/* These flags are kept in km_flags */
+#define KMF_NOUPCALL 0x01
+#define KMF_NOCOMPLETED 0x02
+
#ifndef _KERNEL
int kse_create(struct kse_mailbox *, int);
int kse_exit(void);