* Assumption: stacks grow downward.
*/
static __inline__
-void drd_start_using_mem_stack(const Addr a, const SizeT len)
+void drd_start_using_mem_stack2(const DrdThreadId tid, const Addr a,
+ const SizeT len)
{
- DRD_(thread_set_stack_min)(DRD_(thread_get_running_tid)(),
- a - VG_STACK_REDZONE_SZB);
- drd_start_using_mem(a - VG_STACK_REDZONE_SZB,
- len + VG_STACK_REDZONE_SZB,
+ DRD_(thread_set_stack_min)(tid, a - VG_STACK_REDZONE_SZB);
+ drd_start_using_mem(a - VG_STACK_REDZONE_SZB, len + VG_STACK_REDZONE_SZB,
True);
}
+static __inline__
+void drd_start_using_mem_stack(const Addr a, const SizeT len)
+{
+ drd_start_using_mem_stack2(DRD_(thread_get_running_tid)(), a, len);
+}
+
/**
* Called by the core when the stack of a thread shrinks, to indicate that
* the addresses [ a, a + len [ are no longer accessible for the client.
* Assumption: stacks grow downward.
*/
static __inline__
-void drd_stop_using_mem_stack(const Addr a, const SizeT len)
+void drd_stop_using_mem_stack2(const DrdThreadId tid, const Addr a,
+ const SizeT len)
{
- DRD_(thread_set_stack_min)(DRD_(thread_get_running_tid)(),
- a + len - VG_STACK_REDZONE_SZB);
+ DRD_(thread_set_stack_min)(tid, a + len - VG_STACK_REDZONE_SZB);
drd_stop_using_mem(a - VG_STACK_REDZONE_SZB, len + VG_STACK_REDZONE_SZB,
True);
}
+static __inline__
+void drd_stop_using_mem_stack(const Addr a, const SizeT len)
+{
+ drd_stop_using_mem_stack2(DRD_(thread_get_running_tid)(), a, len);
+}
+
static
Bool on_alt_stack(const Addr a)
{