#define _IOKIT_IOSHAREDLOCKIMP_H
#include <architecture/ppc/asm_help.h>
+#ifdef KERNEL
+#undef END
+#include <mach/ppc/asm.h>
+#endif
-// 'Till we're building in kernel
.macro DISABLE_PREEMPTION
#ifdef KERNEL
+ stwu r1,-(FM_SIZE)(r1)
+ mflr r0
+ stw r3,FM_ARG0(r1)
+ stw r0,(FM_SIZE+FM_LR_SAVE)(r1)
+ bl EXT(_disable_preemption)
+ lwz r3,FM_ARG0(r1)
+ lwz r1,0(r1)
+ lwz r0,FM_LR_SAVE(r1)
+ mtlr r0
#endif
.endmacro
.macro ENABLE_PREEMPTION
#ifdef KERNEL
+ stwu r1,-(FM_SIZE)(r1)
+ mflr r0
+ stw r3,FM_ARG0(r1)
+ stw r0,(FM_SIZE+FM_LR_SAVE)(r1)
+ bl EXT(_enable_preemption)
+ lwz r3,FM_ARG0(r1)
+ lwz r1,0(r1)
+ lwz r0,FM_LR_SAVE(r1)
+ mtlr r0
#endif
.endmacro