Mercurial > hg > svcore
comparison system/System.h @ 1219:794b64e62e58 msvc2015_64
Tidy and re-fix for Linux
author | Chris Cannam |
---|---|
date | Wed, 19 Oct 2016 09:11:51 +0100 |
parents | 6b847a59d908 |
children | f350af2b542d |
comparison
equal
deleted
inserted
replaced
1218:6b847a59d908 | 1219:794b64e62e58 |
---|---|
80 | 80 |
81 #include <sys/mman.h> | 81 #include <sys/mman.h> |
82 #include <dlfcn.h> | 82 #include <dlfcn.h> |
83 #include <stdio.h> // for perror | 83 #include <stdio.h> // for perror |
84 #include <cmath> | 84 #include <cmath> |
85 #include <unistd.h> // sleep + usleep primarily | |
85 | 86 |
86 #define MLOCK(a,b) ::mlock((a),(b)) | 87 #define MLOCK(a,b) ::mlock((a),(b)) |
87 #define MUNLOCK(a,b) (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0) | 88 #define MUNLOCK(a,b) (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0) |
88 #define MUNLOCK_SAMPLEBLOCK(a) do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0); | 89 #define MUNLOCK_SAMPLEBLOCK(a) do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0); |
89 //#define MLOCK(a,b) 1 | 90 //#define MLOCK(a,b) 1 |