home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / rom / exec / remintserver.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-09  |  1.4 KB  |  77 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: remintserver.c,v 1.4 1997/01/08 04:06:53 ldp Exp $
  4.  
  5.     Desc:
  6.     Lang:
  7. */
  8. #include <aros/config.h>
  9. #include <exec/execbase.h>
  10. #include <exec/interrupts.h>
  11.  
  12. #if (AROS_FLAVOUR == AROS_FLAVOUR_NATIVE)
  13. #include <hardware/custom.h>
  14. #include <hardware/intbits.h>
  15. #endif
  16.  
  17. #include <proto/exec.h>
  18. #include <aros/libcall.h>
  19.  
  20. /*****************************************************************************
  21.  
  22.     NAME */
  23.  
  24.     AROS_LH2(void, RemIntServer,
  25.  
  26. /*  SYNOPSIS */
  27.     AROS_LHA(ULONG,              intNumber, D0),
  28.     AROS_LHA(struct Interrupt *, interrupt, A1),
  29.  
  30. /*  LOCATION */
  31.     struct ExecBase *, SysBase, 29, Exec)
  32.  
  33. /*  FUNCTION
  34.  
  35.     INPUTS
  36.  
  37.     RESULT
  38.  
  39.     NOTES
  40.  
  41.     EXAMPLE
  42.  
  43.     BUGS
  44.  
  45.     SEE ALSO
  46.  
  47.     INTERNALS
  48.  
  49.     HISTORY
  50.  
  51. ******************************************************************************/
  52. {
  53.     AROS_LIBFUNC_INIT
  54.     struct List *list;
  55. #if (AROS_FLAVOUR == AROS_FLAVOUR_NATIVE)
  56.     struct Custom *custom = (struct Custom *)(void **)0xdff000;
  57. #endif
  58.  
  59.     list = (struct List *)SysBase->IntVects[intNumber].iv_Data;
  60.  
  61.     Disable();
  62.  
  63.     Remove((struct Node *)interrupt);
  64.  
  65. #if (AROS_FLAVOUR == AROS_FLAVOUR_NATIVE)
  66.     if(list->lh_TailPred == (struct Node *)list)
  67.     {
  68.         /* disable interrupts if there are no more nodes on the list */
  69.         custom->intena = (UWORD)((1<<intNumber));
  70.     }
  71. #endif
  72.  
  73.     Enable();
  74.  
  75.     AROS_LIBFUNC_EXIT
  76. } /* RemIntServer */
  77.