projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
README: document make check/regtest/bench
[urcu.git]
/
urcu-call-rcu-impl.h
diff --git
a/urcu-call-rcu-impl.h
b/urcu-call-rcu-impl.h
index fb3568f802f210d2015b9a42e9d20691ee59df4c..10c4f3ec2fad83c61e8275059fc3ce7b618d4e5b 100644
(file)
--- a/
urcu-call-rcu-impl.h
+++ b/
urcu-call-rcu-impl.h
@@
-786,7
+786,7
@@
void rcu_barrier(void)
{
struct call_rcu_data *crdp;
struct call_rcu_completion completion;
{
struct call_rcu_data *crdp;
struct call_rcu_completion completion;
- int count = 0
, work_count = 0
;
+ int count = 0;
int was_online;
/* Put in offline state in QSBR. */
int was_online;
/* Put in offline state in QSBR. */
@@
-817,24
+817,13
@@
void rcu_barrier(void)
struct call_rcu_completion_work *work;
work = calloc(sizeof(*work), 1);
struct call_rcu_completion_work *work;
work = calloc(sizeof(*work), 1);
- if (!work) {
- static int warned = 0;
-
- if (!warned) {
- fprintf(stderr, "[error] liburcu: unable to allocate memory for rcu_barrier()\n");
- }
- warned = 1;
- break;
- }
+ if (!work)
+ urcu_die(errno);
work->completion = &completion;
_call_rcu(&work->head, _rcu_barrier_complete, crdp);
work->completion = &completion;
_call_rcu(&work->head, _rcu_barrier_complete, crdp);
- work_count++;
}
call_rcu_unlock(&call_rcu_mutex);
}
call_rcu_unlock(&call_rcu_mutex);
- if (work_count != count)
- uatomic_sub(&completion.barrier_count, count - work_count);
-
/* Wait for them */
for (;;) {
uatomic_dec(&completion.futex);
/* Wait for them */
for (;;) {
uatomic_dec(&completion.futex);
This page took
0.023998 seconds
and
4
git commands to generate.