extern tThread gThreadZero;
extern void SwitchTask(Uint32 NewSP, Uint32 *OldSP, Uint32 NewIP, Uint32 *OldIP, Uint32 MemPtr);
extern void KernelThreadHeader(void); // Actually takes args on stack
-extern void Proc_int_DropToUser(Uint32 IP, Uint32 SP) NORETURN;
+extern void Proc_int_DropToUser(Uint32 IP, Uint32 SP) NORETURN __attribute__((long_call));
extern Uint32 Proc_int_SwapUserSP(Uint32 NewSP);
extern Uint32 Proc_CloneInt(Uint32 *SP, Uint32 *MemPtr);
extern tVAddr MM_NewKStack(int bGlobal); // TODO: Move out into a header
// Drop to user code
Log_Debug("Proc", "Proc_int_DropToUser(%p, %p)", Entrypoint, usr_sp);
-
- // Needed to get around relocation truncation
- {
- void (*drop)(Uint32, Uint32) NORETURN = Proc_int_DropToUser;
- drop(Entrypoint, (Uint32)usr_sp);
- }
+ Proc_int_DropToUser(Entrypoint, (Uint32)usr_sp);
}
void Proc_ClearThread(tThread *Thread)