Eliminate the mlock logic entirely. It's caused a couple of issues lately and it turns out it wasn't even used!
This commit is contained in:
@@ -108,10 +108,6 @@ void gettimeofday(struct timeval *p, void *tz);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#define MLOCK(a,b) (void)1
|
||||
#define MUNLOCK(a,b) (void)1
|
||||
#define MUNLOCK_SAMPLEBLOCK(a) (void)1
|
||||
|
||||
namespace RubberBand {
|
||||
extern void system_memorybarrier();
|
||||
}
|
||||
@@ -119,14 +115,8 @@ extern void system_memorybarrier();
|
||||
|
||||
#else // !_WIN32
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define MLOCK(a,b) mlock((char *)(a),(b))
|
||||
#define MUNLOCK(a,b) (munlock((char *)(a),(b)) ? (perror("munlock failed"), 0) : 0)
|
||||
#define MUNLOCK_SAMPLEBLOCK(a) do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0);
|
||||
|
||||
#ifdef __APPLE__
|
||||
# if defined __MAC_10_12
|
||||
# define MBARRIER() __sync_synchronize()
|
||||
|
||||
Reference in New Issue
Block a user