summaryrefslogtreecommitdiff
path: root/common/JackShmMem.h
diff options
context:
space:
mode:
authorsletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224>2007-01-30 10:33:12 +0000
committersletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224>2007-01-30 10:33:12 +0000
commitacfc27db93c57748ca327016429b7429dedad29e (patch)
tree3929bf19171a035943e827f05a60f0d214a1acc5 /common/JackShmMem.h
parentd182adff3ff1d41ce6e4a8d32da36d941c7aa16d (diff)
downloadjack2-acfc27db93c57748ca327016429b7429dedad29e.tar.gz
New LockAllMemory and UnlockAllMemory functions.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1382 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'common/JackShmMem.h')
-rw-r--r--common/JackShmMem.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/JackShmMem.h b/common/JackShmMem.h
index aeaacb51..94bd7b50 100644
--- a/common/JackShmMem.h
+++ b/common/JackShmMem.h
@@ -32,11 +32,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <windows.h>
#define CHECK_MLOCK(ptr, size) (VirtualLock((ptr), (size)) != 0)
#define CHECK_MUNLOCK(ptr, size) (VirtualUnlock((ptr), (size)) != 0)
+ #define CHECK_MLOCKALL()
+ #define CHECK_MUNLOCKALL()
#else
#include <sys/types.h>
#include <sys/mman.h>
- #define CHECK_MLOCK(ptr, size) (munlock((ptr), (size)) == 0)
+ #define CHECK_MLOCK(ptr, size) (mlock((ptr), (size)) == 0)
#define CHECK_MUNLOCK(ptr, size) (munlock((ptr), (size)) == 0)
+ #define CHECK_MLOCKALL() (mlockall(MCL_CURRENT | MCL_FUTURE) == 0)
+ #define CHECK_MUNLOCKALL() (munlockall() == 0)
#endif
namespace Jack