Rename PortSetDeviceMetadata to PortSetDefaultMetadata
[jack2.git] / android / JackShmMem_os.h
blob3f9027a5fd2caa823b3b547fcea0774415104321
1 /*
2 Copyright (C) 2004-2008 Grame
3 Copyright (C) 2013 Samsung Electronics
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #ifndef __JackShmMem__android__
22 #define __JackShmMem__android__
24 #include <sys/types.h>
25 #include <sys/mman.h>
27 #define CHECK_MLOCK(ptr, size) (mlock((ptr), (size)) == 0)
28 #define CHECK_MUNLOCK(ptr, size) (munlock((ptr), (size)) == 0)
29 #define CHECK_MLOCKALL() (false)
30 #define CHECK_MUNLOCKALL() (false)
32 /* fix for crash jack server issue:
33 * case 1) jack_destroy_shm() in JackShmReadWritePtr1::Init() causes crash
34 * because server lost shared memory by destroying client side ahead.
36 #ifndef SERVER_SIDE
37 #define jack_destroy_shm(x) (0)
38 #endif
40 #endif /* __JackShmMem__android__ */