summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-02-10 02:15:18 +0000
committerjhb <jhb@FreeBSD.org>2001-02-10 02:15:18 +0000
commit5f9a24a51ce42e61de3d01ef8d0963b752b9023e (patch)
tree8199f280eb38541f652a3416510c8ef253732810 /sys
parentb8bd5d2b4448a538b517e75ccd9023c33f6cc574 (diff)
downloadFreeBSD-src-5f9a24a51ce42e61de3d01ef8d0963b752b9023e.zip
FreeBSD-src-5f9a24a51ce42e61de3d01ef8d0963b752b9023e.tar.gz
Add a macro mtx_intr_enable() to alter a spin lock such that interrupts
will be enabled when it is released.
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/include/mutex.h1
-rw-r--r--sys/amd64/include/mutex.h1
-rw-r--r--sys/i386/include/mutex.h1
-rw-r--r--sys/powerpc/include/mutex.h1
4 files changed, 4 insertions, 0 deletions
diff --git a/sys/alpha/include/mutex.h b/sys/alpha/include/mutex.h
index 564ad19..2c1a302 100644
--- a/sys/alpha/include/mutex.h
+++ b/sys/alpha/include/mutex.h
@@ -48,6 +48,7 @@
#define mtx_legal2block() \
((alpha_pal_rdps() & ALPHA_PSL_IPL_MASK) == ALPHA_PSL_IPL_0)
+#define mtx_intr_enable(mutex) (mutex)->mtx_saveintr = ALPHA_PSL_IPL_0
/*
* Assembly macros (for internal use only)
diff --git a/sys/amd64/include/mutex.h b/sys/amd64/include/mutex.h
index c4fe210..f0bbadb 100644
--- a/sys/amd64/include/mutex.h
+++ b/sys/amd64/include/mutex.h
@@ -49,6 +49,7 @@ extern struct mtx clock_lock;
"mpp->mtx_saveintr & PSL_I")
#define mtx_legal2block() (read_eflags() & PSL_I)
+#define mtx_intr_enable(mutex) (mutex)->mtx_saveintr |= PSL_I
/*
* Assembly macros (for internal use only)
diff --git a/sys/i386/include/mutex.h b/sys/i386/include/mutex.h
index c4fe210..f0bbadb 100644
--- a/sys/i386/include/mutex.h
+++ b/sys/i386/include/mutex.h
@@ -49,6 +49,7 @@ extern struct mtx clock_lock;
"mpp->mtx_saveintr & PSL_I")
#define mtx_legal2block() (read_eflags() & PSL_I)
+#define mtx_intr_enable(mutex) (mutex)->mtx_saveintr |= PSL_I
/*
* Assembly macros (for internal use only)
diff --git a/sys/powerpc/include/mutex.h b/sys/powerpc/include/mutex.h
index 564ad19..2c1a302 100644
--- a/sys/powerpc/include/mutex.h
+++ b/sys/powerpc/include/mutex.h
@@ -48,6 +48,7 @@
#define mtx_legal2block() \
((alpha_pal_rdps() & ALPHA_PSL_IPL_MASK) == ALPHA_PSL_IPL_0)
+#define mtx_intr_enable(mutex) (mutex)->mtx_saveintr = ALPHA_PSL_IPL_0
/*
* Assembly macros (for internal use only)
OpenPOWER on IntegriCloud