]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/commitdiff
Deadline miss notification signals API changed
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 19 Oct 2009 13:34:26 +0000 (15:34 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 19 Oct 2009 13:34:26 +0000 (15:34 +0200)
Instead of specifying notification signals before negotiation in
frsh_contract_set_timing_reqs(), new function
frsh_vres_set_notification()
was created to specify this before bind (after negotiation).

frsh_core.h

index e5076820e1af20ac9f5fa0169de10cbd006c6f4f..76e1a72487a5eabd4a5a43d1a02a6f10b0b69c6a 100644 (file)
@@ -309,22 +309,6 @@ int frsh_contract_get_resource_and_label
  *                       this parameter is ignored (the contract value
  *                       will be NULL_DEADLINE internally). Otherwise, it
  *                       contains the desired deadline value.
- * @param [in] budget_overrun_signal contains the number of the signal
- *                that must be raised if the budget of the vres is overrun.
- *                If the value of this parameter is FRSH_NULL_SIGNAL, no signal will
- *                be raised.
- * @param [in] budget_overrun_siginfo contains the value that will be
- *               passed to the signal "catcher" when the signal is raised.
- *               This parameters is not used if the budget_overrun_signal
- *               parameter is set to FRSH_NULL_SIGNAL.
- * @param [in] deadline_miss_signal contains the number of the
- *               signal that must be raised if the deadline of the
- *               vres is missed. If the value of this parameter is
- *               FRSH_NULL_SIGNAL, no signal is raised.
- * @param [in] deadline_miss_siginfo contains the value that will be
- *                passed to the signal "catcher" when the signal is
- *                raised.  This parameter is not used if the
- *                deadline_signal parameter is set to NULL_SIGNAL
  *
  * @return  0 if successful\n
  *     FRSH_ERR_BAD_ARGUMENT :  if contract is NULL \b or \n
@@ -338,11 +322,7 @@ int frsh_contract_get_resource_and_label
 int frsh_contract_set_timing_reqs
   (frsh_contract_t *contract,
    const bool                   d_equals_t,
-   const frsh_rel_time_t        *deadline,
-   const frsh_signal_t          budget_overrun_signal,
-   const frsh_signal_info_t     budget_overrun_siginfo,
-   const frsh_signal_t          deadline_miss_signal,
-   const frsh_signal_info_t     deadline_miss_siginfo);
+   const frsh_rel_time_t        *deadline);
 
 /**
  * frsh_contract_get_timing_reqs()
@@ -358,11 +338,7 @@ int frsh_contract_set_timing_reqs
 int frsh_contract_get_timing_reqs
   (const frsh_contract_t *contract,
    bool                    *d_equals_t,
-   frsh_rel_time_t         *deadline,
-   frsh_signal_t           *budget_overrun_signal,
-   frsh_signal_info_t      *budget_overrun_siginfo,
-   frsh_signal_t           *deadline_miss_signal,
-   frsh_signal_info_t      *deadline_miss_siginfo);
+   frsh_rel_time_t         *deadline);
 
 
 /*@}*/
@@ -964,6 +940,38 @@ int frsh_thread_bind
  **/
 int frsh_thread_unbind(const frsh_thread_id_t thread);
 
+/**
+ * frsh_vres_set_notification()
+ *
+ * This function setups notification signals for CPU vres. It is
+ * necessary to call this function before bounding the thread to the
+ * vres.
+ * 
+ * @param [in] budget_overrun_signal contains the number of the signal
+ *                that must be raised if the budget of the vres is
+ *                overrun by the thread.
+ *                If the value of this parameter is FRSH_NULL_SIGNAL, no signal will
+ *                be raised.
+ * @param [in] budget_overrun_siginfo contains the value that will be
+ *               passed to the signal "catcher" when the signal is raised.
+ *               This parameters is not used if the budget_overrun_signal
+ *               parameter is set to FRSH_NULL_SIGNAL.
+ * @param [in] deadline_miss_signal contains the number of the
+ *               signal that must be raised if the deadline of the
+ *               vres is missed. If the value of this parameter is
+ *               FRSH_NULL_SIGNAL, no signal is raised.
+ * @param [in] deadline_miss_siginfo contains the value that will be
+ *                passed to the signal "catcher" when the signal is
+ *                raised.  This parameter is not used if the
+ *                deadline_signal parameter is set to NULL_SIGNAL
+ **/
+int frsh_vres_set_notification(
+       frsh_vres_id_t vres,
+       const frsh_signal_t          budget_overrun_signal,
+       const frsh_signal_info_t     budget_overrun_siginfo,
+       const frsh_signal_t          deadline_miss_signal,
+       const frsh_signal_info_t     deadline_miss_siginfo);
+
 /**
  * frsh_thread_get_vres_id()
  *