core/synch.c
/* Assumes that the threads were suspended with synch_with_all_threads()
 * and thus even is_thread_currently_native() threads were suspended.
 * Assumes that the caller will free up threads if it is dynamically allocated.
 */
Assumes that the threads were suspended with synch_with_all_threads()
and thus even is_thread_currently_native() threads were suspended.
Assumes that the caller will free up threads if it is dynamically allocated.
Assumes that the threads were suspended with synch_with_all_threads () and thus even is_thread_currently_native () threads were suspended . Assumes that the caller will free up threads if it is dynamically allocated .
void
resume_all_threads(thread_record_t **threads, const uint num_threads)
{
    uint i;
    thread_id_t my_tid;
    bool res;
    ASSERT_OWN_MUTEX(true, &all_threads_synch_lock);
    ASSERT_OWN_MUTEX(true, &thread_initexit_lock);
    if (threads == NULL || num_threads == 0)
        return;
    my_tid = get_thread_id();
    for (i = 0; i < num_threads; i++) {
        if (my_tid == threads[i]->id)
            continue;
#ifdef CLIENT_SIDELINE
        if (IS_CLIENT_THREAD(threads[i]->dcontext) &&
            threads[i]->dcontext->client_data->left_unsuspended) {
            threads[i]->dcontext->client_data->left_unsuspended = false;
            continue;
        }
#endif
        res = thread_resume(threads[i]);
        ASSERT(res);
    }
}
void resume_all_threads ( thread_record_t * * threads , const uint num_threads ) { uint i ; thread_id_t my_tid ; bool res ; ASSERT_OWN_MUTEX ( true , & all_threads_synch_lock ) ; ASSERT_OWN_MUTEX ( true , & thread_initexit_lock ) ; if ( threads == NULL || num_threads == 0 ) return ; my_tid = get_thread_id ( ) ; for ( i = 0 ; i < num_threads ; i ++ ) { if ( my_tid == threads [ i ] -> id ) continue ; #ifdef CLIENT_SIDELINE if ( IS_CLIENT_THREAD ( threads [ i ] -> dcontext ) && threads [ i ] -> dcontext -> client_data -> left_unsuspended ) { threads [ i ] -> dcontext -> client_data -> left_unsuspended = false ; continue ; } #endif res = thread_resume ( threads [ i ] ) ; ASSERT ( res ) ; } }
Assumes that the threads were suspended with synch_with_all_threads()
 and thus even is_thread_currently_native() threads were suspended.
Assumes that the threads were suspended with synch_with_all_threads () and thus even is_thread_currently_native () threads were suspended .
/* PR 609569: we did not suspend this thread */ /* This routine assumes that each thread in the array was suspended, so
         * each one has to successfully resume.
         */