summaryrefslogtreecommitdiffstats
path: root/sys/i4b/include/i4b_global.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i4b/include/i4b_global.h')
-rw-r--r--sys/i4b/include/i4b_global.h44
1 files changed, 39 insertions, 5 deletions
diff --git a/sys/i4b/include/i4b_global.h b/sys/i4b/include/i4b_global.h
index e386b38..b13ac0e 100644
--- a/sys/i4b/include/i4b_global.h
+++ b/sys/i4b/include/i4b_global.h
@@ -27,19 +27,22 @@
* i4b_global.h - i4b global include file
* --------------------------------------
*
- * $Id: i4b_global.h,v 1.19 1999/02/27 11:08:01 hm Exp $
+ * $Id: i4b_global.h,v 1.21 1999/04/26 10:16:54 hm Exp $
*
- * last edit-date: [Sun Feb 14 10:03:55 1999]
+ * last edit-date: [Mon Apr 26 11:10:26 1999]
*
*---------------------------------------------------------------------------*/
#ifndef _I4B_GLOBAL_H_
#define _I4B_GLOBAL_H_
-#define SPLI4B() splimp() /* spl for i4b */
+/*---------------------------------------------------------------------------*
+ * hiding OS differences in the kernel
+ *---------------------------------------------------------------------------*/
-#define TIMER_IDLE 1 /* a timer is running */
-#define TIMER_ACTIVE 2 /* a timer is idle */
+/*---------------*/
+/* time handling */
+/*---------------*/
#ifdef __FreeBSD__
#include <sys/param.h>
@@ -66,6 +69,37 @@
#endif /* __NetBSD__ */
+/*----------------------*/
+/* poll/select handling */
+/*----------------------*/
+
+#if (defined(__FreeBSD__) && \
+ (!defined(__FreeBSD_version) || (__FreeBSD_version < 300001))) \
+ || defined (__OpenBSD__) || defined(__bsdi__)
+#define OS_USES_SELECT
+#else
+#define OS_USES_POLL
+#endif
+
+/*---------------------------------------------------------------------------*
+ * misc globally used things in the kernel
+ *---------------------------------------------------------------------------*/
+
+/* timer states */
+
+#define TIMER_IDLE 1 /* a timer is running */
+#define TIMER_ACTIVE 2 /* a timer is idle */
+
+/* i4b's spl */
+
+#define SPLI4B() splimp() /* spl for i4b */
+
+/* critial code region handling macros */
+
+#define CRIT_VAR int _svd_spl_ /* declare variable */
+#define CRIT_BEG _svd_spl_ = SPLI4B() /* save spl */
+#define CRIT_END splx(_svd_spl_) /* restore spl */
+
/* definitions for the STATUS indications L1 -> L2 -> L3 */
#define STI_ATTACH 0 /* attach at boot time */
OpenPOWER on IntegriCloud