Lines Matching refs:resource
62 static int getrlimit_u64(int resource, struct rlimit64 *rlim) in getrlimit_u64() argument
64 return tst_syscall(__NR_prlimit64, 0, resource, NULL, rlim); in getrlimit_u64()
78 static int getrlimit_ulong(int resource, struct rlimit_ulong *rlim) in getrlimit_ulong() argument
80 return syscall(__NR_getrlimit_ulong, resource, rlim); in getrlimit_ulong()
91 static int getrlimit_long(int resource, struct rlimit_long *rlim) in getrlimit_long() argument
93 return syscall(__NR_getrlimit, resource, rlim); in getrlimit_long()
97 static int compare_retval(int resource, int ret_u64, int errno_u64, in compare_retval() argument
103 resource, ret_u64, tst_strerrno(errno_u64), in compare_retval()
104 other_syscall, resource, ret_other, in compare_retval()
112 static int compare_u64_ulong(int resource, uint64_t val_u64, in compare_u64_ulong() argument
118 resource, kind, val_u64, in compare_u64_ulong()
119 resource, kind, val_ul); in compare_u64_ulong()
127 static int compare_u64_long(int resource, uint64_t val_u64, long val_l, in compare_u64_long() argument
133 resource, kind, val_u64, in compare_u64_long()
134 resource, kind, val_l); in compare_u64_long()
142 static void run(unsigned int resource) in run() argument
159 ret_u64 = getrlimit_u64(resource, &rlim_u64); in run()
163 ret_ul = getrlimit_ulong(resource, &rlim_ul); in run()
166 if (compare_retval(resource, ret_u64, errno_u64, ret_ul, errno_ul, in run()
168 compare_u64_ulong(resource, rlim_u64.rlim_cur, rlim_ul.rlim_cur, in run()
170 compare_u64_ulong(resource, rlim_u64.rlim_max, rlim_ul.rlim_max, in run()
175 resource, __NR_getrlimit_ulong_str, resource); in run()
179 ret_l = getrlimit_long(resource, &rlim_l); in run()
187 if (compare_retval(resource, ret_u64, errno_u64, ret_l, errno_l, in run()
189 compare_u64_long(resource, rlim_u64.rlim_cur, rlim_l.rlim_cur, in run()
191 compare_u64_long(resource, rlim_u64.rlim_max, rlim_l.rlim_max, in run()
196 "consistent results", resource, resource); in run()