Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xenomai
xenomai
Commits
5c32d436
Commit
5c32d436
authored
Jun 13, 2018
by
Philippe Gerum
Browse files
include/copperplate: heapobj: make heapmem section C++-friendly
parent
9802f2a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/copperplate/heapobj.h
View file @
5c32d436
...
...
@@ -148,38 +148,39 @@ extern struct heap_memory heapmem_main;
static
inline
void
pvheapobj_destroy
(
struct
heapobj
*
hobj
)
{
heapmem_destroy
(
hobj
->
pool
);
heapmem_destroy
(
(
struct
heap_memory
*
)
hobj
->
pool
);
}
static
inline
int
pvheapobj_extend
(
struct
heapobj
*
hobj
,
size_t
size
,
void
*
mem
)
{
return
heapmem_extend
(
hobj
->
pool
,
mem
,
size
);
return
heapmem_extend
((
struct
heap_memory
*
)
hobj
->
pool
,
mem
,
size
);
}
static
inline
void
*
pvheapobj_alloc
(
struct
heapobj
*
hobj
,
size_t
size
)
{
return
heapmem_alloc
(
hobj
->
pool
,
size
);
return
heapmem_alloc
(
(
struct
heap_memory
*
)
hobj
->
pool
,
size
);
}
static
inline
void
pvheapobj_free
(
struct
heapobj
*
hobj
,
void
*
ptr
)
{
heapmem_free
(
hobj
->
pool
,
ptr
);
heapmem_free
(
(
struct
heap_memory
*
)
hobj
->
pool
,
ptr
);
}
static
inline
size_t
pvheapobj_validate
(
struct
heapobj
*
hobj
,
void
*
ptr
)
{
ssize_t
size
=
heapmem_check
(
hobj
->
pool
,
ptr
);
ssize_t
size
=
heapmem_check
(
(
struct
heap_memory
*
)
hobj
->
pool
,
ptr
);
return
size
<
0
?
0
:
size
;
}
static
inline
size_t
pvheapobj_inquire
(
struct
heapobj
*
hobj
)
{
return
heapmem_used_size
(
hobj
->
pool
);
return
heapmem_used_size
(
(
struct
heap_memory
*
)
hobj
->
pool
);
}
static
inline
void
*
pvmalloc
(
size_t
size
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment