- Timestamp:
- 06/22/17 10:36:26 (4 years ago)
- Branches:
- cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
- Children:
- 1105ce0
- Parents:
- f398c61
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/trace_parallel.c
rf4fdcd1 rb606855 805 805 break; 806 806 case MESSAGE_DO_STOP: 807 /* Either FINISHED or FINISHING */ 807 808 assert(trace->started == false); 808 assert(trace->state == STATE_FINISHED);809 809 /* Mark the current packet as EOF */ 810 810 packet->error = 0; 811 break;811 goto hasher_eof; 812 812 default: 813 813 fprintf(stderr, "Hasher thread didn't expect message code=%d\n", message.code); … … 850 850 } 851 851 } 852 852 hasher_eof: 853 853 /* Broadcast our last failed read to all threads */ 854 854 for (i = 0; i < trace->perpkt_thread_count; i++) { … … 862 862 ASSERT_RET(pthread_mutex_lock(&trace->libtrace_lock), == 0); 863 863 if (trace->perpkt_threads[i].state != THREAD_FINISHED) { 864 // Unlock early otherwise we could deadlock865 864 libtrace_ringbuffer_write(&trace->perpkt_threads[i].rbuffer, bcast); 865 } else { 866 libtrace_ocache_free(&trace->packet_freelist, (void **) &bcast, 1, 1); 866 867 } 867 868 ASSERT_RET(pthread_mutex_unlock(&trace->libtrace_lock), == 0);
Note: See TracChangeset
for help on using the changeset viewer.