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

static int
arch_set_error(struct tcb *tcp)
{
	riscv_regs.a0 = -tcp->u_error;
	return set_regs(tcp->pid);
}

static int
arch_set_success(struct tcb *tcp)
{
	riscv_regs.a0 = tcp->u_rval;
	return set_regs(tcp->pid);
}