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