Changeset 528a27c
- Timestamp:
- 06/26/18 18:04:03 (3 years ago)
- Branches:
- cachetimestamps, develop, master, rc-4.0.4, ringdecrementfix, ringperformance
- Children:
- 32ee9b2
- Parents:
- f9df20e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_linux_ring.c
r1060b6d r528a27c 70 70 /* Cached page size, the page size shouldn't be changing */ 71 71 static int pagesize = 0; 72 73 static pthread_mutex_t pagesize_mutex; 72 74 73 75 /* … … 88 90 struct ifreq ifr; 89 91 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); 91 97 92 98 strcpy(ifr.ifr_name, uri); … … 835 841 void linuxring_constructor(void) 836 842 { 843 pthread_mutex_init(&pagesize_mutex, NULL); 837 844 register_format(&linuxring); 838 845 }
Note: See TracChangeset
for help on using the changeset viewer.