summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ed0d6f2)
On some platforms, mmap returns a caddr_t pointer which generates
compiler warnings, cast to the proper pointer type to eliminate them.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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);
}
/* 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);
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));
}
CDS_INIT_LIST_HEAD(®istry_arena.chunk_list);
+ sizeof(struct registry_chunk));
}
CDS_INIT_LIST_HEAD(®istry_arena.chunk_list);