From 99cff153cd2cbee5d1920e987f0975644f22957c Mon Sep 17 00:00:00 2001 From: telleriam Date: Fri, 9 Mar 2007 12:07:05 +0000 Subject: [PATCH] Moving fosa_errors.h and frsh_thread_code_t to frsh_fosa from the remarks 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 | 7 ------- frsh_fosa.h | 17 +++++++++++++---- frsh_fosa_opaque.h | 25 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/frsh_core_types.h b/frsh_core_types.h index 7db42d4..1629ace 100644 --- a/frsh_core_types.h +++ b/frsh_core_types.h @@ -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 diff --git a/frsh_fosa.h b/frsh_fosa.h index 5afa85f..1bf2afc 100644 --- a/frsh_fosa.h +++ b/frsh_fosa.h @@ -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); diff --git a/frsh_fosa_opaque.h b/frsh_fosa_opaque.h index fe646e5..bfc6de0 100644 --- a/frsh_fosa_opaque.h +++ b/frsh_fosa_opaque.h @@ -72,6 +72,13 @@ #ifndef FRSH_FOSA_OPAQUE_H_ #define FRSH_FOSA_OPAQUE_H_ +/** + * \addtogroup frshfosa + * + * @{ + **/ + + //////////////////////////MaRTE OS & RT_LINUX ///////////////////////// #if defined(MARTE_OS) || defined(RT_LINUX) @@ -95,6 +102,24 @@ #define FOSA_NULL_SIGNAL 0 +/* FOSA Errors */ + +#include + +/** 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 /////////////////// -- 2.39.2