1 /*
2  * Copyright (c) 2017 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @file
9  * @brief Per-arch thread definition
10  *
11  * This file contains definitions for
12  *
13  *  struct _thread_arch
14  *  struct _callee_saved
15  *
16  * necessary to instantiate instances of struct k_thread.
17  */
18 
19 #ifndef ZEPHYR_INCLUDE_ARCH_NIOS2_THREAD_H_
20 #define ZEPHYR_INCLUDE_ARCH_NIOS2_THREAD_H_
21 
22 #ifndef _ASMLANGUAGE
23 #include <zephyr/types.h>
24 
25 struct _callee_saved {
26 	/* General purpose callee-saved registers */
27 	uint32_t r16;
28 	uint32_t r17;
29 	uint32_t r18;
30 	uint32_t r19;
31 	uint32_t r20;
32 	uint32_t r21;
33 	uint32_t r22;
34 	uint32_t r23;
35 
36 	 /* Normally used for the frame pointer but also a general purpose
37 	  * register if frame pointers omitted
38 	  */
39 	uint32_t r28;
40 
41 	/* Return address */
42 	uint32_t ra;
43 
44 	/* Stack pointer */
45 	uint32_t sp;
46 
47 	/* IRQ status before irq_lock() and call to z_swap() */
48 	uint32_t key;
49 
50 	/* Return value of z_swap() */
51 	uint32_t retval;
52 };
53 
54 typedef struct _callee_saved _callee_saved_t;
55 
56 struct _thread_arch {
57 	/* nothing for now */
58 };
59 
60 typedef struct _thread_arch _thread_arch_t;
61 
62 #endif /* _ASMLANGUAGE */
63 
64 #endif /* ZEPHYR_INCLUDE_ARCH_NIOS2_THREAD_H_ */
65