home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Netzwerk / NETMU17.LHA / accounts / daemon.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-02  |  781 b   |  30 lines

  1. /*
  2. **    $VER: daemon.c 1.0 (02.11.94)
  3. **
  4. **    start & stop a daemon process in a shared library
  5. **
  6. **    © Copyright 1994 by Norbert Püschel
  7. **    All Rights Reserved
  8. */
  9.  
  10. #include <proto/exec.h>
  11. #include <proto/dos.h>
  12.  
  13. struct Daemon {
  14.   struct Process         *dm_Process;
  15.   struct SignalSemaphore  dm_Sync;
  16.   BYTE                    dm_Signal;
  17.   struct DosPacket       *dm_Startup;
  18. };
  19.  
  20. void InitDaemon(volatile struct Daemon *dm);
  21. BOOL StartDaemon(volatile struct Daemon *dm,void (*func)(void),STRPTR name,BYTE pri);
  22. void StopDaemon(volatile struct Daemon *dm);
  23.  
  24. volatile struct Daemon *DaemonInit(void);
  25. void DaemonInitOK(volatile struct Daemon *dm);
  26. void DaemonExit(volatile struct Daemon *dm);
  27.  
  28. #define DaemonOK(dm)     ((dm)->dm_Signal != -1)
  29. #define DaemonSignal(dm) ((dm)->dm_Signal)
  30.