Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove the SNAPSHOT and COMPARE_SNAPSHOTS MC simcalls
[simgrid.git] / src / xbt / swag.c
index 1a75c7f..71f6f00 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include "xbt/log.h"
 #include "xbt/swag.h"
 
-
 /** Creates a new swag.
  * \param offset where the hookup is located in the structure
  * \see xbt_swag_offset
  *
  * Usage : xbt_swag_new(&obj.setA-&obj);
  */
-XBT_INLINE xbt_swag_t xbt_swag_new(size_t offset)
+inline xbt_swag_t xbt_swag_new(size_t offset)
 {
   xbt_swag_t swag = xbt_new0(s_xbt_swag_t, 1);
 
@@ -36,7 +35,7 @@ XBT_INLINE xbt_swag_t xbt_swag_new(size_t offset)
  * kilkil a swag but not it's content. If you do not understand why
  * xbt_swag_free should not free its content, don't use swags.
  */
-XBT_INLINE void xbt_swag_free(xbt_swag_t swag)
+inline void xbt_swag_free(xbt_swag_t swag)
 {
   free(swag);
 }
@@ -48,7 +47,7 @@ XBT_INLINE void xbt_swag_free(xbt_swag_t swag)
  *
  * Usage : xbt_swag_init(swag,&obj.setA-&obj);
  */
-XBT_INLINE void xbt_swag_init(xbt_swag_t swag, size_t offset)
+inline void xbt_swag_init(xbt_swag_t swag, size_t offset)
 {
   swag->tail = NULL;
   swag->head = NULL;
@@ -63,7 +62,7 @@ XBT_INLINE void xbt_swag_init(xbt_swag_t swag, size_t offset)
  * insert (at the head... you probably had a very good reason to do
  * that, I hope you know what you're doing) \a obj in \a swag
  */
-XBT_INLINE void xbt_swag_insert_at_head(void *obj, xbt_swag_t swag)
+inline void xbt_swag_insert_at_head(void *obj, xbt_swag_t swag)
 {
   xbt_assert(!xbt_swag_belongs(obj, swag) || swag->tail,
       "This object belongs to an empty swag! Did you correctly initialize the object's hookup?");
@@ -89,7 +88,7 @@ XBT_INLINE void xbt_swag_insert_at_head(void *obj, xbt_swag_t swag)
  * insert (at the tail... you probably had a very good reason to do
  * that, I hope you know what you're doing) \a obj in \a swag
  */
-XBT_INLINE void xbt_swag_insert_at_tail(void *obj, xbt_swag_t swag)
+inline void xbt_swag_insert_at_tail(void *obj, xbt_swag_t swag)
 {
   xbt_assert(!xbt_swag_belongs(obj, swag) || swag->tail,
       "This object belongs to an empty swag! Did you correctly initialize the object's hookup?");
@@ -115,7 +114,7 @@ XBT_INLINE void xbt_swag_insert_at_tail(void *obj, xbt_swag_t swag)
  *
  * removes \a obj from \a swag
  */
-XBT_INLINE void *xbt_swag_remove(void *obj, xbt_swag_t swag)
+inline void *xbt_swag_remove(void *obj, xbt_swag_t swag)
 {
   if (!obj)
     return NULL;
@@ -178,7 +177,7 @@ void *xbt_swag_extract(xbt_swag_t swag)
  * \param swag a swag
  * \return the number of objects in \a swag
  */
-XBT_INLINE int xbt_swag_size(xbt_swag_t swag)
+inline int xbt_swag_size(xbt_swag_t swag)
 {
   return (swag->count);
 }