*
* - resource_id => 0
* - ressource_type => FRSH_CRT_PROCESSOR
- * - contract_label =>
+ * - contract_label => ""
* - budget_min => {0,0};
* - period_max => {0,0};
* - budget_max => {0,0};
/**
* frsh_contract_set_resource_and_label()
*
- * Specify processor_id/network_id and whether it is a processor or a
- * network. Otherwise default values (type is processor and id is #0
- * will apply.
+ * Specify resource_id and type, and the contract label. Otherwise
+ * default values will apply. If the contract label is too long it is truncated
+ *
+ * @return 0 if no error \n
+ * FRSH_ERR_BAD_ARGUMENT : if the contract pointer is NULL.
**/
+
int frsh_contract_set_resource_and_label
(frsh_contract_t *contract,
const frsh_resource_type_t resource_type,
const frsh_resource_id_t resource_id,
- const frsh_contract_label_t contract_label);
+ const char *contract_label);
/**
* frsh_contract_get_resource_and_label()
*
- * Specify processor_id/network_id and whether it is a processor or a
- * network. Otherwise default values (processor and processor #0 will
- * apply.
+ * Obtain the resource_id and type, and the contract label.
+ *
+ * @return 0 if no error \n
+ * FRSH_ERR_BAD_ARGUMENT : if the contract or the contract_label
+ pointer is NULL.
**/
int frsh_contract_get_resource_and_label
(const frsh_contract_t *contract,
frsh_resource_type_t *resource_type,
frsh_resource_id_t *resource_id,
- frsh_contract_label_t contract_label);
+ char *contract_label);
/**
int frsh_thread_create_in_background
(frsh_thread_code_t thread_code,
const void *thread_arg,
- const frsh_contract_label_t contract_label,
+ const char *contract_label,
frsh_thread_attr_t *attr,
frsh_thread_id_t *thread_id,
frsh_vres_id_t *vres_id);
* FRSH_ERR_CONTRACT_LABEL_UNKNOWN: if the contract_label is not known
**/
int frsh_resource_get_vres_from_label
- (const frsh_contract_label_t contract_label,
+ (const char *contract_label,
const frsh_resource_type_t resource_type,
const frsh_resource_id_t resource_id,
frsh_vres_id_t *vres);
**/
int frsh_group_change_mode_async
(const frsh_contracts_group_t *contracts_new_vres,
- const frsh_contract_labels_group_t *new_contract_labels,
frsh_vres_group_t *vres_id_new,
const frsh_contracts_group_t *contracts_update_vres,
const frsh_vres_group_t *vres_update,