projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: assignment from incompatible pointer type warnings
[userspace-rcu.git]
/
urcu-bp.c
diff --git
a/urcu-bp.c
b/urcu-bp.c
index 22e17ccdd0a81eafe3b49917bb610f10a5e2ac3c..d0bfb0dc713dd563bd4b8d67b41cbac03a5227e4 100644
(file)
--- a/
urcu-bp.c
+++ b/
urcu-bp.c
@@
-373,7
+373,8
@@
void expand_arena(struct registry_arena *arena)
sizeof(struct registry_chunk)
+ sizeof(struct rcu_reader));
new_chunk_len = ARENA_INIT_ALLOC;
sizeof(struct registry_chunk)
+ sizeof(struct rcu_reader));
new_chunk_len = ARENA_INIT_ALLOC;
- new_chunk = mmap(NULL, new_chunk_len,
+ new_chunk = (struct registry_chunk *) mmap(NULL,
+ new_chunk_len,
PROT_READ | PROT_WRITE,
MAP_ANONYMOUS | MAP_PRIVATE,
-1, 0);
PROT_READ | PROT_WRITE,
MAP_ANONYMOUS | MAP_PRIVATE,
-1, 0);
@@
-407,7
+408,8
@@
void expand_arena(struct registry_arena *arena)
}
/* Remap did not succeed, we need to add a new chunk. */
}
/* Remap did not succeed, we need to add a new chunk. */
- new_chunk = mmap(NULL, new_chunk_len,
+ new_chunk = (struct registry_chunk *) mmap(NULL,
+ new_chunk_len,
PROT_READ | PROT_WRITE,
MAP_ANONYMOUS | MAP_PRIVATE,
-1, 0);
PROT_READ | PROT_WRITE,
MAP_ANONYMOUS | MAP_PRIVATE,
-1, 0);
@@
-609,9
+611,10
@@
void rcu_bp_exit(void)
cds_list_for_each_entry_safe(chunk, tmp,
®istry_arena.chunk_list, node) {
cds_list_for_each_entry_safe(chunk, tmp,
®istry_arena.chunk_list, node) {
- munmap(chunk, chunk->data_len
+ munmap(
(void *)
chunk, chunk->data_len
+ sizeof(struct registry_chunk));
}
+ sizeof(struct registry_chunk));
}
+ CDS_INIT_LIST_HEAD(®istry_arena.chunk_list);
ret = pthread_key_delete(urcu_bp_key);
if (ret)
abort();
ret = pthread_key_delete(urcu_bp_key);
if (ret)
abort();
This page took
0.024032 seconds
and
4
git commands to generate.