From 571cdc5892b0714e7f0f54cb4be680e15ef1e760 Mon Sep 17 00:00:00 2001 From: zh-jn Date: Mon, 5 Oct 2020 03:15:34 +0000 Subject: [PATCH] fix serveral samgr-example compile errors Change-Id: Ib325e0c52acc030f291fc8a32ead794759846be3 --- app/samgr/BUILD.gn | 3 +++ app/samgr/bootstrap_example.c | 1 + app/samgr/broadcast_example.c | 2 ++ app/samgr/feature_example.c | 2 ++ app/samgr/maintenance_example.c | 2 +- app/samgr/service_example.c | 2 ++ app/samgr/specified_task_example.c | 1 + app/samgr/task_example.c | 1 + 8 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/samgr/BUILD.gn b/app/samgr/BUILD.gn index 73b4bd8..ea85b0c 100755 --- a/app/samgr/BUILD.gn +++ b/app/samgr/BUILD.gn @@ -28,5 +28,8 @@ static_library("example_samgr") { "//kernel/liteos_m/components/cmsis", "//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr", "//foundation/distributedschedule/interfaces/kits/samgr_lite/communication/broadcast", + "//foundation/distributedschedule/services/samgr_lite/samgr/source", + "//foundation/distributedschedule/services/samgr_lite/samgr/adapter", + "//test/xts/tools/hctest/include", ] } \ No newline at end of file diff --git a/app/samgr/bootstrap_example.c b/app/samgr/bootstrap_example.c index 934441d..05ceab7 100755 --- a/app/samgr/bootstrap_example.c +++ b/app/samgr/bootstrap_example.c @@ -18,6 +18,7 @@ #include #include #include +#include "time_adapter.h" typedef struct BootTestExample { Service service; diff --git a/app/samgr/broadcast_example.c b/app/samgr/broadcast_example.c index 18d2bba..47080dc 100755 --- a/app/samgr/broadcast_example.c +++ b/app/samgr/broadcast_example.c @@ -18,6 +18,8 @@ #include #include #include +#include "time_adapter.h" +#include "hctest.h" #define TEST_LEN 10 #define WAIT_PUB_PROC 1000 diff --git a/app/samgr/feature_example.c b/app/samgr/feature_example.c index c84abde..39d73bb 100755 --- a/app/samgr/feature_example.c +++ b/app/samgr/feature_example.c @@ -22,6 +22,8 @@ #include "feature.h" #include "service.h" #include "samgr_lite.h" +#include "time_adapter.h" +#include "hctest.h" #define WAIT_FEATURE_PROC 1000 enum MessageId { diff --git a/app/samgr/maintenance_example.c b/app/samgr/maintenance_example.c index 160179d..33d677f 100755 --- a/app/samgr/maintenance_example.c +++ b/app/samgr/maintenance_example.c @@ -111,7 +111,7 @@ static TaskConfig GetTaskConfig(Service *service) TaskConfig config = {LEVEL_HIGH, PRI_NORMAL, 0x800, 16, SHARED_TASK}; if (service == &g_maintenExample4) { - config.priority = PRI_HIGH; + config.priority = PRI_ABOVE_NORMAL; config.stackSize = 0x400; } return config; diff --git a/app/samgr/service_example.c b/app/samgr/service_example.c index 6ec994f..77027d7 100755 --- a/app/samgr/service_example.c +++ b/app/samgr/service_example.c @@ -21,6 +21,8 @@ #include "feature.h" #include "service.h" #include "samgr_lite.h" +#include "time_adapter.h" +#include "hctest.h" typedef struct DefaultFeatureApi { INHERIT_IUNKNOWN; diff --git a/app/samgr/specified_task_example.c b/app/samgr/specified_task_example.c index 4e188cd..8c61574 100755 --- a/app/samgr/specified_task_example.c +++ b/app/samgr/specified_task_example.c @@ -18,6 +18,7 @@ #include #include "service.h" #include "samgr_lite.h" +#include "time_adapter.h" #define TOTAL_SPEC_TASK_NUM 19 static const char *g_specTaskService[] = { diff --git a/app/samgr/task_example.c b/app/samgr/task_example.c index 1d20994..5c9061d 100755 --- a/app/samgr/task_example.c +++ b/app/samgr/task_example.c @@ -18,6 +18,7 @@ #include #include #include +#include "time_adapter.h" static const char *GetName(Service *service); static BOOL Initialize(Service *service, Identity identity); -- GitLab