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

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: addmemhandler.c,v 1.7 1997/01/01 03:46:04 ldp Exp $
  4.  
  5.     Desc: Exec function AddeMemHandler()
  6.     Lang: english
  7. */
  8.  
  9. #include <exec/execbase.h>
  10. #include <aros/libcall.h>
  11. #include <proto/exec.h>
  12.  
  13. /*****************************************************************************
  14.  
  15.     NAME */
  16.  
  17.     AROS_LH1(void, AddMemHandler,
  18.  
  19. /*  SYNOPSIS */
  20.     AROS_LHA(struct Interrupt *, memHandler, A1),
  21.  
  22. /*  LOCATION */
  23.     struct ExecBase *, SysBase, 129, Exec)
  24.  
  25. /*  FUNCTION
  26.     Add some function to be called if the system is low on memory.
  27.  
  28.     INPUTS
  29.     memHandler - An Interrupt structure to add to the low memory
  30.              handler list.
  31.  
  32.     RESULT
  33.  
  34.     NOTES
  35.  
  36.     EXAMPLE
  37.  
  38.     BUGS
  39.  
  40.     SEE ALSO
  41.  
  42.     INTERNALS
  43.  
  44.     HISTORY
  45.     8-10-95    created by m. fleischer
  46.  
  47. ******************************************************************************/
  48. {
  49.     AROS_LIBFUNC_INIT
  50.     /* Protect the low memory handler list */
  51.     Forbid();
  52.     /* Nothing spectacular: Just add the new node */
  53.     Enqueue((struct List *)&SysBase->ex_MemHandlers,&memHandler->is_Node);
  54.     Permit();
  55.     AROS_LIBFUNC_EXIT
  56. } /* AddMemHandler */
  57.  
  58.