if (!is_stack_mem || DRD_(get_check_stack_accesses)())
{
- DRD_(thread_stop_using_mem)(a1, a2, False);
+ DRD_(thread_stop_using_mem)(a1, a2);
DRD_(clientobj_stop_using_mem)(a1, a2);
DRD_(suppression_stop_using_mem)(a1, a2);
}
* [ a1, a2 [, e.g. because of a call to free() or a stack pointer
* increase.
*/
-void DRD_(thread_stop_using_mem)(const Addr a1, const Addr a2,
- const Bool dont_clear_access)
+void DRD_(thread_stop_using_mem)(const Addr a1, const Addr a2)
{
DrdThreadId other_user;
unsigned i;
for (i = 0; i < DRD_N_THREADS; i++)
{
Segment* p;
- for (p = DRD_(g_threadinfo)[i].first; p; p = p->next)
- {
+ for (p = DRD_(g_threadinfo)[i].first; p; p = p->next) {
if (other_user == DRD_INVALID_THREADID
- && i != DRD_(g_drd_running_tid))
- {
- if (UNLIKELY((!dont_clear_access
- && DRD_(bm_test_and_clear)(DRD_(sg_bm)(p), a1, a2))
- || (dont_clear_access
- && DRD_(bm_has_any_access)(DRD_(sg_bm)(p), a1, a2))
- ))
- {
+ && i != DRD_(g_drd_running_tid)) {
+ if (UNLIKELY(DRD_(bm_test_and_clear)(DRD_(sg_bm)(p), a1, a2)))
other_user = i;
- }
- continue;
- }
- if (!dont_clear_access)
+ } else
DRD_(bm_clear)(DRD_(sg_bm)(p), a1, a2);
}
}
void DRD_(thread_update_conflict_set)(const DrdThreadId tid,
const VectorClock* const old_vc);
-void DRD_(thread_stop_using_mem)(const Addr a1, const Addr a2,
- const Bool dont_clear_access);
+void DRD_(thread_stop_using_mem)(const Addr a1, const Addr a2);
void DRD_(thread_set_record_loads)(const DrdThreadId tid, const Bool enabled);
void DRD_(thread_set_record_stores)(const DrdThreadId tid, const Bool enabled);
void DRD_(thread_print_all)(void);