save works

This commit is contained in:
Rongsong Shen 2025-12-18 14:55:58 +08:00
parent d0174f2f30
commit 4db6b039c5
8 changed files with 140 additions and 34 deletions

View file

@ -3,10 +3,12 @@
#define _SCHEDULER_H_ 1
#include <pthread.h>
#include <stdint.h>
#include <time.h>
#include "decision.h"
#include "client.h"
#include "dataq.h"
#include "decision.h"
#include "mylock.h"
#include "xce/types.h"
#include "xlist.h"
@ -39,6 +41,45 @@ typedef struct {
- offsetof(xce_sched_update_request_t, \
link)))
typedef void* host_selection_t;
typedef struct {
host_selection_t* select;
int nres;
uint32_t* resources;
float* amount;
} rank_req_t;
typedef struct {
uint64_t jobid;
time_t sub_time;
time_t queue_time;
time_t start_time;
unsigned int state;
char* queue;
char* user;
char* project;
uint32_t mintasks;
uint32_t maxtasks;
xce_job_alloc_t* allocs;
} xce_sched_job_t;
typedef struct {
char* name;
uint32_t attrs;
uint32_t status;
int32_t priority;
int32_t accept_interval;
int32_t sched_delay;
char* resreq;
} xce_sched_queue_t;
typedef struct {
char* name;
xce_val_t* res_avail; /* resources in worker */
xce_val_t* res_in_use; /* used resources in worker */
} xce_sched_worker_t;
typedef struct {
mylock_t lock;
int stop;