- Replace old RootDesc structure with a new DST_Root structure,
- Add support tot NDT_Root pointer in DS_DataStruct Alloc() & DS_DataStruct_Free(). - Impact dsbench.c.
This commit is contained in:
parent
6dccb387f7
commit
9fc9a44356
@ -33,6 +33,7 @@
|
||||
//extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <shmem.h>
|
||||
|
||||
|
||||
@ -137,19 +138,50 @@ typedef int DST_Flags;
|
||||
#define DSD_NAME_LEN ( short)SMD_NAME_LEN
|
||||
#define DSD_NAME_SIZE ( DSD_NAME_LEN + 1)
|
||||
|
||||
#define DSD_DATASTRUCT_STATUS_UNKNOWN 0x0000
|
||||
#define DSD_DATASTRUCT_STATUS_TEMPORARY 0x0001
|
||||
#define DSD_DATASTRUCT_STATUS_VALID 0x0002
|
||||
#define DSD_DATASTRUCT_STATUS_INVALID 0x0003
|
||||
#define DSD_DATASTRUCT_STATUS_MSK ( DSD_DATASTRUCT_STATUS_UNKNOWN | DSD_DATASTRUCT_STATUS_TEMPORARY | DSD_DATASTRUCT_STATUS_VALID | DSD_DATASTRUCT_STATUS_INVALID)
|
||||
#define DSD_DATASTRUCT_STATUS_RMSK ( DSD_DATASTRUCT_STATUS_MSK
|
||||
|
||||
#define DSD_DATASTRUCT_STATUS_VALUE_UNKNOWN_IS( V) ( ( V) == DSD_DATASTRUCT_STATUS_UNKNOWN)
|
||||
#define DSD_DATASTRUCT_STATUS_VALUE_TEMPORARY( V) ( ( V) == DSD_DATASTRUCT_STATUS_TEMPORARY)
|
||||
#define DSD_DATASTRUCT_STATUS_VALUE_VALID( V) ( ( V) == DSD_DATASTRUCT_STATUS_VALID)
|
||||
#define DSD_DATASTRUCT_STATUS_VALUE_INVALID( V) ( ( V) == DSD_DATASTRUCT_STATUS_INVALID)
|
||||
|
||||
#define DSD_DATASTRUCT_STATUS_VALUE_ASCII_GET( V) ( DSD_DATASTRUCT_STATUS_VALUE_UNKNOWN_IS( V) ? "UNKNOWN" : ( DSD_DATASTRUCT_STATUS_VALUE_TEMPORARY( V) ? "TEMPORARY" : ( DSD_DATASTRUCT_STATUS_VALUE_VALID( V) ? "VALID" : ( DSD_DATASTRUCT_STATUS_VALUE_INVALID( V) ? "INVALID" : "???"))))
|
||||
|
||||
|
||||
|
||||
typedef struct DST_Root
|
||||
{
|
||||
char Name[ DSD_NAME_SIZE];
|
||||
char Heap_Name[ DSD_NAME_SIZE];
|
||||
int OpenSemId; /* Indique le nombre de processus ayant ouvert la struture */
|
||||
short Heap_Owner; /* Indique si la structure est propriétaire du heap sous-jacent */
|
||||
short Status; /* Indique si la structure est valide ou non */
|
||||
NDT_Root ND_Root;
|
||||
} DST_Root;
|
||||
|
||||
/*
|
||||
On utilise le pointeur 'User' de la racine de la struture pour y
|
||||
rattacher des données sur le heap sous-jacent.
|
||||
*/
|
||||
|
||||
typedef struct DST_RootDesc
|
||||
#define DSD_DS_ROOT_GET( ND_Root_Ptr) (( DST_Root *)( ( char *)( ND_Root_Ptr) - offsetof( DST_Root, ND_Root)))
|
||||
#define DSD_ND_ROOT_GET( DS_Root_Ptr) (( NDT_Root *)( ( char *)( DS_Root_Ptr) + offsetof( DST_Root, ND_Root)))
|
||||
|
||||
|
||||
|
||||
typedef struct DST_RootDescZ
|
||||
{
|
||||
char Heap_Name[ DSD_NAME_SIZE];
|
||||
char *Manager_Name;
|
||||
int OpenSemId; /* Indique le nombre de processus ayant ouvert la struture */
|
||||
short Heap_Owner; /* Indique si la structure est propriétaire du heap sous-jacent */
|
||||
short Valid; /* Indique si la structure est valide ou non */
|
||||
} DST_RootDesc;
|
||||
} DST_RootDescZ;
|
||||
|
||||
//char DS_Error_Msg [512];
|
||||
|
||||
@ -159,20 +191,20 @@ typedef struct DST_RootDesc
|
||||
/* */
|
||||
/*------------------------------------------------------------------------------*/
|
||||
|
||||
#define DS_STRUCT_VALID_CHECK( Root_Ptr, RootDesc_Ptr) \
|
||||
if( (RootDesc_Ptr)->Valid == FALSE) \
|
||||
{ \
|
||||
DST_Status status; \
|
||||
int nb_detected = 0, nb_corrected = 0; \
|
||||
\
|
||||
\
|
||||
if( ( status = DS_DataStruct_Check_I( (Root_Ptr), &nb_detected, &nb_corrected, DS_stderr)) != DSS_OK) \
|
||||
{ \
|
||||
LG_LOG_ERROR_0( "Unable to check the data structure"); \
|
||||
\
|
||||
return( status); \
|
||||
} \
|
||||
} \
|
||||
#define DS_STRUCT_VALID_CHECK( Root_Ptr) \
|
||||
if( !DSD_DATASTRUCT_STATUS_VALUE_VALID( (Root_Ptr)->Status)) \
|
||||
{ \
|
||||
DST_Status status; \
|
||||
int nb_detected = 0, nb_corrected = 0; \
|
||||
\
|
||||
\
|
||||
if( ( status = DS_DataStruct_Check_I( Root_Ptr, &nb_detected, &nb_corrected, DS_stderr)) != DSS_OK) \
|
||||
{ \
|
||||
LG_LOG_ERROR_0( "Unable to check the data structure"); \
|
||||
\
|
||||
return( status); \
|
||||
} \
|
||||
} \
|
||||
|
||||
|
||||
|
||||
@ -395,7 +427,7 @@ DSD_API DST_Status DS_Library_Stderr_Set_CL( FILE *Out);
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_DataStruct_Open_I( NDT_Root **Root, char *DS_Name, NDT_Index_Nb, NDT_Index_Type *, char *Manager_FileName, size_t Segment_Size, DST_Flags Open_Mode, short Own_Value);
|
||||
DSD_API DST_Status DS_DataStruct_Open_I( DST_Root **Root, char *DS_Name, NDT_Index_Nb, NDT_Index_Type *, char *Manager_FileName, size_t Segment_Size, DST_Flags Open_Mode, short Own_Value);
|
||||
|
||||
/*
|
||||
DSD_API DST_Status DS_DataStruct_Open_I( const char *DS_Name, NDT_Root **Root, NDT_DataStruct_Type Type, const char * Manager_FileName, size_t Segment_Size, DST_Flags Open_Mode, int Own_Value);
|
||||
@ -412,9 +444,9 @@ DSD_API DST_Status DS_DataStruct_Open_CL( const char *DS_Name, NDT_Root **Roo
|
||||
/* (O) Locked : verrou effectif (TRUE ou FALSE) */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_DataStruct_Lock_I( NDT_Root *Root_Ptr, DST_Flags Lock_Mode, int *Locked);
|
||||
DSD_API DST_Status DS_DataStruct_Lock_L( NDT_Root *Root_Ptr, DST_Flags Lock_Mode, int *Locked);
|
||||
DSD_API DST_Status DS_DataStruct_Lock_CL( NDT_Root *Root_Ptr, DST_Flags Lock_Mode, int *Locked);
|
||||
DSD_API DST_Status DS_DataStruct_Lock_I( DST_Root *Root_Ptr, DST_Flags Lock_Mode, int *Locked);
|
||||
DSD_API DST_Status DS_DataStruct_Lock_L( DST_Root *Root_Ptr, DST_Flags Lock_Mode, int *Locked);
|
||||
DSD_API DST_Status DS_DataStruct_Lock_CL( DST_Root *Root_Ptr, DST_Flags Lock_Mode, int *Locked);
|
||||
|
||||
|
||||
|
||||
@ -424,9 +456,9 @@ DSD_API DST_Status DS_DataStruct_Lock_CL( NDT_Root *Root_Ptr, DST_Flags Lock_
|
||||
/* (I) Root : pointeur sur la racine de la structure */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_DataStruct_Unlock_I( NDT_Root *Root_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Unlock_L( NDT_Root *Root_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Unlock_CL( NDT_Root *Root_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Unlock_I( DST_Root *Root_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Unlock_L( DST_Root *Root_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Unlock_CL( DST_Root *Root_Ptr);
|
||||
|
||||
|
||||
|
||||
@ -437,9 +469,9 @@ DSD_API DST_Status DS_DataStruct_Unlock_CL( NDT_Root *Root_Ptr);
|
||||
/* (I) Close_Mode : mode de fermeture de la structure (destruction ou non) */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_DataStruct_Close_I( NDT_Root *Root_Ptr, DST_Flags Close_Mode);
|
||||
DSD_API DST_Status DS_DataStruct_Close_L( NDT_Root *Root_Ptr, DST_Flags Close_Mode);
|
||||
DSD_API DST_Status DS_DataStruct_Close_CL( NDT_Root *Root_Ptr, DST_Flags Close_Mode);
|
||||
DSD_API DST_Status DS_DataStruct_Close_I( DST_Root *Root_Ptr, DST_Flags Close_Mode);
|
||||
DSD_API DST_Status DS_DataStruct_Close_L( DST_Root *Root_Ptr, DST_Flags Close_Mode);
|
||||
DSD_API DST_Status DS_DataStruct_Close_CL( DST_Root *Root_Ptr, DST_Flags Close_Mode);
|
||||
|
||||
|
||||
|
||||
@ -449,9 +481,9 @@ DSD_API DST_Status DS_DataStruct_Close_CL( NDT_Root *Root_Ptr, DST_Flags Clo
|
||||
/* (I) Root_Ptr: Data structure pointer */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API NDT_Status DS_DataStruct_Flush_I( NDT_Root *Root_Ptr);
|
||||
DSD_API NDT_Status DS_DataStruct_Flush_L( NDT_Root *Root_Ptr);
|
||||
DSD_API NDT_Status DS_DataStruct_Flush_CL( NDT_Root *Root_Ptr);
|
||||
DSD_API NDT_Status DS_DataStruct_Flush_I( DST_Root *Root_Ptr);
|
||||
DSD_API NDT_Status DS_DataStruct_Flush_L( DST_Root *Root_Ptr);
|
||||
DSD_API NDT_Status DS_DataStruct_Flush_CL( DST_Root *Root_Ptr);
|
||||
|
||||
|
||||
|
||||
@ -466,9 +498,9 @@ DSD_API NDT_Status DS_DataStruct_Flush_CL( NDT_Root *Root_Ptr);
|
||||
/* (I) Out: Output stream */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_DataStruct_Check_I( NDT_Root *Root_Ptr, int *Error_Detected_Nb_Ptr, int *Error_Corrected_Nb_Ptr, FILE *Out);
|
||||
DSD_API DST_Status DS_DataStruct_Check_L( NDT_Root *Root_Ptr, int *Error_Detected_Nb_Ptr, int *Error_Corrected_Nb_Ptr, FILE *Out);
|
||||
DSD_API DST_Status DS_DataStruct_Check_CL( NDT_Root *Root_Ptr, int *Error_Detected_Nb_Ptr, int *Error_Corrected_Nb_Ptr, FILE *Out);
|
||||
DSD_API DST_Status DS_DataStruct_Check_I( DST_Root *Root_Ptr, int *Error_Detected_Nb_Ptr, int *Error_Corrected_Nb_Ptr, FILE *Out);
|
||||
DSD_API DST_Status DS_DataStruct_Check_L( DST_Root *Root_Ptr, int *Error_Detected_Nb_Ptr, int *Error_Corrected_Nb_Ptr, FILE *Out);
|
||||
DSD_API DST_Status DS_DataStruct_Check_CL( DST_Root *Root_Ptr, int *Error_Detected_Nb_Ptr, int *Error_Corrected_Nb_Ptr, FILE *Out);
|
||||
|
||||
|
||||
|
||||
@ -479,9 +511,9 @@ DSD_API DST_Status DS_DataStruct_Check_CL( NDT_Root *Root_Ptr, int *Error_Det
|
||||
/* (I) Index_Type_Ptr: Array of index type (List, tree, ...) */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_DataStruct_Convert_I( NDT_Root *Root_Ptr, NDT_Index_Type *Index_Type_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Convert_L( NDT_Root *Root_Ptr, NDT_Index_Type *Index_Type_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Convert_CL( NDT_Root *Root_Ptr, NDT_Index_Type *Index_Type_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Convert_I( DST_Root *Root_Ptr, NDT_Index_Type *Index_Type_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Convert_L( DST_Root *Root_Ptr, NDT_Index_Type *Index_Type_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Convert_CL( DST_Root *Root_Ptr, NDT_Index_Type *Index_Type_Ptr);
|
||||
|
||||
|
||||
|
||||
@ -493,9 +525,9 @@ DSD_API DST_Status DS_DataStruct_Convert_CL( NDT_Root *Root_Ptr, NDT_Index_Typ
|
||||
/* (I) Root_Ptr: Data structure pointer */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_DataStruct_Reorg_I( NDT_Root *Root_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Reorg_L( NDT_Root *Root_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Reorg_CL( NDT_Root *Root_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Reorg_I( DST_Root *Root_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Reorg_L( DST_Root *Root_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Reorg_CL( DST_Root *Root_Ptr);
|
||||
|
||||
|
||||
|
||||
@ -509,9 +541,9 @@ DSD_API DST_Status DS_DataStruct_Reorg_CL( NDT_Root *Root_Ptr);
|
||||
/* (I) Recursive_Offset: Curent print out offset */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_DataStruct_Info_Print_I( FILE *Out, NDT_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset);
|
||||
DSD_API DST_Status DS_DataStruct_Info_Print_L( FILE *Out, NDT_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset);
|
||||
DSD_API DST_Status DS_DataStruct_Info_Print_CL( FILE *Out, NDT_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset);
|
||||
DSD_API DST_Status DS_DataStruct_Info_Print_I( FILE *Out, DST_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset);
|
||||
DSD_API DST_Status DS_DataStruct_Info_Print_L( FILE *Out, DST_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset);
|
||||
DSD_API DST_Status DS_DataStruct_Info_Print_CL( FILE *Out, DST_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset);
|
||||
|
||||
|
||||
|
||||
@ -522,9 +554,9 @@ DSD_API DST_Status DS_DataStruct_Info_Print_CL( FILE *Out, NDT_Root *Root_Ptr,
|
||||
/* (I) Value_Ptr: Value pointer */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_DataStruct_Value_Add_I( NDT_Root *Root_Ptr, void *Value_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Value_Add_L( NDT_Root *Root_Ptr, void *Value_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Value_Add_CL( NDT_Root *Root_Ptr, void *Value_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Value_Add_I( DST_Root *Root_Ptr, void *Value_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Value_Add_L( DST_Root *Root_Ptr, void *Value_Ptr);
|
||||
DSD_API DST_Status DS_DataStruct_Value_Add_CL( DST_Root *Root_Ptr, void *Value_Ptr);
|
||||
|
||||
|
||||
|
||||
@ -567,9 +599,9 @@ DSD_API DST_Status DS_DataStruct_Print_CL( NDT_Root * Root, FILE * Out);
|
||||
/* (I) ...: User args */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_DataStruct_Value_Print_I( FILE *Out_Ptr, NDT_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset, ...);
|
||||
DSD_API DST_Status DS_DataStruct_Value_Print_L( FILE *Out_Ptr, NDT_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset, ...);
|
||||
DSD_API DST_Status DS_DataStruct_Value_Print_CL( FILE *Out_Ptr, NDT_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset, ...);
|
||||
DSD_API DST_Status DS_DataStruct_Value_Print_I( FILE *Out_Ptr, DST_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset, ...);
|
||||
DSD_API DST_Status DS_DataStruct_Value_Print_L( FILE *Out_Ptr, DST_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset, ...);
|
||||
DSD_API DST_Status DS_DataStruct_Value_Print_CL( FILE *Out_Ptr, DST_Root *Root_Ptr, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset, ...);
|
||||
|
||||
|
||||
|
||||
@ -581,9 +613,9 @@ DSD_API DST_Status DS_DataStruct_Value_Print_CL( FILE *Out_Ptr, NDT_Root *Roo
|
||||
/* (I) Index_Type: Index type (List, tree, ...) */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API NDT_Status DS_Index_Open_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
DSD_API NDT_Status DS_Index_Open_L( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
DSD_API NDT_Status DS_Index_Open_CL( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
DSD_API NDT_Status DS_Index_Open_I( DST_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
DSD_API NDT_Status DS_Index_Open_L( DST_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
DSD_API NDT_Status DS_Index_Open_CL( DST_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
|
||||
|
||||
|
||||
@ -594,9 +626,9 @@ DSD_API NDT_Status DS_Index_Open_CL( NDT_Root *Root_Ptr, NDT_Index_Id Index_I
|
||||
/* (I) Index_Id: Id of the index */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API NDT_Status DS_Index_Close_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id);
|
||||
DSD_API NDT_Status DS_Index_Close_L( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id);
|
||||
DSD_API NDT_Status DS_Index_Close_CL( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id);
|
||||
DSD_API NDT_Status DS_Index_Close_I( DST_Root *Root_Ptr, NDT_Index_Id Index_Id);
|
||||
DSD_API NDT_Status DS_Index_Close_L( DST_Root *Root_Ptr, NDT_Index_Id Index_Id);
|
||||
DSD_API NDT_Status DS_Index_Close_CL( DST_Root *Root_Ptr, NDT_Index_Id Index_Id);
|
||||
|
||||
|
||||
|
||||
@ -608,9 +640,9 @@ DSD_API NDT_Status DS_Index_Close_CL( NDT_Root *Root_Ptr, NDT_Index_Id Index_
|
||||
/* (I) Index_Type: Index type (List, tree, ...) */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API NDT_Status DS_Index_Convert_I( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
DSD_API NDT_Status DS_Index_Convert_L( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
DSD_API NDT_Status DS_Index_Convert_CL( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
DSD_API NDT_Status DS_Index_Convert_I( DST_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
DSD_API NDT_Status DS_Index_Convert_L( DST_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
DSD_API NDT_Status DS_Index_Convert_CL( DST_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Index_Type Index_Type);
|
||||
|
||||
|
||||
|
||||
@ -714,9 +746,9 @@ DSD_API DST_Status DS_Node_Find_CL( NDT_Root * Root, NDT_Node ** Node, void * V
|
||||
/* (I) ... : arguments relatifs à l'allocation de la valeur */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DSD_API DST_Status DS_Value_Alloc_I( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, ...);
|
||||
DSD_API DST_Status DS_Value_Alloc_L( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, ...);
|
||||
DSD_API DST_Status DS_Value_Alloc_CL( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, ...);
|
||||
DSD_API DST_Status DS_Value_Alloc_I( void **Value_Ptr_Ptr, DST_Root *Root_Ptr, ...);
|
||||
DSD_API DST_Status DS_Value_Alloc_L( void **Value_Ptr_Ptr, DST_Root *Root_Ptr, ...);
|
||||
DSD_API DST_Status DS_Value_Alloc_CL( void **Value_Ptr_Ptr, DST_Root *Root_Ptr, ...);
|
||||
|
||||
|
||||
|
||||
|
485
lib/libdatastr.c
485
lib/libdatastr.c
File diff suppressed because it is too large
Load Diff
@ -95,7 +95,7 @@ NDT_Root *OpenedDS_List;
|
||||
typedef struct DST_DataStruct
|
||||
{
|
||||
char Name[ DSD_NAME_SIZE];
|
||||
NDT_Root *Root_Ptr;
|
||||
DST_Root *Root_Ptr;
|
||||
} DST_DataStruct;
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ typedef struct DST_DataStruct
|
||||
/* Création d'un sémaphore pour gérer l'ouverture d'une data structure */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DST_Status DS_Semaphore_Create( NDT_Root *);
|
||||
DST_Status DS_Semaphore_Create( DST_Root *);
|
||||
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ DST_Status DS_Semaphore_Create( NDT_Root *);
|
||||
/* Opération sur un sémaphore */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DST_Status DS_Semaphore_Operate (int, struct sembuf *, unsigned int);
|
||||
DST_Status DS_Semaphore_Operate (int, struct sembuf *, unsigned int);
|
||||
|
||||
|
||||
|
||||
@ -126,7 +126,7 @@ DST_Status DS_Semaphore_Operate (int, struct sembuf *, unsigned int);
|
||||
/* Fonction d'allocation attachée à une structure de données : */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DST_Status DS_DataStruct_Alloc ( void **Ptr_Ptr, size_t Size, void *Data );
|
||||
DST_Status DS_DataStruct_Alloc ( void **Ptr_Ptr, NDT_Root *ND_Root_Ptr, size_t Size, void *User_Ptr);
|
||||
|
||||
|
||||
|
||||
@ -134,14 +134,14 @@ DST_Status DS_DataStruct_Alloc ( void **Ptr_Ptr, size_t Size, void *Data );
|
||||
/* Fonction de désallocation attachée à une structure de données : */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DST_Status DS_DataStruct_Free ( void *Ptr, void *Data );
|
||||
DST_Status DS_DataStruct_Free ( void *Ptr, NDT_Root *ND_Root_Ptr, void *User_Ptr );
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Routine d'affichage d'un message d'erreur */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
void DS_Error_Print ( void );
|
||||
void DS_Error_Print ( void );
|
||||
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ DST_Status DS_Name_Prefix( char *Prefixed, const char *Unprefixed);
|
||||
/* Teste si une data structure a déjà été ouverte par le processus courant */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DST_Status DS_DataStruct_IsOpen( NDT_Root **Root_Ptr_Ptr, char *DS_Name);
|
||||
DST_Status DS_DataStruct_IsOpen( DST_Root **Root_Ptr_Ptr, char *DS_Name);
|
||||
|
||||
|
||||
|
||||
@ -165,5 +165,5 @@ DST_Status DS_DataStruct_IsOpen( NDT_Root **Root_Ptr_Ptr, char *DS_Name);
|
||||
/* Fonction manager de la liste des DS ouvertes */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
NDT_Status DS_OpenedDS_List_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list *Args_Ptr);
|
||||
NDT_Status DS_OpenedDS_List_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list *Args_Ptr);
|
||||
|
||||
|
@ -223,13 +223,13 @@ NDT_Index_Type DBD_IDX_TYPE_BALANCED_TREE = NDD_INDEX_STATUS_OPENED | NDD_INDEX
|
||||
|
||||
NDT_Status Module_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
|
||||
|
||||
void Menu_Print( FILE *, NDT_Root *);
|
||||
void Menu_Print( FILE *, DST_Root *);
|
||||
void Command_Get( int *, char **, char **, char **, FILE *, FILE *, short);
|
||||
void Command_Exec_Begin_Print( FILE *, int);
|
||||
void Command_Exec_End_Print( FILE *, int, cpt, int);
|
||||
void Command_Index_Range_Get( FILE *, int *, int *, char *, char *, FILE *, int, char *);
|
||||
void Command_Exec( NDT_Root **, FILE *, int, char *, char *, char *, FILE *);
|
||||
void Batch_Run( NDT_Root **, FILE *, FILE *, short);
|
||||
void Command_Exec( DST_Root **, FILE *, int, char *, char *, char *, FILE *);
|
||||
void Batch_Run( DST_Root **, FILE *, FILE *, short);
|
||||
|
||||
|
||||
|
||||
@ -588,7 +588,7 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
||||
ND_VA_LIST_CLOSE( lib_args);
|
||||
|
||||
char *Root_Type;
|
||||
DST_RootDesc *RootDesc;
|
||||
// DST_RootDesc *RootDesc;
|
||||
|
||||
|
||||
Command_Name = "NDD_CMD_INFO_PRINT";
|
||||
@ -682,7 +682,7 @@ NDT_Status Module_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Nod
|
||||
/* Menu_Print */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
void Menu_Print( FILE *File_Output, NDT_Root *DS_Ptr)
|
||||
void Menu_Print( FILE *File_Output, DST_Root *DS_Ptr)
|
||||
{
|
||||
short i;
|
||||
char headc;
|
||||
@ -692,7 +692,7 @@ void Menu_Print( FILE *File_Output, NDT_Root *DS_Ptr)
|
||||
|
||||
for( i = 0; i < COMMAND_NB; i++)
|
||||
{
|
||||
if( ( DS_Ptr && ( Command_Tab[i].DS_State & DS_STATE_OPENED) && ( DS_Ptr->Index_Tab[0].Type & Command_Tab[i].Index_Type))
|
||||
if( ( DS_Ptr && ( Command_Tab[i].DS_State & DS_STATE_OPENED) && ( DS_Ptr->ND_Root.Index_Tab[0].Type & Command_Tab[i].Index_Type))
|
||||
|| ( !DS_Ptr && ( Command_Tab[i].DS_State & DS_STATE_CLOSED)))
|
||||
{
|
||||
headc = '-';
|
||||
@ -890,7 +890,7 @@ void Command_Index_Range_Get( FILE *File_Output, int *Low, int *High, char
|
||||
/* Command_Exec */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, char *Arg1, char *Arg2, char *Arg3, FILE *File_Input)
|
||||
void Command_Exec( DST_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, char *Arg1, char *Arg2, char *Arg3, FILE *File_Input)
|
||||
{
|
||||
DST_Status status;
|
||||
int sub_choice_int1, sub_choice_int2, low, high, i, j, inc, nb_removed, nb_detected, nb_corrected;
|
||||
@ -1287,7 +1287,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
|
||||
|
||||
for( i = low; i <= high; i++)
|
||||
{
|
||||
ND_Index_Open( *DS_Ptr_Ptr, (NDT_Index_Id)i, DBD_IDX_TYPE_BALANCED_TREE);
|
||||
ND_Index_Open( &( ( *DS_Ptr_Ptr)->ND_Root), (NDT_Index_Id)i, DBD_IDX_TYPE_BALANCED_TREE);
|
||||
}
|
||||
|
||||
t_stop( t_exec);
|
||||
@ -1313,7 +1313,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
|
||||
|
||||
for( i = high; i >= low; i--)
|
||||
{
|
||||
ND_Index_Close( *DS_Ptr_Ptr, (NDT_Index_Id)i);
|
||||
ND_Index_Close( &( ( *DS_Ptr_Ptr)->ND_Root), (NDT_Index_Id)i);
|
||||
}
|
||||
|
||||
t_stop( t_exec);
|
||||
@ -1747,7 +1747,7 @@ void Command_Exec( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, int Choice, cha
|
||||
/* Batch_Run */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
void Batch_Run( NDT_Root **DS_Ptr_Ptr, FILE *File_Output, FILE *File_Input, short Interactive_Flag)
|
||||
void Batch_Run( DST_Root **DS_Ptr_Ptr, FILE *File_Output, FILE *File_Input, short Interactive_Flag)
|
||||
{
|
||||
int choice;
|
||||
char *arg1, *arg2, *arg3;
|
||||
@ -1786,7 +1786,7 @@ int main( int argc, char **argv)
|
||||
{
|
||||
int rc = 0;
|
||||
LGT_Status lg_status;
|
||||
NDT_Root *ds_ptr = NULL;
|
||||
DST_Root *ds_ptr = NULL;
|
||||
|
||||
|
||||
if( ( lg_status = LG_Library_Open( LGD_LOG_WRITER_DEFAULT, true)) != LGS_OK)
|
||||
|
Loading…
Reference in New Issue
Block a user