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 #include <sys/types.h> 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 /* Fixed badge for root process and servers */ 23 #define ROOT_CAP_GROUP_BADGE (1) /* INIT */ 24 #define PROCMGR_BADGE ROOT_CAP_GROUP_BADGE 25 #define FSM_BADGE (2) 26 #define LWIP_BADGE (3) 27 #define TMPFS_BADGE (4) 28 #define MIN_FREE_SERVER_BADGE (5) 29 #define MIN_FREE_DRIVER_BADGE (100) 30 #define MIN_FREE_APP_BADGE (200) 31 32 /** 33 * Fixed pcid for root process and servers, 34 * these should be the same to the definition in cap_group.c 35 */ 36 #define ROOT_PROCESS_PCID (1) 37 #define PROCMGR_PCID (ROOT_PROCESS_PCID) 38 #define FSM_PCID (2) 39 #define LWIP_PCID (3) 40 #define TMPFS_PCID (4) 41 42 pid_t chcore_waitpid(pid_t pid, int *status, int options, int d); 43 44 #ifdef __cplusplus 45 } 46 #endif 47