Export the function to get the gid from a label
This commit is contained in:
parent
68690b4127
commit
c508929835
@ -222,8 +222,8 @@ task_end(struct task_stack *stack, struct task *task)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t
|
uint32_t
|
||||||
get_task_type_gid(const char *label)
|
task_get_type_gid(const char *label)
|
||||||
{
|
{
|
||||||
uint32_t gid;
|
uint32_t gid;
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ task_type_create(struct task_info *info, uint32_t type_id, const char *label)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
type->gid = get_task_type_gid(label);
|
type->gid = task_get_type_gid(label);
|
||||||
int n = snprintf(type->label, MAX_PCF_LABEL, "%s", label);
|
int n = snprintf(type->label, MAX_PCF_LABEL, "%s", label);
|
||||||
if (n >= MAX_PCF_LABEL) {
|
if (n >= MAX_PCF_LABEL) {
|
||||||
err("task type label too long: %s", label);
|
err("task type label too long: %s", label);
|
||||||
|
@ -63,6 +63,7 @@ int task_end(struct task_stack *stack, struct task *task);
|
|||||||
|
|
||||||
struct task_type *task_type_find(struct task_type *types, uint32_t type_id);
|
struct task_type *task_type_find(struct task_type *types, uint32_t type_id);
|
||||||
int task_type_create(struct task_info *info, uint32_t type_id, const char *label);
|
int task_type_create(struct task_info *info, uint32_t type_id, const char *label);
|
||||||
|
uint32_t task_get_type_gid(const char *label);
|
||||||
|
|
||||||
int task_create_pcf_types(struct pcf_type *pcftype, struct task_type *types);
|
int task_create_pcf_types(struct pcf_type *pcftype, struct task_type *types);
|
||||||
struct task *task_get_running(struct task_stack *stack);
|
struct task *task_get_running(struct task_stack *stack);
|
||||||
|
Loading…
Reference in New Issue
Block a user