1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-or-later 2*49cdfc7eSAndroid Build Coastguard Worker /* 3*49cdfc7eSAndroid Build Coastguard Worker * Copyright (C) 2023 SUSE LLC Andrea Cervesato <[email protected]> 4*49cdfc7eSAndroid Build Coastguard Worker */ 5*49cdfc7eSAndroid Build Coastguard Worker 6*49cdfc7eSAndroid Build Coastguard Worker #ifndef EVENTFD2_H__ 7*49cdfc7eSAndroid Build Coastguard Worker #define EVENTFD2_H__ 8*49cdfc7eSAndroid Build Coastguard Worker 9*49cdfc7eSAndroid Build Coastguard Worker #include "tst_test.h" 10*49cdfc7eSAndroid Build Coastguard Worker #include "lapi/syscalls.h" 11*49cdfc7eSAndroid Build Coastguard Worker eventfd2(unsigned int count,unsigned int flags)12*49cdfc7eSAndroid Build Coastguard Workerstatic inline int eventfd2(unsigned int count, unsigned int flags) 13*49cdfc7eSAndroid Build Coastguard Worker { 14*49cdfc7eSAndroid Build Coastguard Worker int ret; 15*49cdfc7eSAndroid Build Coastguard Worker 16*49cdfc7eSAndroid Build Coastguard Worker ret = tst_syscall(__NR_eventfd2, count, flags); 17*49cdfc7eSAndroid Build Coastguard Worker if (ret == -1) 18*49cdfc7eSAndroid Build Coastguard Worker tst_brk(TBROK | TERRNO, "eventfd2"); 19*49cdfc7eSAndroid Build Coastguard Worker 20*49cdfc7eSAndroid Build Coastguard Worker return ret; 21*49cdfc7eSAndroid Build Coastguard Worker } 22*49cdfc7eSAndroid Build Coastguard Worker 23*49cdfc7eSAndroid Build Coastguard Worker #endif /* EVENTFD2_H__ */ 24