Skip to contentSkip to conversation

recvmmsg for timespec64

PATCH Superseded Song Chen 1 participant 1 message Sep 8, 2021

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Song Chen

author
#0 lore raw

v2 cover recvmmsg for timespec64

This patch serial is to introdule a new sycall recvmmsg64 to support 64-bit time_t.

All the test cases have been tested and passed and resource is cleaned up before leaving.

At beginning, i tried to initialize socket like this way:

	socket(AF_UNIX, SOCK_STREAM, 0);

However, it returns immediately in __rtdm_fd_recvmmsg, couldn't get valid value from rtdm_fd_get.

I'm not familiar with this part, i guess it's supported in GPOS instead of xenomai, then i turned to IPCPROTO_XDDP, it works. Any suggestion about this part is welcomed.

---
v2:
1, adjust indentation, different files have different indentation, see
./kernel/cobalt/posix/io.h ./kernel/cobalt/posix/syscall32.h
I followed the function definition around mine
2, remove duplicated helper get_timespec64_xeno
get_timespec64 is defined in vanilla kernel, that's why suffix _xeno, but it still looks weired, it does nothing but just call cobalt_get_timespec64, so why not call cobalt_get_timespec64 directly with a little change of its definition.
4, rename variables
5, remove unnecessary branches
5, call smokey_check_errno

Song Chen (3):
y2038: cobalt/posix/io: Adding recvmmsg64
y2038: lib/cobalt/rtdm: dispatch recvmmg
y2038: testsuite/smokey/y2038: testcase for recvmmsg64

 include/cobalt/kernel/time.h           |   6 +-
 include/cobalt/uapi/syscall.h          |   1 +
 kernel/cobalt/posix/io.c               |   9 +++
 kernel/cobalt/posix/io.h               |   5 ++
 kernel/cobalt/posix/syscall32.c        |  15 +++-
 kernel/cobalt/posix/syscall32.h        |   6 ++
 kernel/cobalt/rtdm/fd.c                |   2 +-
 kernel/cobalt/time.c                   |   6 +-
 lib/cobalt/rtdm.c                      |   5 ++
 testsuite/smokey/y2038/syscall-tests.c | 132 +++++++++++++++++++++++++++++++++
 10 files changed, 176 insertions(+), 11 deletions(-)
Signature · 1 line
2.7.4