home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / nn.tar / nn-6.5.1 / proto.h < prev    next >
Text File  |  1995-04-29  |  1KB  |  31 lines

  1. /*
  2.  *    (c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
  3.  *
  4.  *    Master/slave communication and locking.
  5.  */
  6.  
  7. /*
  8.  *    proto_lock() modes
  9.  */
  10.  
  11. #define PL_SET        1    /* set lock (if not set) */
  12. #define PL_SET_WAIT    2    /* set lock (wait until set) */
  13. #define PL_SET_QUICK    3    /* as _WAIT, but using sleep(1) */
  14. #define PL_CLEAR    4    /* clear lock */
  15. #define PL_CLEAR_WAIT    5    /* wait for lock to disappear */
  16. #define PL_CHECK    6    /* check running status */
  17. #define PL_WAKEUP    7    /* send wakeup (must succeed) */
  18. #define PL_WAKEUP_SOFT    8    /* send wakeup (may fail) */
  19. #define PL_TERMINATE    9    /* send termination */
  20. #define PL_TRANSFER    10    /* transfer lock to current process (forked) */
  21.  
  22. /*
  23.  * types for send_master(type, group, opt, arg)
  24.  */
  25.  
  26. #define SM_SET_OPTION    'O'    /* set option to arg (toggle if -1) */
  27. #define SM_SET_FLAG    'F'    /* opt=set/clear flag 'arg' in group */
  28. #define SM_RECOLLECT    'R'    /* recollect group (or all groups if NULL) */
  29. #define SM_EXPIRE    'X'    /* expire group (or all groups if NULL) */
  30. #define SM_SCAN_ONCE    'U'    /* scan unconditionally (ignore active) */
  31.