projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
init maxcpus before use
[userspace-rcu.git]
/
urcu-call-rcu-impl.h
diff --git
a/urcu-call-rcu-impl.h
b/urcu-call-rcu-impl.h
index 700d1289192a31a5f2693cf79e4efd99be993220..e0a8fd883ee4a24782b3464a970f20be645b5fdc 100644
(file)
--- a/
urcu-call-rcu-impl.h
+++ b/
urcu-call-rcu-impl.h
@@
-386,6
+386,7
@@
int set_cpu_call_rcu_data(int cpu, struct call_rcu_data *crdp)
static int warned = 0;
call_rcu_lock(&call_rcu_mutex);
static int warned = 0;
call_rcu_lock(&call_rcu_mutex);
+ alloc_cpu_call_rcu_data();
if (cpu < 0 || maxcpus <= cpu) {
if (!warned) {
fprintf(stderr, "[error] liburcu: set CPU # out of range\n");
if (cpu < 0 || maxcpus <= cpu) {
if (!warned) {
fprintf(stderr, "[error] liburcu: set CPU # out of range\n");
@@
-395,7
+396,6
@@
int set_cpu_call_rcu_data(int cpu, struct call_rcu_data *crdp)
errno = EINVAL;
return -EINVAL;
}
errno = EINVAL;
return -EINVAL;
}
- alloc_cpu_call_rcu_data();
call_rcu_unlock(&call_rcu_mutex);
if (per_cpu_call_rcu_data == NULL) {
errno = ENOMEM;
call_rcu_unlock(&call_rcu_mutex);
if (per_cpu_call_rcu_data == NULL) {
errno = ENOMEM;
This page took
0.022674 seconds
and
4
git commands to generate.