1 /* 2 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef BASE_STARTUP_INIT_H 16 #define BASE_STARTUP_INIT_H 17 18 #ifdef __cplusplus 19 #if __cplusplus 20 extern "C" { 21 #endif 22 #endif 23 24 #ifndef PARAM_VALUE_LEN_MAX 25 #define PARAM_VALUE_LEN_MAX 96 26 #endif 27 28 #define PROCESS_EXIT_CODE 0x7f // 0x7f: user specified 29 // kit framework 30 #define DEFAULT_UID_KIT_FRAMEWORK 3 31 // max length of one param/path 32 #define MAX_ONE_ARG_LEN 200 33 #define FD_HOLDER_BUFFER_SIZE 4096 34 35 #define UNUSED(x) (void)(x) 36 37 #ifndef STARTUP_INIT_TEST 38 #define INIT_STATIC static 39 #else 40 #define INIT_STATIC 41 #endif 42 43 void SystemInit(void); 44 void LogInit(void); 45 void SystemPrepare(long long uptime); 46 void SystemConfig(const char *uptime); 47 void SystemRun(void); 48 void SystemExecuteRcs(void); 49 50 void ParseInitCfgByPriority(void); 51 int ParseInitCfg(const char *configFile, void *context); 52 void ReadConfig(void); 53 void SignalInit(void); 54 55 #ifdef __cplusplus 56 #if __cplusplus 57 } 58 #endif 59 #endif 60 #endif // BASE_STARTUP_INIT_H 61