* Low level helpers
****************************************************************/
-static inline u32 getcr0(void) {
- u32 cr0;
- asm("movl %%cr0, %0" : "=r"(cr0));
- return cr0;
-}
static inline void sgdt(struct descloc_s *desc) {
asm("sgdtl %0" : "=m"(*desc));
}
return 1;
}
-extern void yield_preempt(void);
-#if MODESEGMENT == 0
// Try to execute 32bit threads.
void VISIBLE32INIT
yield_preempt(void)
PreemptCount++;
switch_next(&MainThread);
}
-#endif
// 16bit code that checks if threads are pending and executes them if so.
void
|| GET_FLATPTR(MainThread.next) == &MainThread)
return;
- call32(yield_preempt, 0, 0);
+ extern void _cfunc32flat_yield_preempt(void);
+ call32(_cfunc32flat_yield_preempt, 0, 0);
}