Line data Source code
1 1 : /* 2 : * Copyright (c) 2020 Antony Pavlov <antonynpavlov@gmail.com> 3 : * 4 : * based on include/arch/riscv/thread.h 5 : * 6 : * SPDX-License-Identifier: Apache-2.0 7 : */ 8 : 9 : /** 10 : * @file 11 : * @brief Per-arch thread definition 12 : * 13 : * This file contains definitions for 14 : * 15 : * struct _thread_arch 16 : * struct _callee_saved 17 : * 18 : * necessary to instantiate instances of struct k_thread. 19 : */ 20 : 21 : #ifndef ZEPHYR_INCLUDE_ARCH_MIPS_THREAD_H_ 22 : #define ZEPHYR_INCLUDE_ARCH_MIPS_THREAD_H_ 23 : 24 : #ifndef _ASMLANGUAGE 25 : #include <zephyr/types.h> 26 : 27 : /* 28 : * The following structure defines the list of registers that need to be 29 : * saved/restored when a cooperative context switch occurs. 30 : */ 31 : struct _callee_saved { 32 : unsigned long sp; /* Stack pointer */ 33 : 34 : unsigned long s0; /* saved register */ 35 : unsigned long s1; /* saved register */ 36 : unsigned long s2; /* saved register */ 37 : unsigned long s3; /* saved register */ 38 : unsigned long s4; /* saved register */ 39 : unsigned long s5; /* saved register */ 40 : unsigned long s6; /* saved register */ 41 : unsigned long s7; /* saved register */ 42 : unsigned long s8; /* saved register AKA fp */ 43 : }; 44 : typedef struct _callee_saved _callee_saved_t; 45 : 46 : struct _thread_arch { 47 : uint32_t swap_return_value; /* Return value of z_swap() */ 48 : }; 49 : 50 : typedef struct _thread_arch _thread_arch_t; 51 : 52 : #endif /* _ASMLANGUAGE */ 53 : 54 : #endif /* ZEPHYR_INCLUDE_ARCH_MIPS_THREAD_H_ */