for (; size; ++a, --size) {
uint32_t x = *a;
-#ifdef HAVE___BUILTIN_POPCOUNT
+# ifdef HAVE___BUILTIN_POPCOUNT
count += __builtin_popcount(x);
-#else
+# else
for (; x; ++count)
x &= x - 1;
-#endif
+# endif
}
return count;
int pad3[11];
} kernel_timex64_t;
-#ifdef SPARC64
+# ifdef SPARC64
typedef struct {
unsigned int modes;
int pad3[11];
} kernel_sparc64_timex_t;
-#endif /* SPARC64 */
+# endif /* SPARC64 */
# if HAVE_ARCH_TIME32_SYSCALLS
*/
#ifndef STRACE_RAW_SYSCALL_H
-#define STRACE_RAW_SYSCALL_H
+# define STRACE_RAW_SYSCALL_H
# include "kernel_types.h"
static inline kernel_ulong_t
raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
{
-#if defined(__CSKYABIV2__)
+# if defined(__CSKYABIV2__)
register kernel_ulong_t scno __asm__("r7") = nr;
-#else
+# else
register kernel_ulong_t scno __asm__("r1") = nr;
-#endif
+# endif
register kernel_ulong_t a0 __asm__("a0");
asm volatile("trap 0"
: "+r"(scno), "=r"(a0)
return res;
}
-# ifdef SYS_syscall_subcall
+#ifdef SYS_syscall_subcall
if (tcp_sysent(tcp)->sen == SEN_syscall)
decode_syscall_subcall(tcp);
-# endif
+#endif
#if defined SYS_ipc_subcall \
|| defined SYS_socket_subcall
switch (tcp_sysent(tcp)->sen) {
#ifdef IA64
extern int __clone2(int (*)(void *), void *, size_t, int, void *, ...);
-#define do_clone(fn_, stack_, size_, flags_, arg_, ...) \
+# define do_clone(fn_, stack_, size_, flags_, arg_, ...) \
wait_cloned(__clone2((fn_), (stack_), (size_), (flags_), (arg_), \
## __VA_ARGS__), (flags_) & 0xff, #flags_)
# define SYSCALL_NAME "clone2"
# define STACK_SIZE_FMT ", stack_size=%#lx"
# define STACK_SIZE_ARG child_stack_size,
#else
-#define do_clone(fn_, stack_, size_, flags_, arg_, ...) \
+# define do_clone(fn_, stack_, size_, flags_, arg_, ...) \
wait_cloned(clone((fn_), (stack_), (flags_), (arg_), \
## __VA_ARGS__), (flags_) & 0xff, #flags_)
# define SYSCALL_NAME "clone"
dfd, path, fname, "0xfffffff0 /* FSPICK_??? */", errstr);
k_fspick(-1, efault, 0xf);
-# ifndef PATH_TRACING
+# ifndef PATH_TRACING
printf("fspick(-1, %p, %s) = %s\n",
efault,
"FSPICK_CLOEXEC|FSPICK_SYMLINK_NOFOLLOW"
"|FSPICK_NO_AUTOMOUNT|FSPICK_EMPTY_PATH",
errstr);
-# endif
+# endif
k_fspick(-1, empty, -1);
-# ifndef PATH_TRACING
+# ifndef PATH_TRACING
printf("fspick(-1, \"\", %s|0xfffffff0) = %s\n",
"FSPICK_CLOEXEC|FSPICK_SYMLINK_NOFOLLOW"
"|FSPICK_NO_AUTOMOUNT|FSPICK_EMPTY_PATH",
errstr);
-# endif
+# endif
if (k_fspick(-1, path, 0) < 0)
printf("fspick(-1, \"%s\", 0) = %s\n",
int
main(void)
{
-#ifdef PRINT_PATHS
+# ifdef PRINT_PATHS
skip_if_unavailable("/proc/self/fd/");
-#endif
+# endif
long rc = syscall(__NR_inotify_init, 42);
-#ifdef PRINT_PATHS
+# ifdef PRINT_PATHS
if (rc < 0)
perror_msg_and_skip("inotify_init");
-#endif
+# endif
printf("inotify_init() = "
-#ifdef PRINT_PATHS
+# ifdef PRINT_PATHS
"%ld<anon_inode:inotify>\n", rc
-#else
+# else
"%s\n", sprintrc(rc)
-#endif
+# endif
);
puts("+++ exited with 0 +++");
# endif
# define all_flags (O_NONBLOCK | cloexec_flag)
-#ifdef PRINT_PATHS
-# define RC_FMT "%ld<%s>"
-#else
-# define RC_FMT "%s"
-#endif
+# ifdef PRINT_PATHS
+# define RC_FMT "%ld<%s>"
+# else
+# define RC_FMT "%s"
+# endif
int
main(void)
{
-#ifdef PRINT_PATHS
+# ifdef PRINT_PATHS
skip_if_unavailable("/proc/self/fd/");
-#endif
+# endif
static const kernel_ulong_t bogus_flags1 =
(kernel_ulong_t) 0xfacefeeddeadbeefULL | O_NONBLOCK;
rc = syscall(__NR_inotify_init1, all_flags);
-#ifdef PRINT_PATHS
+# ifdef PRINT_PATHS
if (rc < 0)
perror_msg_and_skip("inotify_init(%#x)", all_flags);
error_msg_and_fail("Unexpected first char '%c' of inotify fd "
"link path", buf[0]);
}
-#endif
+# endif
printf("inotify_init1(IN_NONBLOCK%s) = " RC_FMT "\n",
all_flags & cloexec_flag ? "|IN_CLOEXEC" : "",
-#ifdef PRINT_PATHS
+# ifdef PRINT_PATHS
rc, inotify_path
-#else
+# else
sprintrc(rc)
-#endif
+# endif
);
puts("+++ exited with 0 +++");