diff options
-rw-r--r-- | coregrind/m_threadmodel.c | 10 | ||||
-rw-r--r-- | coregrind/m_tooliface.c | 6 | ||||
-rw-r--r-- | coregrind/pub_core_tooliface.h | 6 | ||||
-rw-r--r-- | helgrind/hg_main.c | 18 | ||||
-rw-r--r-- | include/pub_tool_tooliface.h | 8 |
5 files changed, 24 insertions, 24 deletions
diff --git a/coregrind/m_threadmodel.c b/coregrind/m_threadmodel.c index 5bd5b7e68..fa3e20854 100644 --- a/coregrind/m_threadmodel.c +++ b/coregrind/m_threadmodel.c @@ -808,7 +808,7 @@ void VG_(tm_mutex_trylock)(ThreadId tid, Addr mutexp) if (mx->state == MX_Locked && mx->owner == tid) /* deadlock */ mutex_report(tid, mutexp, MXE_Deadlock, "trylocking"); - VG_TRACK( pre_mutex_lock, tid, (void *)mutexp ); + VG_TRACK( pre_mutex_lock, tid, mutexp ); } /* Give up waiting for a mutex. Fails if: @@ -835,7 +835,7 @@ void VG_(tm_mutex_acquire)(ThreadId tid, Addr mutexp) switch(mx->state) { case MX_Unlocking: /* ownership transfer or relock */ - VG_TRACK( post_mutex_unlock, mx->owner, (void *)mutexp ); + VG_TRACK( post_mutex_unlock, mx->owner, mutexp ); if (mx->owner != tid) thread_unblock_mutex(tid, mx, "acquiring mutex"); break; @@ -847,7 +847,7 @@ void VG_(tm_mutex_acquire)(ThreadId tid, Addr mutexp) case MX_Locked: if (debug_mutex) VG_(printf)("mutex=%p mx->state=%s\n", mutexp, pp_mutexstate(mx)); - VG_TRACK( post_mutex_unlock, mx->owner, (void *)mutexp ); + VG_TRACK( post_mutex_unlock, mx->owner, mutexp ); mutex_report(tid, mutexp, MXE_Locked, "acquiring"); thread_unblock_mutex(tid, mx, "acquiring mutex"); break; @@ -860,7 +860,7 @@ void VG_(tm_mutex_acquire)(ThreadId tid, Addr mutexp) mx->owner = tid; mutex_setstate(tid, mx, MX_Locked); - VG_TRACK( post_mutex_lock, tid, (void *)mutexp ); + VG_TRACK( post_mutex_lock, tid, mutexp ); } /* Try unlocking a lock. This will move it into a state where it can @@ -969,7 +969,7 @@ void VG_(tm_mutex_unlock)(ThreadId tid, Addr mutexp) case MX_Unlocking: /* OK - we need to complete the unlock */ - VG_TRACK( post_mutex_unlock, tid, (void *)mutexp ); + VG_TRACK( post_mutex_unlock, tid, mutexp ); mutex_setstate(tid, mx, MX_Free); break; diff --git a/coregrind/m_tooliface.c b/coregrind/m_tooliface.c index a5c16e9e0..843ac5b10 100644 --- a/coregrind/m_tooliface.c +++ b/coregrind/m_tooliface.c @@ -326,9 +326,9 @@ DEF(track_thread_run, ThreadId) DEF(track_post_thread_create, ThreadId, ThreadId) DEF(track_post_thread_join, ThreadId, ThreadId) -DEF(track_pre_mutex_lock, ThreadId, void*) -DEF(track_post_mutex_lock, ThreadId, void*) -DEF(track_post_mutex_unlock, ThreadId, void*) +DEF(track_pre_mutex_lock, ThreadId, Addr) +DEF(track_post_mutex_lock, ThreadId, Addr) +DEF(track_post_mutex_unlock, ThreadId, Addr) DEF(track_pre_deliver_signal, ThreadId, Int sigNo, Bool) DEF(track_post_deliver_signal, ThreadId, Int sigNo) diff --git a/coregrind/pub_core_tooliface.h b/coregrind/pub_core_tooliface.h index 21833e37b..bde51bdef 100644 --- a/coregrind/pub_core_tooliface.h +++ b/coregrind/pub_core_tooliface.h @@ -205,9 +205,9 @@ typedef struct { void (*track_post_thread_create)(ThreadId, ThreadId); void (*track_post_thread_join) (ThreadId, ThreadId); - void (*track_pre_mutex_lock) (ThreadId, void*); - void (*track_post_mutex_lock) (ThreadId, void*); - void (*track_post_mutex_unlock)(ThreadId, void*); + void (*track_pre_mutex_lock) (ThreadId, Addr); + void (*track_post_mutex_lock) (ThreadId, Addr); + void (*track_post_mutex_unlock)(ThreadId, Addr); void (*track_pre_deliver_signal) (ThreadId, Int sigNo, Bool); void (*track_post_deliver_signal)(ThreadId, Int sigNo); diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index 1a256151a..cda5858fc 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -2858,17 +2858,17 @@ static void hg_print_extra_suppression_info ( Error* err ) /* Do nothing */ } -static void hg_pre_mutex_lock(ThreadId tid, void* void_mutex) +static void hg_pre_mutex_lock(ThreadId tid, Addr client_mutex) { - Mutex *mutex = get_mutex((Addr)void_mutex); + Mutex *mutex = get_mutex(client_mutex); test_mutex_state(mutex, MxLocked, tid); } -static void hg_post_mutex_lock(ThreadId tid, void* void_mutex) +static void hg_post_mutex_lock(ThreadId tid, Addr client_mutex) { static const Bool debug = False; - Mutex *mutex = get_mutex((Addr)void_mutex); + Mutex *mutex = get_mutex(client_mutex); const LockSet* ls; set_mutex_state(mutex, MxLocked, tid); @@ -2899,11 +2899,11 @@ static void hg_post_mutex_lock(ThreadId tid, void* void_mutex) } -static void hg_post_mutex_unlock(ThreadId tid, void* void_mutex) +static void hg_post_mutex_unlock(ThreadId tid, Addr client_mutex) { static const Bool debug = False; Int i = 0; - Mutex *mutex = get_mutex((Addr)void_mutex); + Mutex *mutex = get_mutex(client_mutex); const LockSet *ls; test_mutex_state(mutex, MxUnlocked, tid); @@ -3260,14 +3260,14 @@ static Int __BUS_HARDWARE_LOCK__; static void bus_lock(void) { ThreadId tid = VG_(get_running_tid)(); - hg_pre_mutex_lock(tid, &__BUS_HARDWARE_LOCK__); - hg_post_mutex_lock(tid, &__BUS_HARDWARE_LOCK__); + hg_pre_mutex_lock(tid, (Addr)&__BUS_HARDWARE_LOCK__); + hg_post_mutex_lock(tid, (Addr)&__BUS_HARDWARE_LOCK__); } static void bus_unlock(void) { ThreadId tid = VG_(get_running_tid)(); - hg_post_mutex_unlock(tid, &__BUS_HARDWARE_LOCK__); + hg_post_mutex_unlock(tid, (Addr)&__BUS_HARDWARE_LOCK__); } /*--------------------------------------------------------------------*/ diff --git a/include/pub_tool_tooliface.h b/include/pub_tool_tooliface.h index 849aabf35..ecdad5fc8 100644 --- a/include/pub_tool_tooliface.h +++ b/include/pub_tool_tooliface.h @@ -40,7 +40,7 @@ /* The version number indicates binary-incompatible changes to the interface; if the core and tool versions don't match, Valgrind will abort. */ -#define VG_CORE_INTERFACE_VERSION 9 +#define VG_CORE_INTERFACE_VERSION 10 typedef struct _ToolInfo { Int sizeof_ToolInfo; @@ -553,15 +553,15 @@ void VG_(track_post_thread_join) (void(*f)(ThreadId joiner, ThreadId joinee)); Called before a thread can block while waiting for a mutex (called regardless of whether the thread will block or not). */ -void VG_(track_pre_mutex_lock)(void(*f)(ThreadId tid, void* mutex)); +void VG_(track_pre_mutex_lock)(void(*f)(ThreadId tid, Addr mutex)); /* Called once the thread actually holds the mutex (always paired with pre_mutex_lock). */ -void VG_(track_post_mutex_lock)(void(*f)(ThreadId tid, void* mutex)); +void VG_(track_post_mutex_lock)(void(*f)(ThreadId tid, Addr mutex)); /* Called after a thread has released a mutex (no need for a corresponding pre_mutex_unlock, because unlocking can't block). */ -void VG_(track_post_mutex_unlock)(void(*f)(ThreadId tid, void* mutex)); +void VG_(track_post_mutex_unlock)(void(*f)(ThreadId tid, Addr mutex)); /* Signal events (not exhaustive) |