home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / ip / manage / condor / Condor_4.1.3b / src / h / sched.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-10  |  4.3 KB  |  166 lines

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