X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/frsh-include.git/blobdiff_plain/561c783e61fd8e9fc987bcc16d4635d253f0deb5..ded38458944680bde4969ddd830a510df383d220:/frsh_core.h diff --git a/frsh_core.h b/frsh_core.h index 0440e4b..f0a8a5f 100644 --- a/frsh_core.h +++ b/frsh_core.h @@ -938,6 +938,28 @@ int frsh_thread_unbind(const frsh_thread_id_t thread); int frsh_thread_get_vres_id(const frsh_thread_id_t thread, frsh_vres_id_t *vres_id); +/** + * frsh_vres_get_priority() + * + * This operation stores the priority currently associated + * with the specified vres in the variable pointed to by + * priority. It returns an error if the vres_id is not recognised. + * + * @return 0 if no error \n + * FRSH_ERR_BAD_ARGUMENT : if the contract argument is NULL or the value + * of the vres argument is not in range \n + * FRSH_ERR_NOT_SCHEDULED_CALLING_THREAD : if the calling thread is not + * scheduled under FRSH \n + * FRSH_ERR_INVALID_SCHEDULER_REPLY : the scheduler is wrong or not + * running \n + * FRSH_ERR_NOT_CONTRACTED_VRES: if the vres of the calling thread + * has been cancelled or it is not valid + * + **/ +int frsh_vres_get_priority + (frsh_vres_id_t vres_id, + int *priority); + /** * frsh_vres_get_contract() *