From 6bf117656574521545694a1a4e5169755077631e Mon Sep 17 00:00:00 2001 From: fcolin Date: Wed, 19 Apr 2006 08:28:14 +0000 Subject: correction de probleme potentiel en multithread ( Ada rejeu ) ajout d'un warning en cas de client bloquant si la varaiable d'env IVY_DEBUG_SEND est positionne --- src/list.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/list.h') diff --git a/src/list.h b/src/list.h index 472d2fc..968f619 100644 --- a/src/list.h +++ b/src/list.h @@ -50,14 +50,24 @@ }\ } \ } - -#define IVY_LIST_ADD(list, p ) \ +/* +on place le code d'initialisation de l'objet entre START et END +pour eviter de chainer un objet non initialise +*/ +#define IVY_LIST_ADD_START(list, p ) \ if ((p = (TYPEOF(p)) (malloc( sizeof( *p ))))) \ { \ - memset( p, 0 , sizeof( *p ));\ + memset( p, 0 , sizeof( *p )); + +#define IVY_LIST_ADD_END(list, p ) \ p->next = list; \ list = p; \ - } + } \ + else \ + { \ + perror( "IVY LIST ADD malloc" ); \ + exit(0); \ + } #define IVY_LIST_EACH( list, p ) \ for ( p = list ; p ; p = p -> next ) -- cgit v1.1