aboutsummaryrefslogtreecommitdiff
path: root/include/arch/tcb.h
blob: f4c80c6f53cfd09b5fda8f4ac1ab3b5953a8585c (plain) (blame)
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
/* SPDX-License-Identifier: copyleft-next-0.3.1 */
/* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */

#ifndef KMI_ARCH_TCB_H
#define KMI_ARCH_TCB_H

/**
 * @file lock.h
 * Arch-specific tcb stuff.
 */

#if defined(riscv64)
#include "../../arch/riscv64/include/tcb.h"
#elif defined(riscv32)
#include "../../arch/riscv32/include/tcb.h"
#endif

/**
 * Force store tcb \p t in arch-specific way.
 * cpu_assign() is allowed to assume there's always a valid tcb
 * set, so during init we have to force set a tcb before cpu_assign() can be
 * used.
 *
 * @param t tcb to set.
 */
void tcb_assign(struct tcb *t);

#endif /* KMI_ARCH_TCB_H */