home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / condor40.zip / CONDOR / src / h / sched.h < prev    next >
C/C++ Source or Header  |  1989-08-17  |  4KB  |  151 lines

  1. /* 
  2. ** Copyright 1986, 1987, 1988, 1989 University of Wisconsin
  3. ** 
  4. ** Permission to use, copy, modify, and distribute this software and its
  5. ** documentation for any purpose and without fee is hereby granted,
  6. ** provided that the above copyright notice appear in all copies and that
  7. ** both that copyright notice and this permission notice appear in
  8. ** supporting documentation, and that the name of the University of
  9. ** Wisconsin not be used in advertising or publicity pertaining to
  10. ** distribution of the software without specific, written prior
  11. ** permission.  The University of Wisconsin makes no representations about
  12. ** the suitability of this software for any purpose.  It is provided "as
  13. ** is" without express or implied warranty.
  14. ** 
  15. ** THE UNIVERSITY OF WISCONSIN DISCLAIMS ALL WARRANTIES WITH REGARD TO
  16. ** THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  17. ** FITNESS. IN NO EVENT SHALL THE UNIVERSITY OF WISCONSIN  BE LIABLE FOR
  18. ** ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19. ** WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  20. ** ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  21. ** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22. ** 
  23. ** Authors:  Allan Bricker and Michael J. Litzkow,
  24. **              University of Wisconsin, Computer Sciences Dept.
  25. ** 
  26. */ 
  27.  
  28.  
  29. typedef struct {
  30.     int        p_disk_avail;
  31.     char    *p_host;
  32. } PERM;
  33.  
  34. typedef struct {
  35.     int        s_users;
  36.     int        s_wanting;
  37.     int        s_running;
  38.     int        s_state;
  39.     int        s_disk_avail;
  40.     int        s_disk_wanted;
  41. } STATUS;
  42.  
  43. typedef struct {
  44.     int        c_cmd;
  45. } COMMAND;
  46.  
  47. typedef struct {
  48.     int        port1;
  49.     int        port2;
  50. } PORTS;
  51.  
  52. #ifdef JUNK
  53. typedef struct
  54. {
  55.     time_t    when;
  56.     int        state;
  57. } STATE_CHANGE;
  58.  
  59. typedef struct {
  60.     int        user_time;
  61.     int        ru_time;
  62.     int        accept_time;
  63.     int        n_changes;
  64.     STATE_CHANGE    *changes;
  65. } STATISTICS;
  66.  
  67. typedef struct {
  68.     int        add_flags;
  69.     int        del_flags;
  70. } FLAGS;
  71. #endif JUNK
  72.  
  73. typedef struct {
  74.     int        pid;
  75.     int        job_id;
  76.     int        umbilical;
  77. } SHADOW_REC;
  78.  
  79.     /* Scheduler Commands */
  80. /*
  81. **    Scheduler version number
  82. */
  83. #define SCHED_VERS            400
  84.  
  85. /*
  86. **    In the following definitions 'FRGN' does not
  87. **    stand for "friggin'"...
  88. */
  89. #define CONTINUE_FRGN_JOB    (SCHED_VERS+1)
  90. #define SUSPEND_FRGN_JOB    (SCHED_VERS+2)
  91. #define CKPT_FRGN_JOB        (SCHED_VERS+3)
  92. #define KILL_FRGN_JOB        (SCHED_VERS+4)
  93.  
  94. #define LOCAL_STATUS        (SCHED_VERS+5)
  95. #define LOCAL_STATISTICS    (SCHED_VERS+6)
  96.  
  97. #define PERMISSION            (SCHED_VERS+7)
  98. #define SET_DEBUG_FLAGS        (SCHED_VERS+8)
  99. #define PREEMPT_LOCAL_JOBS    (SCHED_VERS+9)
  100.  
  101. #define RM_LOCAL_JOB        (SCHED_VERS+10)
  102. #define START_FRGN_JOB        (SCHED_VERS+11)
  103.  
  104. #define AVAILABILITY        (SCHED_VERS+12)        /* Not used */
  105. #define NUM_FRGN_JOBS        (SCHED_VERS+13)
  106. #define STARTD_INFO            (SCHED_VERS+14)
  107. #define SCHEDD_INFO            (SCHED_VERS+15)
  108. #define NEGOTIATE            (SCHED_VERS+16)
  109. #define SEND_JOB_INFO        (SCHED_VERS+17)
  110. #define NO_MORE_JOBS        (SCHED_VERS+18)
  111. #define JOB_INFO            (SCHED_VERS+19)
  112. #define GIVE_STATUS            (SCHED_VERS+20)
  113. #define RESCHEDULE            (SCHED_VERS+21)
  114. #define PING                (SCHED_VERS+22)
  115. #define NEGOTIATOR_INFO        (SCHED_VERS+23)
  116. #define GIVE_STATUS_LINES    (SCHED_VERS+24)
  117. #define END_NEGOTIATE        (SCHED_VERS+25)
  118. #define REJECTED            (SCHED_VERS+26)
  119. #define X_EVENT_NOTIFICATION (SCHED_VERS+27)
  120.  
  121. #define SCHED_PORT            9605
  122. #define START_PORT            9611
  123. #define COLLECTOR_PORT        9612
  124. #define COLLECTOR_UDP_PORT    9613
  125. #define NEGOTIATOR_PORT        9614
  126. #define START_UDP_PORT        9615
  127.  
  128. #define XDR_BLOCKSIZ (1024*4)
  129. #define DEFAULT_MEMORY 3
  130.  
  131. #ifndef TRUE
  132. #define TRUE 1
  133. #endif
  134.  
  135. #ifndef FALSE
  136. #define FALSE 0
  137. #endif
  138.  
  139. #ifndef MATCH
  140. #define MATCH 0        /* "Equality" return for strcmp() */
  141. #endif
  142.  
  143. #define OK        TRUE
  144. #define NOT_OK    FALSE
  145.  
  146. #define    NO_JOB            0
  147. #define    JOB_RUNNING        1
  148. #define    KILLED            2
  149. #define    CHECKPOINTING    3
  150. #define SUSPENDED        4
  151.