/* Start a clock we can use for timeouts */
}
-
-extern unsigned bio_imask; /* group of interrupts masked with splbio() */
-extern unsigned cpl; /* current priority level mask */
-extern volatile unsigned idelayed; /* interrupts to become pending */
-extern volatile unsigned ipending; /* active interrupts masked by cpl */
-extern unsigned net_imask; /* group of interrupts masked with splimp() */
-extern unsigned stat_imask; /* interrupts masked with splstatclock() */
-extern unsigned tty_imask; /* group of interrupts masked with spltty() */
-
-/*
- * ipending has to be volatile so that it is read every time it is accessed
- * in splx() and spl0(), but we don't want it to be read nonatomically when
- * it is changed. Pretending that ipending is a plain int happens to give
- * suitable atomic code for "ipending |= constant;".
- */
-#define setdelayed() (*(unsigned *)&ipending |= loadandclear(&idelayed))
-#define setsoftast() (*(unsigned *)&ipending |= SWI_AST_PENDING)
-#define setsoftclock() (*(unsigned *)&ipending |= SWI_CLOCK_PENDING)
-#define setsoftnet() (*(unsigned *)&ipending |= SWI_NET_PENDING)
-#define setsofttty() (*(unsigned *)&ipending |= SWI_TTY_PENDING)
-
-#define schedsofttty() (*(unsigned *)&idelayed |= SWI_TTY_PENDING)
-
-#define GENSPL(name, set_cpl) \
-static __inline int name(void) \
-{ \
- unsigned x; \
- \
- __asm __volatile("" : : : "memory"); \
- x = cpl; \
- set_cpl; \
- return (x); \
-}
-
-void splz(void) {
- OS_DbgPrint(OSK_MID_TRACE,("Called SPLZ\n"));
-}
-
-/*
- * functions to save and restore the current cpl
- */
-void save_cpl(unsigned *x)
-{
- *x = cpl;
-}
-
-void restore_cpl(unsigned x)
-{
- cpl = x;
-}