use nix build & meson & zlog
This commit is contained in:
parent
0123623742
commit
346768a144
60 changed files with 13739 additions and 0 deletions
52
src/include/xcectx.h
Normal file
52
src/include/xcectx.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#if !defined(_XCECTX_H_)
|
||||
|
||||
#define _XCECTX_H_ 1
|
||||
|
||||
#include "netio.h"
|
||||
#include "request.h"
|
||||
#include "vtaskmgr.h"
|
||||
#include "xce/types.h"
|
||||
|
||||
typedef enum {
|
||||
XCE_CTX_INIT = 0,
|
||||
XCE_CTX_RUN,
|
||||
XCE_CTX_DOWN,
|
||||
XCE_CTX_BUSY,
|
||||
XCE_CTX_ERR
|
||||
} xce_ctx_state_t;
|
||||
|
||||
typedef int (*xce_request_handler_t)(xce_request_t*);
|
||||
|
||||
typedef struct {
|
||||
xce_ctx_state_t state;
|
||||
xce_peerinfo_t myinfo;
|
||||
iomgr_t iomgr;
|
||||
vtaskmgr_t vtaskmgr;
|
||||
endpoint_t* ep;
|
||||
xce_request_handler_t handler;
|
||||
cbuf_t wbuf;
|
||||
dataset_t* dataset;
|
||||
|
||||
struct {
|
||||
union {
|
||||
char* debugmsg;
|
||||
dataset_t* get;
|
||||
uint64_t jobid;
|
||||
xce_clusterconf_t* clusterconf;
|
||||
} u;
|
||||
} reply;
|
||||
} xce_ctx_t;
|
||||
|
||||
extern int xce_ctx_init(xce_ctx_t*, char*, char*);
|
||||
extern void xce_ctx_fini(xce_ctx_t*);
|
||||
extern int xce_ctx_set_handler(xce_ctx_t*,
|
||||
xce_request_handler_t);
|
||||
extern int xce_ctx_start(xce_ctx_t*);
|
||||
extern int xce_ctx_stop(xce_ctx_t*);
|
||||
extern int xce_wakeup(xce_ctx_t*, int);
|
||||
extern int xce_try_wakeup(xce_ctx_t*, int);
|
||||
extern int xce_ctx_set_endpoint(xce_ctx_t*, endpoint_t*);
|
||||
extern void xce_block_tasks(xce_ctx_t*);
|
||||
extern void xce_unblock_tasks(xce_ctx_t*);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue