Had to add some #include "xbt/synchro_core.h".
#include "msg/msg.h" /* core library */
#include "xbt/sysdep.h" /* calloc */
#include "msg/msg.h" /* core library */
#include "xbt/sysdep.h" /* calloc */
+#include "xbt/synchro_core.h"
/* Create a log channel to have nice outputs. */
#include "xbt/log.h"
/* Create a log channel to have nice outputs. */
#include "xbt/log.h"
* DynArr during the traversal. To remove elements, use the
* xbt_dynar_cursor_rm() function.
*
* DynArr during the traversal. To remove elements, use the
* xbt_dynar_cursor_rm() function.
*
- * Do not call these functions directly, but only the xbt_dynar_foreach macro.
- *
- * For synchronized dynars, the dynar will be locked during the whole
- * loop and it will get unlocked automatically if you traverse all
- * elements. If you want to break the loop before the end, make sure
- * to call xbt_dynar_cursor_unlock() before the <tt>break;</tt>
+ * Do not call these function directly, but only within the xbt_dynar_foreach
+ * macro.
*
* @{
*/
XBT_PUBLIC(void) xbt_dynar_cursor_rm(xbt_dynar_t dynar,
unsigned int *const cursor);
*
* @{
*/
XBT_PUBLIC(void) xbt_dynar_cursor_rm(xbt_dynar_t dynar,
unsigned int *const cursor);
-XBT_PUBLIC(void) xbt_dynar_cursor_unlock(xbt_dynar_t dynar);
/* do not use this structure internals directly, but use the public interface
* This was made public to allow:
/* do not use this structure internals directly, but use the public interface
* This was made public to allow:
* - sending such beasts over the network
*/
* - sending such beasts over the network
*/
-#include "xbt/synchro_core.h"
typedef struct xbt_dynar_s {
unsigned long size;
unsigned long used;
typedef struct xbt_dynar_s {
unsigned long size;
unsigned long used;
/* 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. */
/* 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. */
+#include "xbt/synchro_core.h"
#include "jmsg_synchro.h"
#include "jxbt_utilities.h"
#include "jmsg_synchro.h"
#include "jxbt_utilities.h"
*/
XBT_INLINE void *xbt_dynar_push_ptr(xbt_dynar_t const dynar)
{
*/
XBT_INLINE void *xbt_dynar_push_ptr(xbt_dynar_t const dynar)
{
- /* we have to inline xbt_dynar_insert_at_ptr here to make sure that
- dynar->used don't change between reading it and getting the lock
- within xbt_dynar_insert_at_ptr */
return xbt_dynar_insert_at_ptr(dynar, dynar->used);
}
return xbt_dynar_insert_at_ptr(dynar, dynar->used);
}
const void *const src)
{
/* checks done in xbt_dynar_insert_at_ptr */
const void *const src)
{
/* checks done in xbt_dynar_insert_at_ptr */
- memcpy(xbt_dynar_insert_at_ptr(dynar, dynar->used), src,
- dynar->elmsize);
+ memcpy(xbt_dynar_insert_at_ptr(dynar, dynar->used), src, dynar->elmsize);
}
/** @brief Mark the last dynar's element as unused and return a pointer to it.
}
/** @brief Mark the last dynar's element as unused and return a pointer to it.
#include "portable.h" /* execinfo when available */
#include "xbt/ex.h"
#include "xbt/str.h"
#include "portable.h" /* execinfo when available */
#include "xbt/ex.h"
#include "xbt/str.h"
+#include "xbt/synchro_core.h"
#include "xbt_modinter.h" /* backtrace initialization headers */
#include "xbt/ex_interface.h"
#include "xbt_modinter.h" /* backtrace initialization headers */
#include "xbt/ex_interface.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "portable.h" /* execinfo when available */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "portable.h" /* execinfo when available */
+#include "xbt/synchro_core.h" /* xbt_thread_self_name */
#include "xbt/ex_interface.h"
#include "xbt/sysdep.h"
#include "xbt/strbuff.h"
#include "xbt/ex_interface.h"
#include "xbt/sysdep.h"
#include "xbt/strbuff.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/dynar.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/dynar.h"
+#include "xbt/synchro_core.h"
#include "xbt/queue.h" /* this module */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_queue, xbt,
#include "xbt/queue.h" /* this module */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_queue, xbt,
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/ex.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/ex.h"
+#include "xbt/synchro_core.h"
#include "simgrid/simix.h" /* used implementation */
#include "../simix/smx_private.h" /* FIXME */
#include "simgrid/simix.h" /* used implementation */
#include "../simix/smx_private.h" /* FIXME */
#define TESH_RUN_CONTEXT_H
#include "tesh.h"
#define TESH_RUN_CONTEXT_H
#include "tesh.h"
+#include "xbt/synchro_core.h"
typedef enum { e_output_check, e_output_display,
e_output_ignore
typedef enum { e_output_check, e_output_display,
e_output_ignore