forked from M-Labs/libfringe
match the internal Valgrind function names to the macro names
This commit is contained in:
parent
db6a2ff89b
commit
9cbb2819ca
|
@ -10,12 +10,12 @@ typedef uint32_t valgrind_stack_id_t;
|
||||||
|
|
||||||
// Register a stack with Valgrind. start < end. Returns an integer ID that can
|
// Register a stack with Valgrind. start < end. Returns an integer ID that can
|
||||||
// be used to deregister the stack when it's deallocated.
|
// be used to deregister the stack when it's deallocated.
|
||||||
valgrind_stack_id_t lwt_stack_register(const void *start, const void *end) {
|
valgrind_stack_id_t valgrind_stack_register(const void *start, const void *end) {
|
||||||
return VALGRIND_STACK_REGISTER(start, end);
|
return VALGRIND_STACK_REGISTER(start, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deregister a stack from Valgrind. Takes the integer ID that was returned
|
// Deregister a stack from Valgrind. Takes the integer ID that was returned
|
||||||
// on registration.
|
// on registration.
|
||||||
void lwt_stack_deregister(valgrind_stack_id_t id) {
|
void valgrind_stack_deregister(valgrind_stack_id_t id) {
|
||||||
VALGRIND_STACK_DEREGISTER(id);
|
VALGRIND_STACK_DEREGISTER(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
pub type stack_id_t = u32;
|
pub type stack_id_t = u32;
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#[link_name = "lwt_stack_register"]
|
#[link_name = "valgrind_stack_register"]
|
||||||
pub fn stack_register(start: *const u8, end: *const u8) -> stack_id_t;
|
pub fn stack_register(start: *const u8, end: *const u8) -> stack_id_t;
|
||||||
#[link_name = "lwt_stack_deregister"]
|
#[link_name = "valgrind_stack_deregister"]
|
||||||
pub fn stack_deregister(id: stack_id_t);
|
pub fn stack_deregister(id: stack_id_t);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue