All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp-list@lists.sourceforge.net
Cc: Jeffrey Burke <jburke@redhat.com>
Subject: [LTP] [PATCH 1/3] configure: check if process_vm_read/write is supported
Date: Mon, 23 Apr 2012 12:32:02 +0200	[thread overview]
Message-ID: <4F952FA2.7060305@redhat.com> (raw)

[-- 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

                 reply	other threads:[~2012-04-23 10:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F952FA2.7060305@redhat.com \
    --to=jstancek@redhat.com \
    --cc=jburke@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.