Changeset ac65c9f
- Timestamp:
- 03/30/15 13:32:43 (6 years ago)
- 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:
- c723e9e
- Parents:
- 91e016c
- Location:
- lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtrace_int.h
r91e016c rac65c9f 237 237 X(STATE_PAUSING) \ 238 238 X(STATE_PAUSED) \ 239 X(STATE_FINSHED) \ 239 X(STATE_FINISHED) \ 240 X(STATE_FINISHING) \ 240 241 X(STATE_DESTROYED) \ 241 242 X(STATE_JOINED) \ -
lib/trace.c
r91e016c rac65c9f 2091 2091 /* If the trace has paused or finished get the cached results */ 2092 2092 if (trace->state == STATE_PAUSED || 2093 trace->state == STATE_FINSHED || 2093 trace->state == STATE_FINISHED || 2094 trace->state == STATE_FINISHING || 2094 2095 trace->state == STATE_JOINED) { 2095 2096 if (trace->stats && trace->stats != stat) -
lib/trace_parallel.c
r5431dfc rac65c9f 250 250 251 251 if (trace->perpkt_thread_states[THREAD_FINISHED] == trace->perpkt_thread_count) 252 libtrace_change_state(trace, STATE_FIN SHED, false);252 libtrace_change_state(trace, STATE_FINISHED, false); 253 253 254 254 pthread_cond_broadcast(&trace->perpkt_cond); … … 722 722 case MESSAGE_DO_STOP: 723 723 assert(trace->started == false); 724 assert(trace->state == STATE_FIN SHED);724 assert(trace->state == STATE_FINISHED); 725 725 /* Mark the current packet as EOF */ 726 726 packet->error = 0; … … 1085 1085 message.code = MESSAGE_TICK_INTERVAL; 1086 1086 1087 while (trace->state != STATE_FIN SHED) {1087 while (trace->state != STATE_FINISHED) { 1088 1088 fd_set rfds; 1089 1089 next_release = tv_to_usec(&prev) + (trace->config.tick_interval * 1000); … … 1914 1914 } 1915 1915 1916 // Now release the threads and let them stop 1917 libtrace_change_state(libtrace, STATE_FINSHED, true); 1916 /* Now release the threads and let them stop - when the threads finish 1917 * the state will be set to finished */ 1918 libtrace_change_state(libtrace, STATE_FINISHING, true); 1918 1919 return 0; 1919 1920 } … … 2180 2181 2181 2182 DLLEXPORT bool trace_has_finished(libtrace_t * libtrace) { 2182 return libtrace->state == STATE_FIN SHED || libtrace->state == STATE_JOINED;2183 return libtrace->state == STATE_FINISHED || libtrace->state == STATE_JOINED; 2183 2184 } 2184 2185
Note: See TracChangeset
for help on using the changeset viewer.