]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/commitdiff
Moving fosa_errors.h and frsh_thread_code_t to frsh_fosa from the remarks
authortelleriam <telleriam@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Fri, 9 Mar 2007 12:07:05 +0000 (12:07 +0000)
committertelleriam <telleriam@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Fri, 9 Mar 2007 12:07:05 +0000 (12:07 +0000)
given by Erik Thorin.

git-svn-id: http://www.frescor.org/private/svn/frescor/frsh/trunk/include@322 35b4ef3e-fd22-0410-ab77-dab3279adceb

frsh_core_types.h
frsh_fosa.h
frsh_fosa_opaque.h

index 7db42d4bb09cdb544547df785c1c1794044d0aae..1629ace0385ddcd6e9deb2aa63d3ddad847f0364 100644 (file)
@@ -118,13 +118,6 @@ typedef enum {FRSH_RS_IN_PROGRESS,
 
 
 
-/** 
- *  The type references a function that may become a thread's
- *  code
- **/
-typedef void * (*frsh_thread_code_t) (void *);
-
-
 /** 
  *  Server Id type, that identifies a server created to manage a given
  *  contract
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);
index fe646e502946f7ec16f71f1bd2300510056bd730..bfc6de07ac89fe82c05d765dc94a61a05f74c2ad 100644 (file)
 #ifndef        FRSH_FOSA_OPAQUE_H_
 #define        FRSH_FOSA_OPAQUE_H_
 
+/**
+ * \addtogroup frshfosa
+ *
+ * @{
+ **/
+
+
 //////////////////////////MaRTE OS & RT_LINUX  /////////////////////////
 
 #if defined(MARTE_OS) || defined(RT_LINUX)
 
 #define FOSA_NULL_SIGNAL 0
 
+/* FOSA Errors */
+
+#include <error.h>
+
+/** Not enough memory available **/
+#define FOSA_ENOMEM   ENOMEM
+
+/** Invalid parameter **/
+#define FOSA_EINVAL   EINVAL
+
+/** Still pending information **/
+#define FOSA_EAGAIN   EAGAIN
+
+/** FOSA ADS errors **/
+#define FOSA_EREJECT   EREJECT
+#define FOSA_EMASKED   EMASKED
+
+
 #endif /* MARTE_OS || RT_LINUX */
 
 //////////////////////////End of MaRTE OS & RT_LINUX  ///////////////////