summaryrefslogtreecommitdiff
path: root/src/list.h
diff options
context:
space:
mode:
authorfcolin2006-04-19 08:28:14 +0000
committerfcolin2006-04-19 08:28:14 +0000
commit6bf117656574521545694a1a4e5169755077631e (patch)
treef18c164c217e2279781a3af9851b644da97dfba1 /src/list.h
parentca9eddefaec96a20b88b9aba25a9384037317c91 (diff)
downloadivy-c-6bf117656574521545694a1a4e5169755077631e.zip
ivy-c-6bf117656574521545694a1a4e5169755077631e.tar.gz
ivy-c-6bf117656574521545694a1a4e5169755077631e.tar.bz2
ivy-c-6bf117656574521545694a1a4e5169755077631e.tar.xz
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
Diffstat (limited to 'src/list.h')
-rw-r--r--src/list.h18
1 files changed, 14 insertions, 4 deletions
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 )