2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef TASK_MANAGER_INCLUDE_SHARE_TSKM_GSTEP_H_
18 #define TASK_MANAGER_INCLUDE_SHARE_TSKM_GSTEP_H_
20 #include "system_service/tskm_local_type.h"
21 #include "tskm_debug.h"
23 /*********************************************************
24 * Get gradual startup current info
25 *********************************************************/
26 inline TSKM_STATIC TSKM_BOOL_t gstepIsLast(TSKM_GSTEP_CTX_t* p_gstep) {
27 if (p_gstep->gstepNum == p_gstep->gstepIdx + 1) {
33 /*********************************************************
34 * Get gradual startup current info
35 *********************************************************/
36 inline TSKM_STATIC TSKM_GSTEP_t*
37 gstepGetCurrent(TSKM_GSTEP_CTX_t* p_gstep) {
38 if (p_gstep->gstepNum > p_gstep->gstepIdx) {
39 return &p_gstep->gstep[p_gstep->gstepIdx];
44 /*********************************************************
45 * Issue requests waiting for exec completion
46 *********************************************************/
47 inline TSKM_STATIC TSKM_GSTEP_t*
48 changeNextStep(TSKM_GSTEP_CTX_t* p_gstep) {
50 return gstepGetCurrent(p_gstep);
53 #endif // TASK_MANAGER_INCLUDE_SHARE_TSKM_GSTEP_H_