summaryrefslogtreecommitdiff
path: root/src/components.c
diff options
context:
space:
mode:
authorsszlbg <[email protected]>2021-07-25 17:00:00 +0800
committersszlbg <[email protected]>2021-07-25 17:00:00 +0800
commitbf88963a3ec85ce6da013e4cd1c59ec5041d29e1 (patch)
treed4cd7d4fa3ff6e7b0c859a7660209787f47d168b /src/components.c
parent88d4faf68735948d6310e2d2271d576c5de254a0 (diff)
parent2b201cbb00c512def085332d7fb09194656418b9 (diff)
Merge branch 'master' into at_client-rt_realloc_iss
# Conflicts: # components/net/at/src/at_client.c
Diffstat (limited to 'src/components.c')
-rw-r--r--src/components.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/components.c b/src/components.c
index 9709d0aae2..e156b783e4 100644
--- a/src/components.c
+++ b/src/components.c
@@ -23,11 +23,11 @@
#ifdef RT_USING_USER_MAIN
#ifndef RT_MAIN_THREAD_STACK_SIZE
#define RT_MAIN_THREAD_STACK_SIZE 2048
-#endif
+#endif /* RT_MAIN_THREAD_STACK_SIZE */
#ifndef RT_MAIN_THREAD_PRIORITY
#define RT_MAIN_THREAD_PRIORITY (RT_THREAD_PRIORITY_MAX / 3)
-#endif
-#endif
+#endif /* RT_MAIN_THREAD_PRIORITY */
+#endif /* RT_USING_USER_MAIN */
#ifdef RT_USING_COMPONENTS_INIT
/*
@@ -98,7 +98,7 @@ void rt_components_board_init(void)
{
(*fn_ptr)();
}
-#endif
+#endif /* RT_DEBUG_INIT */
}
/**
@@ -124,9 +124,9 @@ void rt_components_init(void)
{
(*fn_ptr)();
}
-#endif
+#endif /* RT_DEBUG_INIT */
}
-#endif /* RT_USING_COMPONENTS_INIT */
+#endif /* RT_USING_COMPONENTS_INIT */
#ifdef RT_USING_USER_MAIN
@@ -134,7 +134,7 @@ void rt_application_init(void);
void rt_hw_board_init(void);
int rtthread_startup(void);
-#if defined(__CC_ARM) || defined(__CLANG_ARM)
+#ifdef __ARMCC_VERSION
extern int $Super$$main(void);
/* re-define main function */
int $Sub$$main(void)
@@ -167,7 +167,7 @@ int entry(void)
ALIGN(8)
static rt_uint8_t main_stack[RT_MAIN_THREAD_STACK_SIZE];
struct rt_thread main_thread;
-#endif
+#endif /* RT_USING_HEAP */
/* the system main thread */
void main_thread_entry(void *parameter)
@@ -177,13 +177,13 @@ void main_thread_entry(void *parameter)
#ifdef RT_USING_COMPONENTS_INIT
/* RT-Thread components initialization */
rt_components_init();
-#endif
+#endif /* RT_USING_COMPONENTS_INIT */
#ifdef RT_USING_SMP
rt_hw_secondary_cpu_up();
-#endif
+#endif /* RT_USING_SMP */
/* invoke system main function */
-#if defined(__CC_ARM) || defined(__CLANG_ARM)
+#ifdef __ARMCC_VERSION
{
extern int $Super$$main(void);
$Super$$main(); /* for ARMCC. */
@@ -211,7 +211,7 @@ void rt_application_init(void)
/* if not define RT_USING_HEAP, using to eliminate the warning */
(void)result;
-#endif
+#endif /* RT_USING_HEAP */
rt_thread_startup(tid);
}
@@ -237,7 +237,7 @@ int rtthread_startup(void)
#ifdef RT_USING_SIGNALS
/* signal system initialization */
rt_system_signal_init();
-#endif
+#endif /* RT_USING_SIGNALS */
/* create init_thread */
rt_application_init();
@@ -250,7 +250,7 @@ int rtthread_startup(void)
#ifdef RT_USING_SMP
rt_hw_spin_lock(&_cpus_lock);
-#endif /*RT_USING_SMP*/
+#endif /* RT_USING_SMP */
/* start scheduler */
rt_system_scheduler_start();
@@ -258,4 +258,4 @@ int rtthread_startup(void)
/* never reach here */
return 0;
}
-#endif
+#endif /* RT_USING_USER_MAIN */