A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove one of the many pimple: HostModel::p_cpuModel
[simgrid.git]
/
src
/
xbt
/
xbt_queue.c
diff --git
a/src/xbt/xbt_queue.c
b/src/xbt/xbt_queue.c
index
76a828c
..
68be624
100644
(file)
--- a/
src/xbt/xbt_queue.c
+++ b/
src/xbt/xbt_queue.c
@@
-1,7
+1,7
@@
/* A (synchronized) message queue. */
/* Popping an empty queue is blocking, as well as pushing a full one */
/* A (synchronized) message queue. */
/* Popping an empty queue is blocking, as well as pushing a full one */
-/* Copyright (c) 2007
, 2008, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2007
-2014
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-11,10
+11,9
@@
#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/synchro.h"
#include "xbt/queue.h" /* this module */
#include "xbt/queue.h" /* this module */
-#include "gras/virtu.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_queue, xbt,
"Message exchanging queue");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_queue, xbt,
"Message exchanging queue");
@@
-80,7
+79,7
@@
void xbt_queue_push(xbt_queue_t queue, const void *src)
xbt_mutex_acquire(queue->mutex);
while (queue->capacity != 0
&& queue->capacity == xbt_dynar_length(queue->data)) {
xbt_mutex_acquire(queue->mutex);
while (queue->capacity != 0
&& queue->capacity == xbt_dynar_length(queue->data)) {
- XBT_DEBUG("Capacity of %p exceded (=%d). Waiting", queue,
+ XBT_DEBUG("Capacity of %p exce
e
ded (=%d). Waiting", queue,
queue->capacity);
xbt_cond_wait(queue->not_full, queue->mutex);
}
queue->capacity);
xbt_cond_wait(queue->not_full, queue->mutex);
}
@@
-120,7
+119,7
@@
void xbt_queue_unshift(xbt_queue_t queue, const void *src)
xbt_mutex_acquire(queue->mutex);
while (queue->capacity != 0
&& queue->capacity == xbt_dynar_length(queue->data)) {
xbt_mutex_acquire(queue->mutex);
while (queue->capacity != 0
&& queue->capacity == xbt_dynar_length(queue->data)) {
- XBT_DEBUG("Capacity of %p exceded (=%d). Waiting", queue,
+ XBT_DEBUG("Capacity of %p exce
e
ded (=%d). Waiting", queue,
queue->capacity);
xbt_cond_wait(queue->not_full, queue->mutex);
}
queue->capacity);
xbt_cond_wait(queue->not_full, queue->mutex);
}
@@
-168,7
+167,7
@@
void xbt_queue_push_timed(xbt_queue_t queue, const void *src, double delay)
xbt_mutex_release(queue->mutex);
THROWF(timeout_error, 0,
xbt_mutex_release(queue->mutex);
THROWF(timeout_error, 0,
- "Capacity of %p exceded (=%d), and delay = 0", queue,
+ "Capacity of %p exce
e
ded (=%d), and delay = 0", queue,
queue->capacity);
}
} else {
queue->capacity);
}
} else {
@@
-176,7
+175,7
@@
void xbt_queue_push_timed(xbt_queue_t queue, const void *src, double delay)
queue->capacity == xbt_dynar_length(queue->data) &&
(delay < 0 || (xbt_time() - begin) <= delay)) {
queue->capacity == xbt_dynar_length(queue->data) &&
(delay < 0 || (xbt_time() - begin) <= delay)) {
- XBT_DEBUG("Capacity of %p exceded (=%d). Waiting", queue,
+ XBT_DEBUG("Capacity of %p exce
e
ded (=%d). Waiting", queue,
queue->capacity);
TRY {
xbt_cond_timedwait(queue->not_full, queue->mutex,
queue->capacity);
TRY {
xbt_cond_timedwait(queue->not_full, queue->mutex,
@@
-248,7
+247,7
@@
void xbt_queue_unshift_timed(xbt_queue_t queue, const void *src,
xbt_mutex_release(queue->mutex);
THROWF(timeout_error, 0,
xbt_mutex_release(queue->mutex);
THROWF(timeout_error, 0,
- "Capacity of %p exceded (=%d), and delay = 0", queue,
+ "Capacity of %p exce
e
ded (=%d), and delay = 0", queue,
queue->capacity);
}
} else {
queue->capacity);
}
} else {
@@
-256,7
+255,7
@@
void xbt_queue_unshift_timed(xbt_queue_t queue, const void *src,
queue->capacity == xbt_dynar_length(queue->data) &&
(delay < 0 || (xbt_time() - begin) <= delay)) {
queue->capacity == xbt_dynar_length(queue->data) &&
(delay < 0 || (xbt_time() - begin) <= delay)) {
- XBT_DEBUG("Capacity of %p exceded (=%d). Waiting", queue,
+ XBT_DEBUG("Capacity of %p exce
e
ded (=%d). Waiting", queue,
queue->capacity);
TRY {
xbt_cond_timedwait(queue->not_full, queue->mutex,
queue->capacity);
TRY {
xbt_cond_timedwait(queue->not_full, queue->mutex,