Ignore:
Timestamp:
03/05/15 15:44:30 (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:
ab3fa18
Parents:
b023181
Message:

Update the reporter method to match with the per_pkt method.

We now treat a result as a type of message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace_parallel.c

    r0ec8a7c r62b3c4e  
    10351035        ASSERT_RET(pthread_mutex_unlock(&trace->libtrace_lock), == 0);
    10361036
    1037         message.code = MESSAGE_STARTING;
    1038         message.sender = t;
    1039         (*trace->reporter)(trace, NULL, &message);
    1040         message.code = MESSAGE_RESUMING;
    1041         (*trace->reporter)(trace, NULL, &message);
     1037        (*trace->reporter)(trace, MESSAGE_STARTING, (libtrace_generic_t) {0}, t);
     1038        (*trace->reporter)(trace, MESSAGE_RESUMING, (libtrace_generic_t) {0}, t);
    10421039
    10431040        while (!trace_finished(trace)) {
     
    10561053                                assert(trace->combiner.pause);
    10571054                                trace->combiner.pause(trace, &trace->combiner);
    1058                                 message.code = MESSAGE_PAUSING;
    1059                                 message.sender = t;
    1060                                 (*trace->reporter)(trace, NULL, &message);
     1055                                (*trace->reporter)(trace, MESSAGE_PAUSING, (libtrace_generic_t) {0}, t);
    10611056                                trace_thread_pause(trace, t);
    1062                                 message.code = MESSAGE_RESUMING;
    1063                                 (*trace->reporter)(trace, NULL, &message);
     1057                                (*trace->reporter)(trace, MESSAGE_RESUMING, (libtrace_generic_t) {0}, t);
    10641058                                break;
    1065                         default:
    1066                                 (*trace->reporter)(trace, NULL, &message);
     1059                default:
     1060                        (*trace->reporter)(trace, message.code, message.additional, message.sender);
    10671061                }
    10681062        }
     
    10721066
    10731067        // GOODBYE
    1074         message.code = MESSAGE_PAUSING;
    1075         message.sender = t;
    1076         (*trace->reporter)(trace, NULL, &message);
    1077         message.code = MESSAGE_STOPPING;
    1078         (*trace->reporter)(trace, NULL, &message);
     1068        (*trace->reporter)(trace, MESSAGE_PAUSING, (libtrace_generic_t) {0}, t);
     1069        (*trace->reporter)(trace, MESSAGE_STOPPING, (libtrace_generic_t) {0}, t);
    10791070
    10801071        thread_change_state(trace, &trace->reporter_thread, THREAD_FINISHED, true);
Note: See TracChangeset for help on using the changeset viewer.