- Initial support for libnode-2.3.x

- Start to cleanup the code...
This commit is contained in:
Arnaud G. GIBERT 2024-04-14 20:00:25 +02:00
parent 0e2be6c11b
commit 604b749d4e
5 changed files with 676 additions and 451 deletions

View File

@ -20,7 +20,7 @@ default:all
# Here are all the rules allowing to compile sources files # Here are all the rules allowing to compile sources files
# c -> o # c -> o
%.o:%.c %.o:%.c
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ $(CC) $(CFLAGS) $(INCLUDE) -fPIC -c $< -o $@
# c -> executable # c -> executable
.c : .c :

View File

@ -31,7 +31,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <sys/wait.h>
#include <node.h> #include <node.h>

View File

@ -41,7 +41,7 @@ extern "C" {
#include <node.h> #include <node.h>
/* Code retour des fonctions constituant l'API */ /* Code retour des fonctions constituant l'API */
typedef long SMT_Status; typedef long SMT_Status;
#define SMS_OK NDS_OK /* La fonction s'est correctement exécutée et a produit un résultat */ #define SMS_OK NDS_OK /* La fonction s'est correctement exécutée et a produit un résultat */
@ -116,7 +116,11 @@ extern "C" {
#define TRUE 1 #define TRUE 1
#endif #endif
#ifdef _LIBSHMEM_C_
char SM_Error_Msg [512]; char SM_Error_Msg [512];
#else
extern char SM_Error_Msg [512];
#endif
#ifndef SM_MODE #ifndef SM_MODE
#define SM_MODE 0 #define SM_MODE 0
@ -189,7 +193,11 @@ extern "C" {
/* Référence sur la base de heaps */ /* Référence sur la base de heaps */
#ifdef _LIBSHMEM_C_
SMT_Base * SM_Base; SMT_Base * SM_Base;
#else
extern SMT_Base * SM_Base;
#endif
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Structure d'un MHH (Memory Heap Header) */ /* Structure d'un MHH (Memory Heap Header) */

File diff suppressed because it is too large Load Diff

View File

@ -217,12 +217,12 @@ SMT_Status SM_Base_Unlock (SMT_Flags);
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Fonction manager de la liste des heaps ouverts */ /* Fonction manager de la liste des heaps ouverts */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
NDT_Status SM_Opened_Heap_List_Manager ( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list); NDT_Status SM_Opened_Heap_List_Manager ( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Fonction manager du MHR (Memory Heap Root) */ /* Fonction manager du MHR (Memory Heap Root) */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
NDT_Status MHR_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list); NDT_Status MHR_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Destruction d'un MHH (Memory Heap Header) */ /* Destruction d'un MHH (Memory Heap Header) */
@ -232,7 +232,7 @@ SMT_Status SM_MHH_End (SMT_MHH *);
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Fonction manager pour un DSR (Data Segment Root) */ /* Fonction manager pour un DSR (Data Segment Root) */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
NDT_Status SM_DSR_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list); NDT_Status SM_DSR_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Ouverture d'un segment de données */ /* Ouverture d'un segment de données */
@ -252,12 +252,12 @@ size_t SM_DataSegment_Compress (SMT_DSH *, NDT_Root *);
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Fonction manager pour un ACR (Allocated Chunk Root) */ /* Fonction manager pour un ACR (Allocated Chunk Root) */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
NDT_Status SM_ACR_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list); NDT_Status SM_ACR_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Fonction manager pour un FCR (Free Chunk Root) */ /* Fonction manager pour un FCR (Free Chunk Root) */
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
NDT_Status SM_FCR_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list); NDT_Status SM_FCR_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list *);
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* Pose d'un verrou sur un heap : */ /* Pose d'un verrou sur un heap : */