#if !defined(_XCELIMIT_H_) #define _XCELIMIT_H_ 1 #include #include #include #include #include "group.h" #include "kvmgr.h" #include "utils.h" #include "xce/types.h" extern int build_consumer(xce_consumer_t**, var, xce_consumer_type_t, int, xce_group_config_t*, char*); extern void kill_consumer(xce_consumer_t*); extern int build_limit(xce_limit_t**, var, var, var, var, xce_limit_config_t*); extern int match_limit(xce_limit_t*, int, ...); extern int build_vres_name(char**, xce_limit_t*, char*, char*, char*); extern int is_host_based_limit(var, xce_limit_t*); extern int fmt_consumer(char*, int, xce_consumer_t*); extern int fmt_limit(char*, int, xce_limit_t*); /* fmt_limit_units() -- scheduler-sim-diagnostics spec, Requirement 6, task * 8.1. Sibling of fmt_limit() (the fmt_jobid()/fmt_jobid_ex() pattern): * identical consumer-dump loop, but the final configured-value line renders * a byte-valued, non-percentage resource's amount via xce_format_units_value() * according to the supplied units_mode instead of always the bare "%f". * fmt_limit() itself is now a one-line wrapper: fmt_limit_units(buf, len, * limit, XCE_UNITS_RAW) -- byte-identical to its own pre-existing output. */ extern int fmt_limit_units(char*, int, xce_limit_t*, xce_units_mode_t); extern void kill_limit(xce_limit_t*); extern int instantiate_limit(xce_vres_t**, var, xce_limit_t*, char*, char*, char*); extern void kill_vres(xce_vres_t*); extern int add_vres(xce_resource_t**, var, char*, int); #endif