]> rtime.felk.cvut.cz Git - frescor/fosa.git/blobdiff - include/fosa_clocks_and_timers.h
Migrating FOSA trunk to d-ac2v2. Phase 1 moving FRSH-FOSA to FOSA
[frescor/fosa.git] / include / fosa_clocks_and_timers.h
index 2b50dc508bdc7d5437d011747c032528724b8a21..53f4d5560b4178acd533009ade18dd230a91a325 100644 (file)
@@ -121,7 +121,7 @@ int fosa_clock_get_time(fosa_clock_id_t clockid, struct timespec *current_time);
  * notify it to the system console and then terminate the FRSH
  * implementation and dependant applications
  **/
-int fosa_thread_get_cputime_clock(frsh_thread_id_t tid, fosa_clock_id_t *clockid);
+int fosa_thread_get_cputime_clock(fosa_thread_id_t tid, fosa_clock_id_t *clockid);
 
 
 /*************************
@@ -162,9 +162,31 @@ int fosa_thread_get_cputime_clock(frsh_thread_id_t tid, fosa_clock_id_t *clockid
  * implementation and dependant applications
  **/
  int fosa_timer_create
-      (fosa_clock_id_t clockid, frsh_signal_t signal, frsh_signal_info_t info,
+      (fosa_clock_id_t clockid, fosa_signal_t signal, fosa_signal_info_t info,
        fosa_timer_id_t *timerid);
 
+/**
+ * fosa_timer_create_with_receiver()
+ *
+ * Create a one-shot timer with a specific signal receiver thread
+ *
+ * This function creates a timer in the same way as fosa_timer_create,
+ * except that the signal generated when the timer expires is sent to
+ * the thread specified by receiver
+ *
+ * Returns 0 if successful; otherwise it returns an error code:
+ *     FOSA_EINVAL: the value of clockid or signal is invalid
+ *
+ *     FOSA_EAGAIN: the system lacks enough resources to create the timer
+ *
+ * Alternatively, in case of error the implementation is allowed to
+ * notify it to the system console and then terminate the FRSH
+ * implementation and dependant applications
+ **/
+ int fosa_timer_create_with_receiver
+      (fosa_clock_id_t clockid, fosa_signal_t signal, fosa_signal_info_t info,
+       fosa_timer_id_t *timerid, fosa_thread_id_t receiver);
+
 /**
  * fosa_timer_delete()
  *