diff --git a/src/slurmd/slurmstepd/slurmstepd_job.c b/src/slurmd/slurmstepd/slurmstepd_job.c index c0c279613d40e45db42f5f89e086de60ad1abe3b..864b3cc8da402f1a762a43b488ccbf05142d9564 100644 --- a/src/slurmd/slurmstepd/slurmstepd_job.c +++ b/src/slurmd/slurmstepd/slurmstepd_job.c @@ -291,7 +291,7 @@ _array_free(char ***array) static void _srun_info_destructor(void *arg) { - struct srun_info *srun = (struct srun_info *)arg; + srun_info_t *srun = (srun_info_t *)arg; srun_info_destroy(srun); } @@ -642,12 +642,12 @@ stepd_step_rec_destroy(stepd_step_rec_t *job) xfree(job); } -extern struct srun_info * +extern srun_info_t * srun_info_create(slurm_cred_t *cred, slurm_addr_t *resp_addr, slurm_addr_t *ioaddr) { char *data = NULL; uint32_t len = 0; - struct srun_info *srun = xmalloc(sizeof(struct srun_info)); + srun_info_t *srun = xmalloc(sizeof(srun_info_t)); srun_key_t *key = xmalloc(sizeof(srun_key_t)); srun->key = key; @@ -679,7 +679,7 @@ srun_info_create(slurm_cred_t *cred, slurm_addr_t *resp_addr, slurm_addr_t *ioad } extern void -srun_info_destroy(struct srun_info *srun) +srun_info_destroy(srun_info_t *srun) { xfree(srun->key); xfree(srun); diff --git a/src/slurmd/slurmstepd/slurmstepd_job.h b/src/slurmd/slurmstepd/slurmstepd_job.h index 40c18dec9e44a0af5a4efa86221b99f4da621ae4..1f1530648c56d2c85f0ac4fa01861a0bc6c10703 100644 --- a/src/slurmd/slurmstepd/slurmstepd_job.h +++ b/src/slurmd/slurmstepd/slurmstepd_job.h @@ -61,11 +61,11 @@ #define MAXHOSTNAMELEN 64 #endif -typedef struct srun_key { +typedef struct { unsigned char data[SLURM_IO_KEY_SIZE]; } srun_key_t; -typedef struct srun_info { +typedef struct { srun_key_t *key; /* srun key for IO verification */ slurm_addr_t resp_addr; /* response addr for task exit msg */ slurm_addr_t ioaddr; /* Address to connect on for normal I/O. @@ -73,14 +73,14 @@ typedef struct srun_info { resp_addr. */ } srun_info_t; -typedef enum task_state { +typedef enum { STEPD_STEP_TASK_INIT, STEPD_STEP_TASK_STARTING, STEPD_STEP_TASK_RUNNING, STEPD_STEP_TASK_COMPLETE } stepd_step_task_state_t; -typedef struct task_info { +typedef struct { pthread_mutex_t mutex; /* mutex to protect task state */ stepd_step_task_state_t state; /* task state */ @@ -217,13 +217,14 @@ stepd_step_rec_t * batch_stepd_step_rec_create(batch_job_launch_msg_t *msg); void stepd_step_rec_destroy(stepd_step_rec_t *job); -struct srun_info * srun_info_create(slurm_cred_t *cred, slurm_addr_t *respaddr, +srun_info_t * srun_info_create(slurm_cred_t *cred, slurm_addr_t *respaddr, slurm_addr_t *ioaddr); -void srun_info_destroy(struct srun_info *srun); +void srun_info_destroy(srun_info_t *srun); stepd_step_task_info_t * task_info_create(int taskid, int gtaskid, - char *ifname, char *ofname, char *efname); + char *ifname, char *ofname, + char *efname); /* * Return a task info structure corresponding to pid.