Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Modifying the API so as to prevent a use of the context that would make valgrind...
[simgrid.git] / include / xbt / misc.h
index 7cb25f5..33f15d0 100644 (file)
@@ -1,23 +1,28 @@
 /* $Id$ */
 
-/* xbt.h - Public interface to the xbt (gras's toolbox)                   */
+/* xbt.h - Public interface to the xbt (gras's toolbox)                     */
 
-/* Authors: Martin Quinson                                                  */
-/* Copyright (C) 2004 the OURAGAN project.                                  */
+/* Copyright (c) 2004 Martin Quinson.                                       */
+/* Copyright (c) 2004 Arnaud Legrand.                                       */
+/* All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  under the terms of the license (GNU LGPL) which comes with this package. */
* under the terms of the license (GNU LGPL) which comes with this package. */
 
 #ifndef XBT_MISC_H
 #define XBT_MISC_H
 
-#define max(a, b) (((a) > (b))?(a):(b))
-#define min(a, b) (((a) < (b))?(a):(b))
+#ifndef max
+#  define max(a, b) (((a) > (b))?(a):(b))
+#endif
+#ifndef min
+#  define min(a, b) (((a) < (b))?(a):(b))
+#endif
 
 #define TRUE  1
 #define FALSE 0
 
-#define GRAS_MAX_CHANNEL 10 /* FIXME: killme */
+#define XBT_MAX_CHANNEL 10 /* FIXME: killme */
 /*! C++ users need love */
 #ifndef BEGIN_DECL
 # ifdef __cplusplus
@@ -42,7 +47,11 @@ BEGIN_DECL
 typedef struct {  
    char *name;
    int port;
-} gras_host_t;
+} xbt_host_t;
+
+/* pointer to a function freeing something */
+typedef   void (void_f_ppvoid_t)(void**);
+typedef   void (void_f_pvoid_t) (void*);
 
 END_DECL