Changeset f625817 for lib/libtrace_parallel.h
- Timestamp:
- 09/11/15 15:00:27 (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:
- 322c516
- Parents:
- 8c7490fe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtrace_parallel.h
r3dd5acc rf625817 460 460 * @param libtrace The input trace to start 461 461 * @param global_blob Global data related to this trace accessible using trace_get_global() 462 * @param per_ msg A user supplied function called when a message is ready463 * @param reporter A user supplied function called when a result is ready.462 * @param per_packet_cbs A set of user supplied functions to be called in response to events being observed by the per_pkt threads. 463 * @param reporter_cbs A set of user supplied functions to be called in response to events / results being seen by the reporter thread. 464 464 * Optional if NULL the reporter thread will not be started. 465 465 * @return 0 on success, otherwise -1 to indicate an error has occurred … … 467 467 * This can also be used to restart an existing parallel trace, 468 468 * that has previously been paused using trace_ppause(). 469 * In this case global_blob,per_msg and reporter will only be updated 470 * if they are non-null. Otherwise their previous values will be maintained. 469 * In this case global_blob, per_packet_cbs and reporter_cbs will only be 470 * updated if they are non-null. Otherwise their previous values will be 471 * maintained. 471 472 * 472 473 */ 473 474 DLLEXPORT int trace_pstart(libtrace_t *libtrace, void* global_blob, 474 fn_cb_msg per_msg, fn_reporter reporter); 475 libtrace_callback_set_t *per_packet_cbs, 476 libtrace_callback_set_t *reporter_cbs); 475 477 476 478 /** … … 539 541 libtrace_packet_t *packet); 540 542 543 /** 544 * Callback for handling a result message. Should only be required by the 545 * reporter thread. 546 * 547 * @param libtrace The parallel trace 548 * @param sender The thread that generated this result 549 * @param global The global storage 550 * @param tls The thread local storage 551 * @param result The result associated with the message 552 * 553 */ 554 typedef void (*fn_cb_result)(libtrace_t *libtrace, libtrace_thread_t *sender, 555 void *global, void *tls, libtrace_result_t *result); 556 557 558 /** 559 * Callback for handling any user-defined message types. This will handle 560 * any messages with a type >= MESSAGE_USER. 561 * 562 * @param libtrace The parallel trace 563 * @param t The thread 564 * @param global The global storage 565 * @param tls The thread local storage 566 * @param mesg The code identifying the message type 567 * @param data The data associated with the message 568 * 569 */ 570 typedef void (*fn_cb_usermessage) (libtrace_t *libtrace, libtrace_thread_t *t, 571 void *global, void *tls, int mesg, libtrace_generic_t data); 572 541 573 /** Registers a built-in message with a handler. 542 574 * Note we do not include the sending thread as an argument to the reporter. … … 548 580 */ 549 581 550 DLLEXPORT int trace_cb_starting(libtrace_t *libtrace, fn_cb_starting handler); 551 DLLEXPORT int trace_cb_stopping(libtrace_t *libtrace, fn_cb_dataless handler); 552 DLLEXPORT int trace_cb_resuming(libtrace_t *libtrace, fn_cb_dataless handler); 553 DLLEXPORT int trace_cb_pausing(libtrace_t *libtrace, fn_cb_dataless handler); 554 DLLEXPORT int trace_cb_packet(libtrace_t *libtrace, fn_cb_packet handler); 555 DLLEXPORT int trace_cb_first_packet(libtrace_t *libtrace, fn_cb_first_packet handler); 556 DLLEXPORT int trace_cb_tick_count(libtrace_t *libtrace, fn_cb_tick handler); 557 DLLEXPORT int trace_cb_tick_interval(libtrace_t *libtrace, fn_cb_tick handler); 582 DLLEXPORT int trace_set_starting_cb(libtrace_callback_set_t *cbset, 583 fn_cb_starting handler); 584 585 DLLEXPORT int trace_set_stopping_cb(libtrace_callback_set_t *cbset, 586 fn_cb_dataless handler); 587 588 DLLEXPORT int trace_set_resuming_cb(libtrace_callback_set_t *cbset, 589 fn_cb_dataless handler); 590 591 DLLEXPORT int trace_set_pausing_cb(libtrace_callback_set_t *cbset, 592 fn_cb_dataless handler); 593 594 DLLEXPORT int trace_set_packet_cb(libtrace_callback_set_t *cbset, 595 fn_cb_packet handler); 596 597 DLLEXPORT int trace_set_first_packet_cb(libtrace_callback_set_t *cbset, 598 fn_cb_first_packet handler); 599 600 DLLEXPORT int trace_set_result_cb(libtrace_callback_set_t *cbset, 601 fn_cb_result handler); 602 603 DLLEXPORT int trace_set_tick_count_cb(libtrace_callback_set_t *cbset, 604 fn_cb_tick handler); 605 606 DLLEXPORT int trace_set_tick_interval_cb(libtrace_callback_set_t *cbset, 607 fn_cb_tick handler); 608 609 DLLEXPORT int trace_set_user_message_cb(libtrace_callback_set_t *cbset, 610 fn_cb_usermessage handler); 558 611 559 612 /** Pauses a trace previously started with trace_pstart()
Note: See TracChangeset
for help on using the changeset viewer.