summaryrefslogtreecommitdiff
path: root/linux/riscv64/set_scno.c
blob: 6e3272c5ccdc84c798b8f9a7e8116308c1b79b45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * Copyright (c) 2016-2018 The strace developers.
 * All rights reserved.
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

static int
arch_set_scno(struct tcb *tcp, kernel_ulong_t scno)
{
	if (ptrace_syscall_info_is_valid() && get_regs(tcp) < 0)
		return -1;
	riscv_regs.a7 = scno;
	return set_regs(tcp->pid);
}