* [LTP] [PATCH 1/3] configure: check if process_vm_read/write is supported
@ 2012-04-23 10:32 Jan Stancek
0 siblings, 0 replies; only message in thread
From: Jan Stancek @ 2012-04-23 10:32 UTC (permalink / raw)
To: ltp-list; +Cc: Jeffrey Burke
[-- Attachment #1: Type: text/plain, Size: 368 bytes --]
CMA (cross memory attach) patch introduced 2 new syscalls:
process_vm_readv
process_vm_writev
Check in configure if these are supported.
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
configure.ac | 1 +
m4/ltp-cma.m4 | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+)
create mode 100644 m4/ltp-cma.m4
[-- Attachment #2: 0001-configure-check-if-process_vm_read-write-is-supporte.patch --]
[-- Type: text/x-patch, Size: 2659 bytes --]
diff --git a/configure.ac b/configure.ac
index 1696df0..55ee132 100644
--- a/configure.ac
+++ b/configure.ac
@@ -166,5 +166,6 @@ LTP_CHECK_MADVISE
LTP_CHECK_ACL_SUPPORT
LTP_CHECK_FS_IOC_FLAGS
LTP_CHECK_MREMAP_FIXED
+LTP_CHECK_SYSCALLS_CMA
AC_OUTPUT
diff --git a/m4/ltp-cma.m4 b/m4/ltp-cma.m4
new file mode 100644
index 0000000..8867a5e
--- /dev/null
+++ b/m4/ltp-cma.m4
@@ -0,0 +1,67 @@
+dnl
+dnl Copyright (c) Linux Test Project, 2012
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+dnl the GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+
+dnl
+dnl LTP_CHECK_SYSCALLS_CMA
+dnl ----------------------------
+dnl
+dnl
+dnl
+
+AC_DEFUN([LTP_CHECK_SYSCALLS_CMA],[
+_LTP_CHECK_SYSCALL_PROCESS_VM_READV
+_LTP_CHECK_SYSCALL_PROCESS_VM_WRITEV
+])
+
+dnl _LTP_CHECK_SYSCALL_PROCESS_VM_READV
+AC_DEFUN([_LTP_CHECK_SYSCALL_PROCESS_VM_READV],[dnl
+AC_MSG_CHECKING([for process_vm_readv])
+AC_LINK_IFELSE([AC_LANG_SOURCE([
+#include <sys/uio.h>
+#include <stdlib.h>
+int main(void) {
+ (void) process_vm_readv(0, NULL, 0, NULL, 0 ,0);
+ return 0;
+}])],[has_process_vm_readv="yes"])
+if test "x$has_process_vm_readv" = "xyes"; then
+ AC_DEFINE(HAVE_PROCESS_VM_READV,1,[Define to 1 if process_vm_readv is present])
+ AC_MSG_RESULT(yes)
+else
+ AC_DEFINE(HAVE_PROCESS_VM_READV,0,[Define to 1 if process_vm_readv is present])
+ AC_MSG_RESULT(no)
+fi
+])
+
+dnl _LTP_CHECK_SYSCALL_PROCESS_VM_WRITEV
+AC_DEFUN([_LTP_CHECK_SYSCALL_PROCESS_VM_WRITEV],[dnl
+AC_MSG_CHECKING([for process_vm_writev])
+AC_LINK_IFELSE([AC_LANG_SOURCE([
+#include <sys/uio.h>
+#include <stdlib.h>
+int main(void) {
+ (void) process_vm_writev(0, NULL, 0, NULL, 0 ,0);
+ return 0;
+}])],[has_process_vm_writev="yes"])
+if test "x$has_process_vm_writev" = "xyes"; then
+ AC_DEFINE(HAVE_PROCESS_VM_WRITEV,1,[Define to 1 if process_vm_writev is present])
+ AC_MSG_RESULT(yes)
+else
+ AC_DEFINE(HAVE_PROCESS_VM_WRITEV,0,[Define to 1 if process_vm_writev is present])
+ AC_MSG_RESULT(no)
+fi
+])
[-- Attachment #3: Type: text/plain, Size: 272 bytes --]
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-04-23 10:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-23 10:32 [LTP] [PATCH 1/3] configure: check if process_vm_read/write is supported Jan Stancek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox