--- uae/src/native2amiga.c 2018/04/24 16:48:34 1.1.1.2 +++ uae/src/native2amiga.c 2018/04/24 17:14:08 1.1.1.5 @@ -4,7 +4,7 @@ * Call Amiga Exec functions outside the main UAE thread. * * Copyright 1999 Patrick Ohly - * + * * Uses the EXTER interrupt that is setup in filesys.c * and needs thread support. */ @@ -13,11 +13,10 @@ #include "sysdeps.h" #include "config.h" -#include "threaddep/penguin.h" +#include "threaddep/thread.h" #include "options.h" #include "memory.h" #include "custom.h" -#include "readcpu.h" #include "newcpu.h" #include "disk.h" #include "autoconf.h" @@ -68,7 +67,7 @@ void uae_Signal(uaecptr task, uae_u32 ma write_comm_pipe_int (&native2amiga_pending, 0, 0); write_comm_pipe_u32 (&native2amiga_pending, task, 0); write_comm_pipe_int (&native2amiga_pending, mask, 1); - + uae_int_requested = 1; } #endif @@ -86,3 +85,10 @@ uaecptr uae_AllocMem (uae_u32 size, uae_ m68k_dreg (regs, 1) = flags; return CallLib (get_long (4), -198); /* AllocMem */ } + +void uae_FreeMem (uaecptr memory, uae_u32 size) +{ + m68k_dreg (regs, 0) = size; + m68k_areg (regs, 1) = memory; + CallLib (get_long (4), -0xD2); /* FreeMem */ +}