From eef7913c2f5512a954e658a5908a47dbc0ec8c2e Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 15 Jun 2021 22:43:51 -0300 Subject: linux: Only use 64-bit syscall if required for semtimedop For !__ASSUME_TIME64_SYSCALLS there is no need to issue a 64-bit syscall if the provided timeout fits in a 32-bit one. The 64-bit usage should be rare since the timeout is a relative one. Checked on i686-linux-gnu on a 4.15 kernel and on a 5.11 kernel (with and without --enable-kernel=5.1) and on x86_64-linux-gnu. Reviewed-by: Lukasz Majewski --- sysvipc/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sysvipc/Makefile') diff --git a/sysvipc/Makefile b/sysvipc/Makefile index 86911803b5..d2acb6a70b 100644 --- a/sysvipc/Makefile +++ b/sysvipc/Makefile @@ -38,3 +38,12 @@ include ../Rules CFLAGS-msgrcv.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-msgsnd.c += -fexceptions -fasynchronous-unwind-tables + +ifeq (yes,$(build-shared)) +librt = $(common-objpfx)rt/librt.so +else +librt = $(common-objpfx)rt/librt.a +endif + +$(objpfx)test-sysvsem: $(librt) +$(objpfx)test-sysvsem-time64: $(librt) -- cgit 1.4.1