commit
99d04b3812
|
@ -0,0 +1,18 @@
|
|||
# Copyright (c) 2020 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
declare_args() {
|
||||
# configuration for samgr_lite created shared task's stack size.
|
||||
# 0 means using system default thread stack size, other positive values will be accepted.
|
||||
config_ohos_distributedschedule_samgr_lite_shared_task_size = 2048
|
||||
}
|
|
@ -10,8 +10,18 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("../config.gni")
|
||||
|
||||
defines = []
|
||||
|
||||
if (defined(config_ohos_distributedschedule_samgr_lite_shared_task_size) &&
|
||||
config_ohos_distributedschedule_samgr_lite_shared_task_size > 0) {
|
||||
defines += [ "SHARED_TASK_STACK_SIZE=$config_ohos_distributedschedule_samgr_lite_shared_task_size" ]
|
||||
}
|
||||
|
||||
config("external_settings_shared") {
|
||||
defines = [ "LAYER_INIT_SHARED_LIB" ]
|
||||
defines += [ "LAYER_INIT_SHARED_LIB" ]
|
||||
}
|
||||
|
||||
config("samgr_public") {
|
||||
|
|
|
@ -441,7 +441,8 @@ static void AddTaskPool(ServiceImpl *service, TaskConfig *cfg, const char *name)
|
|||
int pos = (int)cfg->priority / PROPERTY_STEP;
|
||||
SamgrLiteImpl *samgr = GetImplement();
|
||||
if (samgr->sharedPool[pos] == NULL) {
|
||||
TaskConfig shareCfg = DEFAULT_TASK_CFG(pos);
|
||||
TaskConfig shareCfg = {LEVEL_HIGH, (int16) ((pos) * PROPERTY_STEP + 1),
|
||||
SHARED_TASK_STACK_SIZE, 25, SHARED_TASK};
|
||||
samgr->sharedPool[pos] = SAMGR_CreateFixedTaskPool(&shareCfg, name, DEFAULT_SIZE);
|
||||
}
|
||||
service->taskPool = samgr->sharedPool[pos];
|
||||
|
|
|
@ -31,7 +31,6 @@ extern "C" {
|
|||
#define SINGLE_SIZE 1
|
||||
#define MAX_POOL_NUM 8
|
||||
#define PROPERTY_STEP 8
|
||||
#define DEFAULT_TASK_CFG(pos) {LEVEL_HIGH, (int16) ((pos) * PROPERTY_STEP + 1), 0x800, 25, SHARED_TASK}
|
||||
#define WDG_SAMGR_INIT_TIME 1000
|
||||
#define WDG_SVC_REG_TIME 5000
|
||||
#define WDG_SVC_BOOT_TIME 5000
|
||||
|
|
Loading…
Reference in New Issue