Skip to contentSkip to conversation

syscalls/io_pgetevents: Use tst_syscall() instead of syscall()

PATCH New Viresh Kumar 3 participants 3 messages Jan 29, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 syscalls/io_pgetevents: Use tst_syscall() instead of syscall()

Use the preferred helper tst_syscall() instead of syscall(), as it also takes care of error handling.

---
 include/lapi/io_pgetevents.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/lapi/io_pgetevents.h +2 -1
index 9c7f0ec9d813..3c9d5b2d7618 100644
@@ -21,7 +21,8 @@ int io_pgetevents(io_context_t ctx, long min_nr, long max_nr,
 		 struct io_event *events, struct timespec *timeout,
 		 sigset_t *sigmask)
 {
-	return syscall(__NR_io_pgetevents, ctx, min_nr, max_nr, events, timeout, sigmask);
+	return tst_syscall(__NR_io_pgetevents, ctx, min_nr, max_nr, events,
+			   timeout, sigmask);
 }
 #endif /* HAVE_IO_PGETEVENTS */
 #endif /* HAVE_LIBAIO */
Signature · 1 line
2.21.0.rc0.269.g1a574e7a288b
#1 lore raw

PATCH 1/1 syscalls/io_pgetevents: Use tst_syscall() instead of syscall()

Quoted 2 lines · Viresh Kumar

Use the preferred helper tst_syscall() instead of syscall(), as it also takes care of error handling.

Hi,

It is obviously correct.

Best Regards,

Xiao Yang

Quoted 20 lines
---
  include/lapi/io_pgetevents.h | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
include/lapi/io_pgetevents.h +2 -1
index 9c7f0ec9d813..3c9d5b2d7618 100644
@@ -21,7 +21,8 @@ int io_pgetevents(io_context_t ctx, long min_nr, long max_nr,
  		 struct io_event *events, struct timespec *timeout,
  		 sigset_t *sigmask)
  {
-	return syscall(__NR_io_pgetevents, ctx, min_nr, max_nr, events, timeout, sigmask);
+	return tst_syscall(__NR_io_pgetevents, ctx, min_nr, max_nr, events,
+			   timeout, sigmask);
  }
  #endif /* HAVE_IO_PGETEVENTS */
  #endif /* HAVE_LIBAIO */