]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_core.h
Merging the frsh_sa branch in the trunk.
[frescor/frsh-include.git] / frsh_core.h
index 0440e4bee6baf18b6ce29623d312177cf3449529..f0a8a5fd719f8f836733fe4c089f0bb32958f1a8 100644 (file)
@@ -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()
  *