• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 Institute of Parallel And Distributed Systems (IPADS), Shanghai Jiao Tong University (SJTU)
3  * Licensed under the Mulan PSL v2.
4  * You can use this software according to the terms and conditions of the Mulan PSL v2.
5  * You may obtain a copy of Mulan PSL v2 at:
6  *     http://license.coscl.org.cn/MulanPSL2
7  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
8  * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
9  * PURPOSE.
10  * See the Mulan PSL v2 for more details.
11  */
12 
13 #pragma once
14 
15 #include <chcore/type.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #define TYPE_USER     2 /* A normal user-level thread */
22 #define TYPE_SHADOW   3 /* A shadow thread for serving IPC requests */
23 #define TYPE_REGISTER 4 /* A register cb thread for serving IPC registration */
24 
25 struct thread_args {
26     /* specify the cap_group in which the new thread will be created */
27     cap_t cap_group_cap;
28     vaddr_t stack;
29     vaddr_t pc;
30     unsigned long arg;
31     vaddr_t tls;
32     unsigned int prio;
33     unsigned int type;
34 };
35 
36 #ifdef __cplusplus
37 }
38 #endif
39