Changeset 8297 for trunk/Ohana/src/opihi/include/pcontrol.h
- Timestamp:
- Aug 11, 2006, 4:52:37 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/include/pcontrol.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/include/pcontrol.h
r7917 r8297 9 9 PCONTROL_JOB_PENDING, 10 10 PCONTROL_JOB_BUSY, 11 PCONTROL_JOB_HUNG, 12 PCONTROL_JOB_DONE, 13 PCONTROL_JOB_KILL, 11 14 PCONTROL_JOB_EXIT, 12 15 PCONTROL_JOB_CRASH, 13 PCONTROL_JOB_HUNG,14 PCONTROL_JOB_DONE,15 16 } JobStat; 16 17 … … 93 94 typedef struct { 94 95 void **object; 96 char **name; 97 int *id; 95 98 int Nobject; 96 99 int NOBJECT; 100 // pthread_mutex_t mutex; 97 101 } Stack; 98 102 … … 107 111 void InitPcontrol (); 108 112 109 void *GetStack (Stack *stack, int where); 110 int PutStack (Stack *stack, int where, void *object); 113 /*** StackOps.c ***/ 111 114 Stack *InitStack (); 112 Stack *GetHostStack (int StackID); 113 int PutHost (Host *host, int StackID, int where); 114 Host *GetHost (int StackID, int where); 115 int FindHost (IDtype HostID, int StackID); 116 Host *FindHostPtr (IDtype HostID, int StackID); 117 Host *FindHostStack (IDtype HostID); 118 int FindNamedHostStack (char *name); 119 Host *PullHost (IDtype HostID, int StackID); 120 int FindNamedHost (char *name, int StackID); 121 IDtype AddHost (char *hostname); 122 void DownHost (Host *host); 123 void OffHost (Host *host); 124 void DelHost (Host *host); 115 int PushStack (Stack *stack, int where, void *object, int id, char *name); 116 void *PullStackByLocation (Stack *stack, int where); 117 void *PullStackByName (Stack *stack, char *name); 118 void *PullStackByID (Stack *stack, int id); 119 void *FindStackByID (Stack *stack, int id); 120 void *FindStackByName (Stack *stack, char *name); 121 void LockStack (Stack *stack); 122 void UnlockStack (Stack *stack); 123 125 124 int CheckSystem (); 126 125 int CheckBusyJobs (float delay); 127 126 int CheckDoneJobs (float delay); 127 int CheckKillJobs (float delay); 128 128 int CheckDoneHosts (float delay); 129 129 int CheckLiveHosts (float delay); … … 144 144 int rconnect (char *command, char *hostname, char *shell, int *stdio); 145 145 int CheckHost (Host *host); 146 Stack *GetJobStack (int StackID);147 Stack *GetJobStackByName (char *name);148 int PutJob (Job *job, int StackID, int where);149 Job *GetJob (int StackID, int where);150 int FindJob (IDtype JobID, int StackID);151 Job *FindJobPtr (IDtype JobID, int StackID);152 Job *FindJobStack (IDtype JobID);153 Job *PullJob (IDtype JobID, int StackID);154 IDtype AddJob (char *hostname, JobMode mode, int timeout, int argc, char **argv);155 int KillJob (Job *job);156 void DelJob (Job *job);157 Host *UnlinkJobAndHost (Job *job);158 void LinkJobAndHost (Job *job, Host *host);159 int StopHost (Host *host);160 146 161 147 int PrintJobStack (int Nstack); 162 148 int PrintHostStack (int Nstack); 163 void InitJobStacks (); 164 void InitHostStacks (); 165 void DownHost (Host *host); 166 void OffHost (Host *host); 167 int DownHosts (); 168 int VerboseMode (); 169 int StartJob (Job *job); 170 void gotsignal (int signum); 171 int HarvestHost (int pid); 149 150 int VerboseMode (); 151 152 void gotsignal (int signum); 153 154 /*** HostOps.c ***/ 155 void InitHostStacks (); 156 Stack *GetHostStack (int StackID); 157 Stack *GetHostStackByName (char *name); 158 int PutHost (Host *host, int StackID, int where); 159 Host *PullHostByID (IDtype HostID, int *StackID); 160 Host *PullHostByName (char *name, int *StackID); 161 Host *PullHostFromStackByID (int StackID, IDtype ID); 162 Host *PullHostFromStackByName (int StackID, char *name); 163 Host *FindHostByID (IDtype HostID, int *StackID); 164 Host *FindHostByName (char *name, int *StackID); 165 Host *FindHostInStackByID (int StackID, IDtype ID); 166 Host *FindHostInStackByName (int StackID, char *name); 167 IDtype AddHost (char *hostname); 168 void DelHost (Host *host); 169 170 void DownHost (Host *host); 171 void OffHost (Host *host); 172 int DownHosts (); 173 int HarvestHost (int pid); 174 int StopHost (Host *host); 175 176 /*** JobOps.c ***/ 177 void InitJobStacks (); 178 Stack *GetJobStack (int StackID); 179 Stack *GetJobStackByName (char *name); 180 int PutJob (Job *job, int StackID, int where); 181 int PutJobSetState (Job *job, int StackID, int where, int state); 182 Job *PullJobByID (IDtype JobID, int *StackID); 183 Job *PullJobFromStackByID (int StackID, int ID); 184 Job *FindJobByID (IDtype JobID, int *StackID); 185 Job *FindJobInStackByID (int StackID, int ID); 186 IDtype AddJob (char *hostname, JobMode mode, int timeout, int argc, char **argv); 187 void DelJob (Job *job); 188 Host *UnlinkJobAndHost (Job *job); 189 void LinkJobAndHost (Job *job, Host *host); 190 191 int KillJob (Job *job); 192 int StartJob (Job *job);
Note:
See TracChangeset
for help on using the changeset viewer.
