summaryrefslogtreecommitdiff
path: root/StdLib/Include/Ipf/machine/intr.h
diff options
context:
space:
mode:
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-27 21:42:16 +0000
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-27 21:42:16 +0000
commit2aa62f2bc9a9654687b377d9ca8a8c2c860a3852 (patch)
tree62a0991a44327154fb88bf95bd6f7522053db7bb /StdLib/Include/Ipf/machine/intr.h
parent98790d814871cc30bbd536673d3a0948047cd2f0 (diff)
downloadedk2-platforms-2aa62f2bc9a9654687b377d9ca8a8c2c860a3852.tar.xz
Standard Libraries for EDK II.
This set of three packages: AppPkg, StdLib, StdLibPrivateInternalFiles; contains the implementation of libraries based upon non-UEFI standards such as ISO/IEC-9899, the library portion of the C Language Standard, POSIX, etc. AppPkg contains applications that make use of the standard libraries defined in the StdLib Package. StdLib contains header (include) files and the implementations of the standard libraries. StdLibPrivateInternalFiles contains files for the exclusive use of the library implementations in StdLib. These files should never be directly referenced from applications or other code. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11600 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/Include/Ipf/machine/intr.h')
-rw-r--r--StdLib/Include/Ipf/machine/intr.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/StdLib/Include/Ipf/machine/intr.h b/StdLib/Include/Ipf/machine/intr.h
new file mode 100644
index 0000000000..a7ca5cfcf4
--- /dev/null
+++ b/StdLib/Include/Ipf/machine/intr.h
@@ -0,0 +1,60 @@
+/* $NetBSD: intr.h,v 1.1 2006/04/07 14:21:18 cherry Exp $ */
+
+/* XXX: cherry: To Be fixed when we switch on interrupts. */
+
+#ifndef _IA64_INTR_H_
+#define _IA64_INTR_H_
+
+#define IPL_NONE 0 /* XXX: Placeholder */
+#define IPL_BIO 0 /* XXX: Placeholder */
+#define IPL_NET 0 /* XXX: Placeholder */
+#define IPL_TTY 0 /* XXX: Placeholder */
+#define IPL_CLOCK 0 /* XXX: Placeholder */
+#define IPL_HIGH 0 /* XXX: Placeholder */
+#define IPL_SERIAL 0 /* XXX: Placeholder */
+#define IPL_SCHED 0 /* XXX: Placeholder */
+#define IPL_VM 0 /* XXX: Placeholder */
+
+#define IPL_SOFTCLOCK 0 /* XXX: Placeholder */
+#define IPL_SOFTNET 0 /* XXX: Placeholder */
+#define IPL_SOFTSERIAL 0 /* XXX: Placeholder */
+
+static __inline int splraise(int dummy) { return 0; }
+static __inline void spllower(int dummy) { }
+
+/*
+ * Hardware interrupt masks
+ */
+#define splbio() splraise(IPL_BIO)
+#define splnet() splraise(IPL_NET)
+#define spltty() splraise(IPL_TTY)
+#define splaudio() splraise(IPL_AUDIO)
+#define splclock() splraise(IPL_CLOCK)
+#define splstatclock() splclock()
+#define splserial() splraise(IPL_SERIAL)
+#define splipi() splraise(IPL_IPI)
+
+
+/*
+ * Miscellaneous
+ */
+#define splvm() splraise(IPL_VM)
+#define splhigh() splraise(IPL_HIGH)
+#define spl0() spllower(IPL_NONE)
+#define splsched() splraise(IPL_SCHED)
+#define spllock() splhigh()
+#define splx(x) spllower(x)
+
+/*
+ * Software interrupt masks
+ *
+ * NOTE: spllowersoftclock() is used by hardclock() to lower the priority from
+ * clock to softclock before it calls softclock().
+ */
+
+#define spllowersoftclock() spllower(IPL_SOFTCLOCK)
+#define splsoftclock() splraise(IPL_SOFTCLOCK)
+#define splsoftnet() splraise(IPL_SOFTNET)
+#define splsoftserial() splraise(IPL_SOFTSERIAL)
+
+#endif /* ! _IA64_INTR_H_ */