Annotation of uae/src/native2amiga.c, revision 1.1.1.2

1.1       root        1:  /*
                      2:   * UAE - The Un*x Amiga Emulator
                      3:   *
                      4:   * Call Amiga Exec functions outside the main UAE thread.
                      5:   *
                      6:   * Copyright 1999 Patrick Ohly
                      7:   * 
                      8:   * Uses the EXTER interrupt that is setup in filesys.c
                      9:   * and needs thread support.
                     10:   */
                     11: 
                     12: #include "sysconfig.h"
                     13: #include "sysdeps.h"
                     14: 
                     15: #include "config.h"
                     16: #include "threaddep/penguin.h"
                     17: #include "options.h"
                     18: #include "memory.h"
                     19: #include "custom.h"
                     20: #include "readcpu.h"
                     21: #include "newcpu.h"
                     22: #include "disk.h"
                     23: #include "autoconf.h"
                     24: #include "filesys.h"
                     25: #include "execlib.h"
                     26: #include "native2amiga.h"
                     27: 
                     28: smp_comm_pipe native2amiga_pending;
                     29: 
                     30: /*
                     31:  * to be called when setting up the hardware
                     32:  */
                     33: 
                     34: void native2amiga_install (void)
                     35: {
                     36:     init_comm_pipe (&native2amiga_pending, 10, 2);
                     37: }
                     38: 
                     39: /*
                     40:  * to be called when the Amiga boots, i.e. by filesys_diagentry()
                     41:  */
                     42: void native2amiga_startup (void)
                     43: {
                     44: }
                     45: 
                     46: #ifdef SUPPORT_THREADS
1.1.1.2 ! root       47: void uae_ReplyMsg(uaecptr msg)
1.1       root       48: {
                     49:     write_comm_pipe_int (&native2amiga_pending, 2, 0);
                     50:     write_comm_pipe_u32 (&native2amiga_pending, msg, 1);
                     51: 
                     52:     uae_int_requested = 1;
                     53: }
                     54: 
1.1.1.2 ! root       55: void uae_PutMsg(uaecptr port, uaecptr msg)
1.1       root       56: {
                     57:     uae_pt data;
                     58:     data.i = 1;
                     59:     write_comm_pipe_int (&native2amiga_pending, 1, 0);
                     60:     write_comm_pipe_u32 (&native2amiga_pending, port, 0);
                     61:     write_comm_pipe_u32 (&native2amiga_pending, msg, 1);
                     62: 
                     63:     uae_int_requested = 1;
                     64: }
                     65: 
1.1.1.2 ! root       66: void uae_Signal(uaecptr task, uae_u32 mask)
1.1       root       67: {
                     68:     write_comm_pipe_int (&native2amiga_pending, 0, 0);
                     69:     write_comm_pipe_u32 (&native2amiga_pending, task, 0);
                     70:     write_comm_pipe_int (&native2amiga_pending, mask, 1);
                     71:     
                     72:     uae_int_requested = 1;
                     73: }
                     74: #endif
                     75: 
1.1.1.2 ! root       76: void uae_NewList(uaecptr list)
1.1       root       77: {
                     78:     put_long (list, list + 4);
                     79:     put_long (list + 4, 0);
                     80:     put_long (list + 8, list);
                     81: }
                     82: 
1.1.1.2 ! root       83: uaecptr uae_AllocMem (uae_u32 size, uae_u32 flags)
1.1       root       84: {
                     85:     m68k_dreg (regs, 0) = size;
                     86:     m68k_dreg (regs, 1) = flags;
                     87:     return CallLib (get_long (4), -198); /* AllocMem */
                     88: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.