Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
splint'able
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 27 Feb 2005 23:02:56 +0000 (23:02 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 27 Feb 2005 23:02:56 +0000 (23:02 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1081 48e7efb5-ca39-0410-a469-dd3cf9ba447f

12 files changed:
include/xbt/dynar.h
include/xbt/error.h
include/xbt/log.h
include/xbt/set.h
include/xbt/swag.h
src/xbt/context.c
src/xbt/context_private.h
src/xbt/context_win32.h
src/xbt/error.c
src/xbt/fifo.c
src/xbt/heap.c
src/xbt/swag.c

index 7e09bb5..5f1df3b 100644 (file)
@@ -175,5 +175,5 @@ xbt_dynar_foreach (dyn,cpt,str) {
 
 END_DECL()
 
-/*@}*/
+/* @} */
 #endif /* _XBT_DYNAR_H */
index c91ea1e..bf8dc03 100644 (file)
@@ -155,7 +155,7 @@ typedef enum {
           __FILE__,__LINE__,__FUNCTION__,a1,a2,a3,a4,a5,a6); \
   _XBT_ERR_POST(code)
 
-/**@}*/
+/** @} */
 /** 
  * \name 4. assert macro familly
  *
@@ -193,7 +193,7 @@ typedef enum {
 #define xbt_assert6(cond,msg,a,b,c,d,e,f) if (!(cond)) { CRITICAL6(msg,a,b,c,d,e,f); xbt_abort(); }
 #endif
 
-/** @}*/
+/** @} */
 
 /** @name 5. Useful predefined errors 
  *
@@ -205,8 +205,8 @@ typedef enum {
 #define DIE_IMPOSSIBLE xbt_assert0(0,"The Impossible did happen (yet again)")
 #define xbt_assert_error(a) xbt_assert1(errcode == (a), "Error %s unexpected",xbt_error_name(errcode))
 
-/** @}*/
-/**@}*/
+/** @} */
+/** @} */
 
 END_DECL()
 
index 0de5738..9bb6e77 100644 (file)
@@ -15,9 +15,9 @@
 #ifndef _XBT_LOG_H_
 #define _XBT_LOG_H_
 
-#include <stdarg.h>
+#include "xbt/misc.h"
 
-#include "xbt/sysdep.h"
+#include <stdarg.h>
 
 /**\brief Log priorities
  * \ingroup XBT_log
@@ -392,7 +392,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
  * for sake of clarity. They just differ in the number of arguments passed
  * along with the format string.
  */
-/*@{*/
+/* @{ */
 #define DEBUG0(f)                   LOG0(xbt_log_priority_debug, f)
 #define DEBUG1(f,a1)                LOG1(xbt_log_priority_debug, f,a1)
 #define DEBUG2(f,a1,a2)             LOG2(xbt_log_priority_debug, f,a1,a2)
@@ -402,7 +402,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
 #define DEBUG6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6)
 #define DEBUG7(f,a1,a2,a3,a4,a5,a6,a7) LOG7(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7)
 #define DEBUG8(f,a1,a2,a3,a4,a5,a6,a7,a8) LOG8(xbt_log_priority_debug, f,a1,a2,a3,a4,a5,a6,a7,a8)
-/*@}*/
+/* @} */
 
 /** \name VERB
  * \ingroup XBT_log
@@ -419,7 +419,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
  * for sake of clarity. They just differ in the number of arguments passed
  * along with the format string.
  */
-/*@{*/
+/* @{ */
 #define VERB0(f)                   LOG0(xbt_log_priority_verbose, f)
 #define VERB1(f,a1)                LOG1(xbt_log_priority_verbose, f,a1)
 #define VERB2(f,a1,a2)             LOG2(xbt_log_priority_verbose, f,a1,a2)
@@ -427,7 +427,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
 #define VERB4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_verbose, f,a1,a2,a3,a4)
 #define VERB5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5)
 #define VERB6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_verbose, f,a1,a2,a3,a4,a5,a6)
-/*@}*/
+/* @} */
 
 /** \name INFO
  * \ingroup XBT_log
@@ -444,7 +444,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
  * for sake of clarity. They just differ in the number of arguments passed
  * along with the format string.
  */
-/*@{*/
+/* @{ */
 #define INFO0(f)                   LOG0(xbt_log_priority_info, f)
 #define INFO1(f,a1)                LOG1(xbt_log_priority_info, f,a1)
 #define INFO2(f,a1,a2)             LOG2(xbt_log_priority_info, f,a1,a2)
@@ -452,7 +452,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
 #define INFO4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_info, f,a1,a2,a3,a4)
 #define INFO5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_info, f,a1,a2,a3,a4,a5)
 #define INFO6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_info, f,a1,a2,a3,a4,a5,a6)
-/*@}*/
+/* @} */
 
 /** \name WARN
  * \ingroup XBT_log
@@ -469,7 +469,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
  * for sake of clarity. They just differ in the number of arguments passed
  * along with the format string.
  */
-/*@{*/
+/* @{ */
 #define WARN0(f)                   LOG0(xbt_log_priority_warning, f)
 #define WARN1(f,a1)                LOG1(xbt_log_priority_warning, f,a1)
 #define WARN2(f,a1,a2)             LOG2(xbt_log_priority_warning, f,a1,a2)
@@ -477,7 +477,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
 #define WARN4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_warning, f,a1,a2,a3,a4)
 #define WARN5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_warning, f,a1,a2,a3,a4,a5)
 #define WARN6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_warning, f,a1,a2,a3,a4,a5,a6)
-/*@}*/
+/* @} */
 
 /** \name ERROR
  * \ingroup XBT_log
@@ -494,7 +494,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
  * for sake of clarity. They just differ in the number of arguments passed
  * along with the format string.
  */
-/*@{*/
+/* @{ */
 #define ERROR0(f)                   LOG0(xbt_log_priority_error, f)
 #define ERROR1(f,a1)                LOG1(xbt_log_priority_error, f,a1)
 #define ERROR2(f,a1,a2)             LOG2(xbt_log_priority_error, f,a1,a2)
@@ -502,7 +502,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
 #define ERROR4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_error, f,a1,a2,a3,a4)
 #define ERROR5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_error, f,a1,a2,a3,a4,a5)
 #define ERROR6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_error, f,a1,a2,a3,a4,a5,a6)
-/*@}*/
+/* @} */
 
 /** \name CRITICAL
  * \ingroup XBT_log
@@ -519,7 +519,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
  * for sake of clarity. They just differ in the number of arguments passed
  * along with the format string.
  */
-/*@{*/
+/* @{ */
 #define CRITICAL0(f)                   LOG0(xbt_log_priority_critical, f)
 #define CRITICAL1(f,a1)                LOG1(xbt_log_priority_critical, f,a1)
 #define CRITICAL2(f,a1,a2)             LOG2(xbt_log_priority_critical, f,a1,a2)
@@ -527,7 +527,7 @@ extern xbt_log_appender_t xbt_log_default_appender;
 #define CRITICAL4(f,a1,a2,a3,a4)       LOG4(xbt_log_priority_critical, f,a1,a2,a3,a4)
 #define CRITICAL5(f,a1,a2,a3,a4,a5)    LOG5(xbt_log_priority_critical, f,a1,a2,a3,a4,a5)
 #define CRITICAL6(f,a1,a2,a3,a4,a5,a6) LOG6(xbt_log_priority_critical, f,a1,a2,a3,a4,a5,a6)
-/*@}*/
+/* @} */
 
 #define XBT_IN               LOG1(xbt_log_priority_trace, ">> begin of %s",     _XBT_GNUC_FUNCTION)
 #define XBT_IN1(fmt,a)       LOG2(xbt_log_priority_trace, ">> begin of %s" fmt, _XBT_GNUC_FUNCTION, a)
index d0f0ab8..103c587 100644 (file)
@@ -98,8 +98,8 @@ int          xbt_set_cursor_get_or_free (xbt_set_cursor_t *cursor,
        xbt_set_cursor_get_or_free(&(cursor),(xbt_set_elm_t*)&(elm));          \
        xbt_set_cursor_step(cursor) )
 
-/*@}*/
-/*@}*/
+/* @} */
+/* @} */
 END_DECL()
 
 #endif /* _XBT_SET_H */
index 4c8a42d..0a1f252 100644 (file)
@@ -27,7 +27,7 @@
     do his job but believe me, you don't want to try to play with 
     those structs directly. Use them as an abstract datatype.
 */
-/*@{*/
+/* @{ */
 typedef struct xbt_swag_hookup {
   void *next;
   void *prev;
@@ -64,7 +64,7 @@ typedef struct xbt_swag {
   int count;
 } s_xbt_swag_t, *xbt_swag_t;
 /**< A typical swag */
-/*@}*/
+/* @} */
 
 xbt_swag_t xbt_swag_new(size_t offset);
 void xbt_swag_free(xbt_swag_t swag);
@@ -104,7 +104,7 @@ static __inline__ void *xbt_swag_getFirst(xbt_swag_t swag)
  *
  * Iterates over the whole swag. 
  */
-/*@{*/
+/* @{ */
 #define xbt_swag_foreach(obj,swag)                            \
    for((obj)=xbt_swag_getFirst((swag));                       \
        (obj)!=NULL;                                           \
@@ -130,6 +130,6 @@ static __inline__ void *xbt_swag_getFirst(xbt_swag_t swag)
     You can safely modify the \a swag while using this loop. 
     Well, safely... Err. You can remove \a obj without having any 
     trouble at least.  */
-/*@}*/
+/* @} */
 
 #endif    /* _XBT_SWAG_H */
index 4f57bc7..d628137 100644 (file)
@@ -130,7 +130,7 @@ static void *__context_wrapper(void *c)
 /** \name Functions 
  *  \ingroup XBT_context
  */
-/*@{*/
+/* @{ */
 /** Context module initialization
  *
  * \warning It has to be called before using any other function of this module.
@@ -289,5 +289,4 @@ void xbt_context_free(xbt_context_t context)
 
   return;
 }
-
-/*@}*/
+/* @} */
index 4afc827..5912e5c 100644 (file)
 #include "xbt/sysdep.h"
 #include "xbt/swag.h"
 #include "xbt/dynar.h" /* void_f_pvoid_t */
-#include "portable.h" /* loads context system definitions */
+#include "portable.h"  /* loads context system definitions */
 
 #include "xbt/context.h"
 
+#ifdef S_SPLINT_S
+/* Dummy definition for splint since it chokes on ucontext.h */
+typedef struct ucontext {
+   struct ucontext *uc_link;
+   sigset_t uc_sigmask;
+   int uc_stack;
+   int uc_mcontext;
+} ucontext_t;
+typedef int CONTEXT;
+#endif 
+
 #ifdef USE_PTHREADS
-#include <pthread.h>
+#  include <pthread.h>
 #else
-#define STACK_SIZE 524288
+#  define STACK_SIZE 524288
 #endif     /* USE_PTHREADS */
 
 typedef struct s_xbt_context {
index fa5fa05..6fc8203 100644 (file)
@@ -19,7 +19,9 @@
 #ifndef UCONTEXT_H
 #define UCONTEXT_H
 
-#include <windows.h>
+#ifndef S_SPLINT_S
+#  include <windows.h>
+#endif
 
 typedef struct __stack {
        void *ss_sp;
index 98d1b4a..ff7c3af 100644 (file)
@@ -9,6 +9,7 @@
    under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "xbt/error.h"
+#include "xbt/sysdep.h"
 
 /**
  * \brief Usefull to do nice error repporting messages.
index d596daa..f282a6e 100644 (file)
@@ -20,7 +20,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(fifo,xbt,"FIFO");
 /** \name Functions 
  *  \ingroup XBT_fifo
  */
-/*@{*/
+/* @{ */
 
 /** Constructor
  * \return a new fifo
@@ -394,6 +394,6 @@ xbt_fifo_item_t xbt_fifo_getPrevItem(xbt_fifo_item_t i)
   if(i) return i->prev;
   return NULL;
 }
-/*@}*/
+/* @} */
 
 
index 49e28e4..c6207b9 100644 (file)
@@ -21,7 +21,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(heap, xbt, "Heap");
 /** \name Functions 
  *  \ingroup XBT_heap
  */
-/*@{*/
+/* @{ */
 /**
  * \param init_size initial size of the heap
  * \param free_func function to call on each element when you want to free
@@ -186,4 +186,4 @@ static void xbt_heap_increaseKey(xbt_heap_t H, int i)
   }
   return;
 }
-/*@}*/
+/* @} */
index 6971730..dd83783 100644 (file)
@@ -33,7 +33,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(swag,xbt,"Swag : O(1) set library");
 /** \name Functions 
  *  \ingroup XBT_swag
  */
-/*@{*/
+/* @{ */
 
 /** Creates a new swag.
  * \param offset where the hookup is located in the structure
@@ -239,4 +239,4 @@ int xbt_swag_belongs(void *obj, xbt_swag_t swag)
   return ((NEXT(obj, swag->offset)) || (PREV(obj, swag->offset))
          || (swag->head == obj));
 }
-/*@}*/
+/* @} */