summaryrefslogtreecommitdiff
path: root/linux/avr32/raw_syscall.h
blob: 01aab228118f80ba5fab195e582e638d621ec1e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Raw syscalls.
 *
 * Copyright (c) 2018 The strace developers.
 * All rights reserved.
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#ifndef 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)
{
	*err = 0;
	register kernel_ulong_t r8 __asm__("r8") = nr;
	register kernel_ulong_t r12 __asm__("r12");
	__asm__ __volatile__("scall"
			     : "=r"(r12)
			     : "r"(r8)
			     : "memory", "cc");
	return r12;
}
# define raw_syscall_0 raw_syscall_0

#endif /* !STRACE_RAW_SYSCALL_H */