IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 11, 2006, 4:52:37 PM (20 years ago)
Author:
eugene
Message:

divided test macros into macros by leveltests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/include/pcontrol.h

    r7917 r8297  
    99  PCONTROL_JOB_PENDING,
    1010  PCONTROL_JOB_BUSY, 
     11  PCONTROL_JOB_HUNG, 
     12  PCONTROL_JOB_DONE, 
     13  PCONTROL_JOB_KILL, 
    1114  PCONTROL_JOB_EXIT,
    1215  PCONTROL_JOB_CRASH,
    13   PCONTROL_JOB_HUNG, 
    14   PCONTROL_JOB_DONE, 
    1516} JobStat;
    1617
     
    9394typedef struct {
    9495  void **object;
     96  char **name;
     97  int   *id;
    9598  int    Nobject;
    9699  int    NOBJECT;
     100  // pthread_mutex_t mutex;
    97101} Stack;
    98102
     
    107111void InitPcontrol ();
    108112
    109 void *GetStack (Stack *stack, int where);
    110 int PutStack (Stack *stack, int where, void *object);
     113/*** StackOps.c ***/
    111114Stack *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);
     115int    PushStack (Stack *stack, int where, void *object, int id, char *name);
     116void  *PullStackByLocation (Stack *stack, int where);
     117void  *PullStackByName (Stack *stack, char *name);
     118void  *PullStackByID (Stack *stack, int id);
     119void  *FindStackByID (Stack *stack, int id);
     120void  *FindStackByName (Stack *stack, char *name);
     121void   LockStack (Stack *stack);
     122void   UnlockStack (Stack *stack);
     123
    125124int CheckSystem ();
    126125int CheckBusyJobs (float delay);
    127126int CheckDoneJobs (float delay);
     127int CheckKillJobs (float delay);
    128128int CheckDoneHosts (float delay);
    129129int CheckLiveHosts (float delay);
     
    144144int rconnect (char *command, char *hostname, char *shell, int *stdio);
    145145int 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);
    160146
    161147int PrintJobStack (int Nstack);
    162148int 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
     150int    VerboseMode ();
     151
     152void   gotsignal (int signum);
     153
     154/*** HostOps.c ***/
     155void   InitHostStacks ();
     156Stack *GetHostStack (int StackID);
     157Stack *GetHostStackByName (char *name);
     158int    PutHost (Host *host, int StackID, int where);
     159Host  *PullHostByID (IDtype HostID, int *StackID);
     160Host  *PullHostByName (char *name, int *StackID);
     161Host  *PullHostFromStackByID (int StackID, IDtype ID);
     162Host  *PullHostFromStackByName (int StackID, char *name);
     163Host  *FindHostByID (IDtype HostID, int *StackID);
     164Host  *FindHostByName (char *name, int *StackID);
     165Host  *FindHostInStackByID (int StackID, IDtype ID);
     166Host  *FindHostInStackByName (int StackID, char *name);
     167IDtype AddHost (char *hostname);
     168void   DelHost (Host *host);
     169
     170void   DownHost (Host *host);
     171void   OffHost (Host *host);
     172int    DownHosts ();
     173int    HarvestHost (int pid);
     174int    StopHost (Host *host);
     175
     176/*** JobOps.c ***/
     177void   InitJobStacks ();
     178Stack *GetJobStack (int StackID);
     179Stack *GetJobStackByName (char *name);
     180int    PutJob (Job *job, int StackID, int where);
     181int    PutJobSetState (Job *job, int StackID, int where, int state);
     182Job   *PullJobByID (IDtype JobID, int *StackID);
     183Job   *PullJobFromStackByID (int StackID, int ID);
     184Job   *FindJobByID (IDtype JobID, int *StackID);
     185Job   *FindJobInStackByID (int StackID, int ID);
     186IDtype AddJob (char *hostname, JobMode mode, int timeout, int argc, char **argv);
     187void   DelJob (Job *job);
     188Host  *UnlinkJobAndHost (Job *job);
     189void   LinkJobAndHost (Job *job, Host *host);
     190
     191int    KillJob (Job *job);
     192int    StartJob (Job *job);
Note: See TracChangeset for help on using the changeset viewer.