]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_fosa.h
Moving fosa_errors.h and frsh_thread_code_t to frsh_fosa from the remarks
[frescor/frsh-include.git] / frsh_fosa.h
index 5afa85f23f047c5628416a55ca4fc25a9524dd7c..1bf2afcd7a021de2aac98126e3510c16733cfee8 100644 (file)
@@ -99,6 +99,13 @@ typedef FOSA_THREAD_ID_T_OPAQUE frsh_thread_id_t;
 /** thread attributes object **/
 typedef FOSA_THREAD_ATTR_T_OPAQUE frsh_thread_attr_t;
 
+/** 
+ *  The type references a function that may become a thread's
+ *  code
+ **/
+typedef void * (*frsh_thread_code_t) (void *);
+
+
 /** signal number; it is an integer type **/
 typedef FOSA_SIGNAL_T_OPAQUE frsh_signal_t;
 #define FRSH_NULL_SIGNAL       FOSA_NULL_SIGNAL
@@ -107,6 +114,8 @@ typedef FOSA_SIGNAL_T_OPAQUE frsh_signal_t;
 #define FRSH_SIGNAL_MIN       FOSA_SIGNAL_MIN
 #define FRSH_SIGNAL_MAX       FOSA_SIGNAL_MAX
 
+
+
 /** information associated to a signal **/
 typedef union {int value; void * area; } frsh_signal_info_t;
 
@@ -127,7 +136,7 @@ typedef FOSA_MUTEX_T_OPAQUE frsh_mutex_t;
  * This function initializes the object pointed to by attr to all 
  * the default values defined by FRSH
  *
- * Returns 0 if successful; otherwise it returns
+ * @return 0 if successful; otherwise it returns \n
  *   ENOMEM: insufficient memory exists to initialize the thread 
  *           attributes object
  **/
@@ -156,8 +165,8 @@ int frsh_thread_attr_destroy(frsh_thread_attr_t *attr);
  * attributes object is used to create a thread, when it will be
  * created with the specified minimum stack size
  * 
- * Returns 0 if successful, or the following error code:
- *    EINVAL: the specified stacksize  value is not supported in
+ * @return 0 if successful, or the following error code:
+ *    FOSA_EINVAL: the specified stacksize  value is not supported in
  *            this implementation
  */
 int frsh_thread_attr_set_stacksize(frsh_thread_attr_t *attr, size_t stacksize);
@@ -170,7 +179,7 @@ int frsh_thread_attr_set_stacksize(frsh_thread_attr_t *attr, size_t stacksize);
  * This function sets the variable pointed to by stacksize to the
  * minimum stack size stored in the thread attributes object attr.
  * 
- * Returns 0
+ * @return 0
  */
 int frsh_thread_attr_get_stacksize
       (const frsh_thread_attr_t *attr, size_t *stacksize);