slog2_packet_cmp()

Compare two slogger2 packets

Synopsis:

#include <slog2_parse.h>

int slog2_packet_cmp ( slog2_packet_info_t *packet1,
                       slog2_packet_info_t *packet2 );

Arguments:

packet1, packet2
Pointers to the slog2_packet_info_t structures that you want to compare.

Library:

libslog2parse

Use the -l slog2parse option to qcc to link against this library.

Description:

The slog2_packet_cmp() function compares two slogger2 packets to determine which came first. This comparison is based first on the timestamps of the packets; if the timestamps are identical, the function then compares the packets' sequence numbers.

Returns:

-1
packet1 is less than packet2
0
The packets are equal.
1
packet1 is larger than packet2.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes