Changeset 3296252 for lib/libtrace_int.h


Ignore:
Timestamp:
06/26/14 00:36:08 (7 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
c99b1e5
Parents:
59ef093
Message:

Fixes pausing the trace in the edge case that some threads have already ended.
Tidy up the state system, for both threads and the the overall state.
General tidies to the code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace_int.h

    r9594cf9 r3296252  
    184184        THREAD_FINISHING,
    185185        THREAD_FINISHED,
    186         THREAD_PAUSED
     186        THREAD_PAUSED,
     187        THREAD_STATE_MAX
    187188};
    188189
     
    301302        /** Use to control pausing threads and finishing threads etc always used with libtrace_lock */
    302303        pthread_cond_t perpkt_cond;
    303         /** Set to the number of perpkt threads that are finishing (or have finished), or to -1 once all have been joined, 0 implies all are running */
    304         int perpkts_finishing;
    305         /** A count of perpkt threads that are pausing */
    306         int perpkts_pausing;
     304        /* Keep track of counts of threads in any given state */
     305        int perpkt_thread_states[THREAD_STATE_MAX];
    307306
    308307        /** For the sliding window hasher implementation */
Note: See TracChangeset for help on using the changeset viewer.