From ffa76a92231276d4588298db9ccdd992eb49e053 Mon Sep 17 00:00:00 2001 From: telleriam Date: Tue, 20 Mar 2007 18:34:47 +0000 Subject: [PATCH] Minor changes to define MAXLENGTH constants for label strings. git-svn-id: http://www.frescor.org/private/svn/frescor/frsh/trunk/include@359 35b4ef3e-fd22-0410-ab77-dab3279adceb --- frsh_core_types.h | 2 +- frsh_shared_objects.h | 7 +++++-- frsh_shared_objects_types.h | 5 +++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/frsh_core_types.h b/frsh_core_types.h index d7f117f..c9d53a0 100644 --- a/frsh_core_types.h +++ b/frsh_core_types.h @@ -151,7 +151,7 @@ typedef int frsh_resource_id_t; typedef enum {FRSH_CT_REGULAR, FRSH_CT_BACKGROUND, FRSH_CT_DUMMY} frsh_contract_type_t; #define CONTRACT_LABEL_MAXLENGTH 15 -typedef char frsh_contract_label_t[CONTRACT_LABEL_MAXLENGTH]; +typedef char frsh_contract_label_t[CONTRACT_LABEL_MAXLENGTH + 1]; /** * Contract parameters type; it is an opaque type (i.e. the internal diff --git a/frsh_shared_objects.h b/frsh_shared_objects.h index 5a9b913..e2947a0 100644 --- a/frsh_shared_objects.h +++ b/frsh_shared_objects.h @@ -190,7 +190,9 @@ * exists, the function fails. The object is created according to the * kind of object (protected or unprotected) specified by obj_kind * - * @param[in] obj_label Label defined by the application. + * @param[in] obj_label Label defined by the application. Char * for + * a string of SHAREDOBJ_LABEL_MAXLENGTH + * characters (+ null terminating \0). * * @param[in] obj_kind Whether it is protected or unprotected. * @@ -227,7 +229,8 @@ int frsh_sharedobj_init * obj_handle. Otherwise, an error code is returned by the function. * * @param[in] obj_label Defined by the application at object creation - * time. + * time. Char * for a string of SHAREDOBJ_LABEL_MAXLENGTH + * characters (+ null terminating \0). * * @param[out] obj_handle Placeholder for the object handle. * diff --git a/frsh_shared_objects_types.h b/frsh_shared_objects_types.h index f2b7f0f..669928f 100644 --- a/frsh_shared_objects_types.h +++ b/frsh_shared_objects_types.h @@ -94,6 +94,11 @@ typedef FRSH_SHAREDOBJ_HANDLE_T_OPAQUE frsh_sharedobj_handle_t; +#define SHAREDOBJ_LABEL_MAXLENGTH 15 +typedef char frsh_sharedobj_label_t[CONTRACT_LABEL_MAXLENGTH + 1]; + + + /** * Kind of shared object protected or unprotected */ -- 2.39.2