ML_(release_sched_lock)(the_BigLock);
}
+Bool VG_(owns_BigLock_LL) ( ThreadId tid )
+{
+ return (ML_(get_sched_lock_owner)(the_BigLock)
+ == VG_(threads)[tid].os_state.lwpid);
+}
+
/* Clear out the ThreadState and release the semaphore. Leaves the
ThreadState in VgTs_Zombie state, so that it doesn't get
know that this thread has come into existence. If the clone
fails, we'll send out a ll_exit notification for it at the out:
label below, to clean up. */
+ vg_assert(VG_(owns_BigLock_LL)(ptid));
VG_TRACK ( pre_thread_ll_create, ptid, ctid );
if (flags & VKI_CLONE_SETTLS) {
ctst->client_stack_szB = 0;
}
+ vg_assert(VG_(owns_BigLock_LL)(ptid));
VG_TRACK ( pre_thread_ll_create, ptid, ctid );
if (flags & VKI_CLONE_SETTLS) {
// should be in pthread_hijack instead, just before the call to
// start_thread_NORETURN(), call_on_new_stack_0_1(), but we don't have the
// parent tid value there...
+ vg_assert(VG_(owns_BigLock_LL)(ptid));
VG_TRACK ( pre_thread_ll_create, tid, tst->tid );
}
know that this thread has come into existence. If the clone
fails, we'll send out a ll_exit notification for it at the out:
label below, to clean up. */
+ vg_assert(VG_(owns_BigLock_LL)(ptid));
VG_TRACK ( pre_thread_ll_create, ptid, ctid );
if (flags & VKI_CLONE_SETTLS) {
know that this thread has come into existence. If the clone
fails, we'll send out a ll_exit notification for it at the out:
label below, to clean up. */
+ vg_assert(VG_(owns_BigLock_LL)(ptid));
VG_TRACK ( pre_thread_ll_create, ptid, ctid );
if (flags & VKI_CLONE_SETTLS) {
know that this thread has come into existence. If the clone
fails, we'll send out a ll_exit notification for it at the out:
label below, to clean up. */
+ vg_assert(VG_(owns_BigLock_LL)(ptid));
VG_TRACK ( pre_thread_ll_create, ptid, ctid );
if (flags & VKI_CLONE_SETTLS) {
if we don't state the new thread exists prior to that point.
If the clone fails, we'll send out a ll_exit notification for it
at the out: label below, to clean up. */
+ vg_assert(VG_(owns_BigLock_LL)(ptid));
VG_TRACK ( pre_thread_ll_create, ptid, ctid );
if (flags & VKI_CLONE_SETTLS) {
/* Matching function to acquire_BigLock_LL. */
extern void VG_(release_BigLock_LL) ( HChar* who );
+/* Whether the specified thread owns the big lock. */
+extern Bool VG_(owns_BigLock_LL) ( ThreadId tid );
+
/* Yield the CPU for a while. Drops/acquires the lock using the
normal (non _LL) functions. */
extern void VG_(vg_yield)(void);