1 /* 2 * Copyright (c) 2009-2022 Huawei Technologies Co., Ltd. All rights reserved. 3 * 4 * UniProton is licensed under Mulan PSL v2. 5 * You can use this software according to the terms and conditions of the Mulan PSL v2. 6 * You may obtain a copy of Mulan PSL v2 at: 7 * http://license.coscl.org.cn/MulanPSL2 8 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 9 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 10 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 11 * See the Mulan PSL v2 for more details. 12 * Create: 2009-12-22 13 * Description: Task Attribute Info implementation 14 */ 15 #include "prt_task_external.h" 16 17 /* 18 * 描述:获取指定任务的状态信息 19 */ PRT_TaskGetStatus(TskHandle taskPid)20OS_SEC_L4_TEXT TskStatus PRT_TaskGetStatus(TskHandle taskPid) 21 { 22 struct TagTskCb *taskCb = NULL; 23 24 if (CHECK_TSK_PID_OVERFLOW(taskPid)) { 25 return (TskStatus)OS_INVALID; 26 } 27 28 taskCb = GET_TCB_HANDLE(taskPid); 29 30 return (TskStatus)taskCb->taskStatus; 31 } 32 33