Initial support for LibNode 2.1.x.
Not working version... Update revision number to 2.0 !
This commit is contained in:
parent
626c9e80f1
commit
bb73fb28cc
@ -1,3 +1,34 @@
|
|||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* $RCSfile: shmem.h,v $ */
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* $Revision: 2.0 $ */
|
||||||
|
/* $Name: $ */
|
||||||
|
/* $Date: 2005/01/24 22:57:06 $ */
|
||||||
|
/* $Author: agibert $ */
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* This file is part of LibShMem */
|
||||||
|
/* */
|
||||||
|
/* LibShMem is free software; you can redistribute it and/or modify */
|
||||||
|
/* it under the terms of the GNU Lesser General Public Licence as published by */
|
||||||
|
/* the Free Software Foundation; either version 2.1 of the License, or */
|
||||||
|
/* (at your option) any later version. */
|
||||||
|
/* */
|
||||||
|
/* LibShMem is distributed in the hope that it will be useful, */
|
||||||
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
|
/* GNU Lesser General Public License for more details. */
|
||||||
|
/* */
|
||||||
|
/* You should have received a copy of the GNU Lesser General Public License */
|
||||||
|
/* along with LibShMem; if not, write to the Free Software */
|
||||||
|
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _LIBSM
|
#ifndef _LIBSM
|
||||||
#define _LIBSM
|
#define _LIBSM
|
||||||
|
|
||||||
|
694
lib/libshmem.c
694
lib/libshmem.c
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,59 @@
|
|||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* $RCSfile: libshmem.h,v $ */
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* $Revision: 2.0 $ */
|
||||||
|
/* $Name: $ */
|
||||||
|
/* $Date: 2005/01/24 22:57:06 $ */
|
||||||
|
/* $Author: agibert $ */
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* This file is part of LibShMem */
|
||||||
|
/* */
|
||||||
|
/* LibShMem is free software; you can redistribute it and/or modify */
|
||||||
|
/* it under the terms of the GNU Lesser General Public Licence as published by */
|
||||||
|
/* the Free Software Foundation; either version 2.1 of the License, or */
|
||||||
|
/* (at your option) any later version. */
|
||||||
|
/* */
|
||||||
|
/* LibShMem is distributed in the hope that it will be useful, */
|
||||||
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
|
/* GNU Lesser General Public License for more details. */
|
||||||
|
/* */
|
||||||
|
/* You should have received a copy of the GNU Lesser General Public License */
|
||||||
|
/* along with LibShMem; if not, write to the Free Software */
|
||||||
|
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdarg.h>
|
|
||||||
#include <sys/sem.h>
|
#include <sys/sem.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <ver.h>
|
|
||||||
#include <shmem.h>
|
#include <shmem.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Compteur d'ouverture de la librairie */
|
/* Compteur d'ouverture de la librairie */
|
||||||
|
|
||||||
unsigned int SM_Open_Counter = 0;
|
unsigned int SM_Open_Counter = 0;
|
||||||
|
|
||||||
|
|
||||||
/* Flux de sortie des messages d'erreur générés par la librairie */
|
/* Flux de sortie des messages d'erreur générés par la librairie */
|
||||||
|
|
||||||
FILE * SM_stderr;
|
FILE * SM_stderr;
|
||||||
@ -22,10 +62,15 @@ extern char * strdup (const char *);
|
|||||||
|
|
||||||
#define max(A,B) ((A < B) ? B : A)
|
#define max(A,B) ((A < B) ? B : A)
|
||||||
|
|
||||||
|
|
||||||
/* Limite supérieure d'adressage */
|
/* Limite supérieure d'adressage */
|
||||||
|
|
||||||
#define MEM_LIMIT 1000000000
|
#define MEM_LIMIT 1000000000
|
||||||
|
|
||||||
|
|
||||||
|
#define SMD_CMD_VALUE_SUM (NDT_Command)65
|
||||||
|
|
||||||
|
|
||||||
/* Taille d'un segment = 100 Ko par défaut */
|
/* Taille d'un segment = 100 Ko par défaut */
|
||||||
|
|
||||||
#define K 1024
|
#define K 1024
|
||||||
@ -34,6 +79,7 @@ extern char * strdup (const char *);
|
|||||||
|
|
||||||
char Info_Msg [256];
|
char Info_Msg [256];
|
||||||
|
|
||||||
|
|
||||||
/* Etats possibles pour un heap */
|
/* Etats possibles pour un heap */
|
||||||
|
|
||||||
#define SMD_STATE_VALID 0
|
#define SMD_STATE_VALID 0
|
||||||
|
Loading…
Reference in New Issue
Block a user