lib/timeval.c
/* Perform work needed for "timewarp_seq"'s producer and consumers. */
Perform work needed for "timewarp_seq"'s producer and consumers.
Perform work needed for " timewarp_seq " ' s producer and consumers .
void
timewarp_run(void)
{
    if (timewarp_enabled) {
        unsigned int thread_id;
        ovs_mutex_lock(&monotonic_clock.mutex);
        thread_id = monotonic_clock.large_warp.main_thread_id;
        ovs_mutex_unlock(&monotonic_clock.mutex);
        if (thread_id != ovsthread_id_self()) {
            uint64_t *last_seq = last_seq_get();
            *last_seq = seq_read(timewarp_seq);
            seq_wait(timewarp_seq, *last_seq);
        } else {
            timewarp_work();
        }
    }
}
void timewarp_run ( void ) { if ( timewarp_enabled ) { unsigned int thread_id ; ovs_mutex_lock ( & monotonic_clock . mutex ) ; thread_id = monotonic_clock . large_warp . main_thread_id ; ovs_mutex_unlock ( & monotonic_clock . mutex ) ; if ( thread_id != ovsthread_id_self ( ) ) { uint64_t * last_seq = last_seq_get ( ) ; * last_seq = seq_read ( timewarp_seq ) ; seq_wait ( timewarp_seq , * last_seq ) ; } else { timewarp_work ( ) ; } } }
Perform work needed for "timewarp_seq"'s producer and consumers.
Perform work needed for " timewarp_seq " ' s producer and consumers .
/* The function is a no-op unless timeval_dummy_register() is called. */ /* For threads other than the thread that changes the sequence,
             * wait on it. */ /* Work on adding the remaining warps. */