Ignore:
Timestamp:
06/26/18 18:11:38 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, master, rc-4.0.4, ringdecrementfix, ringperformance
Children:
f57722d6
Parents:
f9df20e (diff), 32ee9b2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'flushoutput' into develop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux_ring.c

    r1060b6d r32ee9b2  
    7070/* Cached page size, the page size shouldn't be changing */
    7171static int pagesize = 0;
     72
     73static pthread_mutex_t pagesize_mutex;
    7274
    7375/*
     
    8890        struct ifreq ifr;
    8991        unsigned max_frame = LIBTRACE_PACKET_BUFSIZE;
    90         pagesize = getpagesize();
     92        pthread_mutex_lock(&pagesize_mutex);
     93        if (pagesize == 0) {
     94                pagesize = getpagesize();
     95        }
     96        pthread_mutex_unlock(&pagesize_mutex);
    9197
    9298        strcpy(ifr.ifr_name, uri);
     
    545551
    546552        stream->last_timestamp = packet->order;
    547                
    548553
    549554        /* We just need to get prepare_packet to set all our packet pointers
     
    743748        linuxring_fin_packet,           /* fin_packet */
    744749        linuxring_write_packet,         /* write_packet */
     750        NULL,                           /* flush_output */
    745751        linuxring_get_link_type,        /* get_link_type */
    746752        linuxring_get_direction,        /* get_direction */
     
    805811        NULL,                           /* fin_packet */
    806812        NULL,                           /* write_packet */
     813        NULL,                           /* flush_output */
    807814        linuxring_get_link_type,        /* get_link_type */
    808815        linuxring_get_direction,        /* get_direction */
     
    835842void linuxring_constructor(void)
    836843{
     844        pthread_mutex_init(&pagesize_mutex, NULL);
    837845        register_format(&linuxring);
    838846}
Note: See TracChangeset for help on using the changeset viewer.