comparison system/System.h @ 602:02d9664906e8

* Fixes to gcc-4.4 thanks to Michel Salim
author Chris Cannam
date Mon, 24 Aug 2009 16:07:23 +0000
parents bdc9bb371a9f
children 1415e35881f6
comparison
equal deleted inserted replaced
601:5eb5449432f5 602:02d9664906e8
60 60
61 #else 61 #else
62 62
63 #include <sys/mman.h> 63 #include <sys/mman.h>
64 #include <dlfcn.h> 64 #include <dlfcn.h>
65 #include <stdio.h> // for perror
65 66
66 #define MLOCK(a,b) ::mlock((a),(b)) 67 #define MLOCK(a,b) ::mlock((a),(b))
67 #define MUNLOCK(a,b) (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0) 68 #define MUNLOCK(a,b) (::munlock((a),(b)) ? (::perror("munlock failed"), 0) : 0)
68 #define MUNLOCK_SAMPLEBLOCK(a) do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0); 69 #define MUNLOCK_SAMPLEBLOCK(a) do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0);
69 //#define MLOCK(a,b) 1 70 //#define MLOCK(a,b) 1