Changeset ceba2b2


Ignore:
Timestamp:
12/26/16 14:00:03 (4 years ago)
Author:
GitHub <noreply@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
2d4e055
Parents:
47c4490
git-author:
EaseTheWorld <easetheworld@…> (12/26/16 14:00:03)
git-committer:
GitHub <noreply@…> (12/26/16 14:00:03)
Message:

Avoid using double in store_first_packet()

'integer-to-double' conversion is not architecture compatible.
(When I compiled libtrace in xeon and run in atom, 'Illegal instruction' error occured.)
Maybe I could use arch compiler option, but still 'double' should be avoided.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace_parallel.c

    r47c4490 rceba2b2  
    10121012                        /* Check if we are newer than the previous 'first' packet */
    10131013                        size_t first = libtrace->first_packets.first;
    1014                         if (trace_get_seconds(dup) <
    1015                                 trace_get_seconds(libtrace->first_packets.packets[first].packet))
     1014                        struct timeval cur_ts = trace_get_timeval(dup);
     1015                        struct timeval first_ts = trace_get_timeval(libtrace->first_packets.packets[first].packet);
     1016                        if (timercmp(&cur_ts, &first_ts, <))
    10161017                                libtrace->first_packets.first = t->perpkt_num;
    10171018                }
Note: See TracChangeset for help on using the changeset viewer.