From f0cc3e861aca1c0e9c6ca7d2cf647a293a4d4c4b Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Mon, 8 Mar 2021 07:18:51 +0800 Subject: [PATCH] =?UTF-8?q?[example]=20=E5=AF=B9=E7=89=88=E6=9D=83?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=BF=9B=E8=A1=8C=E4=BA=BA=E5=B7=A5=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E5=B9=B6=E6=B7=BB=E5=8A=A0=E7=A1=AE=E5=AE=9E=E7=9A=84?= =?UTF-8?q?=E7=89=88=E6=9D=83=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/kernel/cpuusage.c | 8 ++++++++ examples/kernel/event_simple.c | 8 ++++++++ examples/kernel/heap_malloc.c | 9 +++++++++ examples/kernel/heap_realloc.c | 9 +++++++++ examples/kernel/mbox_send_wait.c | 9 +++++++++ examples/kernel/mbox_simple.c | 9 +++++++++ examples/kernel/memp_simple.c | 9 +++++++++ examples/kernel/messageq_simple.c | 9 +++++++++ examples/kernel/mutex_priority.c | 9 +++++++++ examples/kernel/mutex_simple.c | 7 ++++++- examples/kernel/semaphore_buffer_worker.c | 9 +++++++++ examples/kernel/semaphore_dynamic.c | 9 +++++++++ examples/kernel/semaphore_priority.c | 9 +++++++++ examples/kernel/semaphore_producer_consumer.c | 9 +++++++++ examples/kernel/semaphore_static.c | 9 +++++++++ examples/kernel/tc_comm.c | 9 +++++++++ examples/kernel/tc_comm.h | 9 +++++++++ examples/kernel/tc_sample.c | 9 +++++++++ examples/kernel/thread_delay.c | 9 +++++++++ examples/kernel/thread_delete.c | 9 +++++++++ examples/kernel/thread_detach.c | 9 +++++++++ examples/kernel/thread_dynamic.c | 9 +++++++++ examples/kernel/thread_dynamic_simple.c | 9 +++++++++ examples/kernel/thread_priority.c | 9 +++++++++ examples/kernel/thread_resume.c | 9 +++++++++ examples/kernel/thread_same_priority.c | 9 +++++++++ examples/kernel/thread_static.c | 9 +++++++++ examples/kernel/thread_static_simple.c | 9 +++++++++ examples/kernel/thread_suspend.c | 9 +++++++++ examples/kernel/thread_yield.c | 8 +++++++- examples/kernel/timer_control.c | 9 +++++++++ examples/kernel/timer_dynamic.c | 9 +++++++++ examples/kernel/timer_static.c | 9 +++++++++ examples/kernel/timer_stop_self.c | 9 +++++++++ examples/kernel/timer_timeout.c | 9 +++++++++ examples/libc/dirent.c | 9 ++++++--- examples/libc/env.c | 10 +++++++--- examples/libc/ex1.c | 8 ++++++++ examples/libc/ex2.c | 8 ++++++++ examples/libc/ex3.c | 8 ++++++++ examples/libc/ex4.c | 8 ++++++++ examples/libc/ex5.c | 8 ++++++++ examples/libc/ex6.c | 8 ++++++++ examples/libc/ex7.c | 8 ++++++++ examples/libc/file.c | 10 +++++++--- examples/libc/memory.c | 10 +++++++--- examples/libc/mq.c | 10 ++++++++++ examples/libc/printf.c | 10 ++++++++++ examples/libc/rand.c | 10 +++++++--- examples/libc/sem.c | 9 +++++++++ examples/libc/termios_test.c | 9 ++++++--- examples/libc/time.c | 9 ++++++--- examples/network/chargen.c | 9 +++++++++ examples/network/tcpclient.c | 9 +++++++++ examples/network/tcpsendpacket.c | 9 +++++++++ examples/network/tcpserver.c | 9 +++++++++ examples/network/udpclient.c | 9 +++++++++ examples/network/udpserver.c | 9 +++++++++ examples/test/device_test.c | 8 ++------ examples/test/fs_test.c | 8 ++------ examples/test/hwtimer_test.c | 9 +++++++++ examples/test/mem_test.c | 9 +++++++++ examples/test/net_test.c | 9 +++++++++ examples/test/rbb_test.c | 18 ++---------------- examples/test/rtc_test.c | 19 +++---------------- examples/ymodem/echo.c | 9 +++++++++ examples/ymodem/null.c | 9 +++++++++ examples/ymodem/tofile.c | 9 +++++++++ 68 files changed, 556 insertions(+), 67 deletions(-) diff --git a/examples/kernel/cpuusage.c b/examples/kernel/cpuusage.c index 490061ddb7..5f9d480139 100644 --- a/examples/kernel/cpuusage.c +++ b/examples/kernel/cpuusage.c @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ #include #include diff --git a/examples/kernel/event_simple.c b/examples/kernel/event_simple.c index e377e721bb..d2a2948fc7 100644 --- a/examples/kernel/event_simple.c +++ b/examples/kernel/event_simple.c @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ /* * 程序清单:事件例程 * diff --git a/examples/kernel/heap_malloc.c b/examples/kernel/heap_malloc.c index 271202ad8f..e2fa4511e7 100644 --- a/examples/kernel/heap_malloc.c +++ b/examples/kernel/heap_malloc.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + #include #include "tc_comm.h" diff --git a/examples/kernel/heap_realloc.c b/examples/kernel/heap_realloc.c index bc7b56a999..ab603c5d8d 100644 --- a/examples/kernel/heap_realloc.c +++ b/examples/kernel/heap_realloc.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + #include #include "tc_comm.h" diff --git a/examples/kernel/mbox_send_wait.c b/examples/kernel/mbox_send_wait.c index 86513fcb13..67f358ecea 100644 --- a/examples/kernel/mbox_send_wait.c +++ b/examples/kernel/mbox_send_wait.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:邮箱例程_发送阻塞 * diff --git a/examples/kernel/mbox_simple.c b/examples/kernel/mbox_simple.c index 5d588decb3..3f39bc0016 100644 --- a/examples/kernel/mbox_simple.c +++ b/examples/kernel/mbox_simple.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:邮箱例程 * diff --git a/examples/kernel/memp_simple.c b/examples/kernel/memp_simple.c index ab8f3b94ed..055db41912 100644 --- a/examples/kernel/memp_simple.c +++ b/examples/kernel/memp_simple.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:内存池例程 * diff --git a/examples/kernel/messageq_simple.c b/examples/kernel/messageq_simple.c index 51b371f59c..62504bebb7 100644 --- a/examples/kernel/messageq_simple.c +++ b/examples/kernel/messageq_simple.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:消息队列例程 * diff --git a/examples/kernel/mutex_priority.c b/examples/kernel/mutex_priority.c index f647fc4039..c1db934157 100755 --- a/examples/kernel/mutex_priority.c +++ b/examples/kernel/mutex_priority.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 创建7个进程,tid20、tid21、tid22、tid23、tid24、tid25、tid26、tid27、tid28、tid29 * 各任务优先级分别为20、21、22、23、24、25、26、27、28、29, diff --git a/examples/kernel/mutex_simple.c b/examples/kernel/mutex_simple.c index afbab3a3e1..4f6c5d7d28 100644 --- a/examples/kernel/mutex_simple.c +++ b/examples/kernel/mutex_simple.c @@ -1,5 +1,10 @@ /* - * 程序清单: + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * */ #include #include "tc_comm.h" diff --git a/examples/kernel/semaphore_buffer_worker.c b/examples/kernel/semaphore_buffer_worker.c index db3285c74b..5e4723b417 100644 --- a/examples/kernel/semaphore_buffer_worker.c +++ b/examples/kernel/semaphore_buffer_worker.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:信号量实现生产者消费者间的互斥 * diff --git a/examples/kernel/semaphore_dynamic.c b/examples/kernel/semaphore_dynamic.c index dc088e6e44..564d73c496 100644 --- a/examples/kernel/semaphore_dynamic.c +++ b/examples/kernel/semaphore_dynamic.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:动态信号量 * diff --git a/examples/kernel/semaphore_priority.c b/examples/kernel/semaphore_priority.c index d6e3ce3914..7e37a826cb 100644 --- a/examples/kernel/semaphore_priority.c +++ b/examples/kernel/semaphore_priority.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + #include #include "tc_comm.h" diff --git a/examples/kernel/semaphore_producer_consumer.c b/examples/kernel/semaphore_producer_consumer.c index a240cfa8b2..b6f996ff57 100644 --- a/examples/kernel/semaphore_producer_consumer.c +++ b/examples/kernel/semaphore_producer_consumer.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:生产者消费者例子 * diff --git a/examples/kernel/semaphore_static.c b/examples/kernel/semaphore_static.c index cb199886a4..641b0bc7c9 100644 --- a/examples/kernel/semaphore_static.c +++ b/examples/kernel/semaphore_static.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:静态信号量 * diff --git a/examples/kernel/tc_comm.c b/examples/kernel/tc_comm.c index f6493389a6..7153412aa0 100644 --- a/examples/kernel/tc_comm.c +++ b/examples/kernel/tc_comm.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + #include "tc_comm.h" #ifdef RT_USING_FINSH #include diff --git a/examples/kernel/tc_comm.h b/examples/kernel/tc_comm.h index c72c91ad53..17dd8eb924 100644 --- a/examples/kernel/tc_comm.h +++ b/examples/kernel/tc_comm.h @@ -1,3 +1,12 @@ + +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ #ifndef __TC_COMM_H__ #define __TC_COMM_H__ diff --git a/examples/kernel/tc_sample.c b/examples/kernel/tc_sample.c index 212875b716..272edc0e39 100644 --- a/examples/kernel/tc_sample.c +++ b/examples/kernel/tc_sample.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + #include #include "tc_comm.h" diff --git a/examples/kernel/thread_delay.c b/examples/kernel/thread_delay.c index f9404d704c..50740e2c8f 100644 --- a/examples/kernel/thread_delay.c +++ b/examples/kernel/thread_delay.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + #include #include "tc_comm.h" diff --git a/examples/kernel/thread_delete.c b/examples/kernel/thread_delete.c index 72eb4ec008..924a823f35 100644 --- a/examples/kernel/thread_delete.c +++ b/examples/kernel/thread_delete.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:删除线程 * diff --git a/examples/kernel/thread_detach.c b/examples/kernel/thread_detach.c index 9370f212e1..d0d72d017b 100644 --- a/examples/kernel/thread_detach.c +++ b/examples/kernel/thread_detach.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:线程脱离 * diff --git a/examples/kernel/thread_dynamic.c b/examples/kernel/thread_dynamic.c index 0afb7f8f84..35c67c02fc 100644 --- a/examples/kernel/thread_dynamic.c +++ b/examples/kernel/thread_dynamic.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + #include #include "tc_comm.h" diff --git a/examples/kernel/thread_dynamic_simple.c b/examples/kernel/thread_dynamic_simple.c index 28944b1f34..dc378a6696 100644 --- a/examples/kernel/thread_dynamic_simple.c +++ b/examples/kernel/thread_dynamic_simple.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:动态线程 * diff --git a/examples/kernel/thread_priority.c b/examples/kernel/thread_priority.c index 0045b0e578..abf45bbe07 100644 --- a/examples/kernel/thread_priority.c +++ b/examples/kernel/thread_priority.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + #include #include "tc_comm.h" diff --git a/examples/kernel/thread_resume.c b/examples/kernel/thread_resume.c index cea814616f..e776466326 100644 --- a/examples/kernel/thread_resume.c +++ b/examples/kernel/thread_resume.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:唤醒线程 * diff --git a/examples/kernel/thread_same_priority.c b/examples/kernel/thread_same_priority.c index c7da2087a0..a238e24932 100644 --- a/examples/kernel/thread_same_priority.c +++ b/examples/kernel/thread_same_priority.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + #include #include "tc_comm.h" diff --git a/examples/kernel/thread_static.c b/examples/kernel/thread_static.c index 3033f2cda1..9234255679 100644 --- a/examples/kernel/thread_static.c +++ b/examples/kernel/thread_static.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + #include #include "tc_comm.h" diff --git a/examples/kernel/thread_static_simple.c b/examples/kernel/thread_static_simple.c index d9e3ff6f61..e0021d2c5f 100644 --- a/examples/kernel/thread_static_simple.c +++ b/examples/kernel/thread_static_simple.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:静态线程 * diff --git a/examples/kernel/thread_suspend.c b/examples/kernel/thread_suspend.c index 947cc3cbf6..2219c7b8d6 100644 --- a/examples/kernel/thread_suspend.c +++ b/examples/kernel/thread_suspend.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:挂起线程 * diff --git a/examples/kernel/thread_yield.c b/examples/kernel/thread_yield.c index 4ed6b90e2a..97e57ba841 100644 --- a/examples/kernel/thread_yield.c +++ b/examples/kernel/thread_yield.c @@ -1,6 +1,12 @@ /* - * 程序清单: + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * */ + #include #include "tc_comm.h" diff --git a/examples/kernel/timer_control.c b/examples/kernel/timer_control.c index d1f782fcce..c92d558d5c 100644 --- a/examples/kernel/timer_control.c +++ b/examples/kernel/timer_control.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:动态定时器例程 * diff --git a/examples/kernel/timer_dynamic.c b/examples/kernel/timer_dynamic.c index 1260d50c09..35d7b845dd 100644 --- a/examples/kernel/timer_dynamic.c +++ b/examples/kernel/timer_dynamic.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:动态定时器例程 * diff --git a/examples/kernel/timer_static.c b/examples/kernel/timer_static.c index 884927bbc3..1523869b9a 100644 --- a/examples/kernel/timer_static.c +++ b/examples/kernel/timer_static.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:定时器例程 * diff --git a/examples/kernel/timer_stop_self.c b/examples/kernel/timer_stop_self.c index 38ec9c441b..584bc4128e 100644 --- a/examples/kernel/timer_stop_self.c +++ b/examples/kernel/timer_stop_self.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:动态定时器例程 * diff --git a/examples/kernel/timer_timeout.c b/examples/kernel/timer_timeout.c index 4d9a4fcc1d..40bbbf2831 100644 --- a/examples/kernel/timer_timeout.c +++ b/examples/kernel/timer_timeout.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * + */ + /* * 程序清单:消息队列例程 * diff --git a/examples/libc/dirent.c b/examples/libc/dirent.c index 06b72110e3..03fa94151d 100644 --- a/examples/libc/dirent.c +++ b/examples/libc/dirent.c @@ -1,8 +1,11 @@ /* - * dirent.c + * Copyright (c) 2006-2021, RT-Thread Development Team * - * Created on: 2010-11-17 - * Author: bernard + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2010-11-17 Bernard first version */ #include #include diff --git a/examples/libc/env.c b/examples/libc/env.c index 6bc8ba4d7e..05005c2d1f 100644 --- a/examples/libc/env.c +++ b/examples/libc/env.c @@ -1,9 +1,13 @@ /* - * env.c + * Copyright (c) 2006-2021, RT-Thread Development Team * - * Created on: 2010-11-17 - * Author: bernard + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2010-11-17 Bernard first version */ + #include #include #include diff --git a/examples/libc/ex1.c b/examples/libc/ex1.c index f03fefbc00..8f0ccfff1c 100644 --- a/examples/libc/ex1.c +++ b/examples/libc/ex1.c @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ /* Creates two threads, one printing 10000 "a"s, the other printing 10000 "b"s. Illustrates: thread creation, thread joining. */ diff --git a/examples/libc/ex2.c b/examples/libc/ex2.c index 925f4e1f23..df8f9a26a3 100644 --- a/examples/libc/ex2.c +++ b/examples/libc/ex2.c @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ /* The classic producer-consumer example. Illustrates mutexes and conditions. All integers between 0 and 9999 should be printed exactly twice, diff --git a/examples/libc/ex3.c b/examples/libc/ex3.c index e4e3405d20..1697e7145b 100644 --- a/examples/libc/ex3.c +++ b/examples/libc/ex3.c @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ /* Multi-thread searching. Illustrates: thread cancellation, cleanup handlers. */ diff --git a/examples/libc/ex4.c b/examples/libc/ex4.c index eb79840372..ec1c533a98 100644 --- a/examples/libc/ex4.c +++ b/examples/libc/ex4.c @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ /* Making a library function that uses static variables thread-safe. Illustrates: thread-specific data, pthread_once(). */ diff --git a/examples/libc/ex5.c b/examples/libc/ex5.c index aa94c34063..cce5306894 100644 --- a/examples/libc/ex5.c +++ b/examples/libc/ex5.c @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ /* The classic producer-consumer example, implemented with semaphores. All integers between 0 and 9999 should be printed exactly twice, once to the right of the arrow and once to the left. */ diff --git a/examples/libc/ex6.c b/examples/libc/ex6.c index ecf813fef8..ac6319d74c 100644 --- a/examples/libc/ex6.c +++ b/examples/libc/ex6.c @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ #include #include #include diff --git a/examples/libc/ex7.c b/examples/libc/ex7.c index e6473d48c2..e885f79c57 100644 --- a/examples/libc/ex7.c +++ b/examples/libc/ex7.c @@ -1,3 +1,11 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ /* ex7 * * Test case that illustrates a timed wait on a condition variable. diff --git a/examples/libc/file.c b/examples/libc/file.c index ea50e61628..79cdce3092 100644 --- a/examples/libc/file.c +++ b/examples/libc/file.c @@ -1,9 +1,13 @@ /* - * fstat.c + * Copyright (c) 2006-2021, RT-Thread Development Team * - * Created on: 2010-11-17 - * Author: bernard + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2010-11-17 Bernard first version */ + #include #include #include diff --git a/examples/libc/memory.c b/examples/libc/memory.c index d4f8e8dbde..063d90cfdc 100644 --- a/examples/libc/memory.c +++ b/examples/libc/memory.c @@ -1,9 +1,13 @@ /* - * memory.c + * Copyright (c) 2006-2021, RT-Thread Development Team * - * Created on: 2010-11-17 - * Author: bernard + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2010-11-17 Bernard first version */ + #include #include #include diff --git a/examples/libc/mq.c b/examples/libc/mq.c index 81ec6e35e8..a7f3f924dc 100644 --- a/examples/libc/mq.c +++ b/examples/libc/mq.c @@ -1,3 +1,13 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2010-11-17 Bernard first version + */ + #include #include #include diff --git a/examples/libc/printf.c b/examples/libc/printf.c index 85e33671d6..c7968b9a0b 100644 --- a/examples/libc/printf.c +++ b/examples/libc/printf.c @@ -1,3 +1,13 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2010-11-17 Bernard first version + */ + #include #include #include diff --git a/examples/libc/rand.c b/examples/libc/rand.c index 240519703b..96f5628bb8 100644 --- a/examples/libc/rand.c +++ b/examples/libc/rand.c @@ -1,9 +1,13 @@ /* - * rand.c + * Copyright (c) 2006-2021, RT-Thread Development Team * - * Created on: 2010-11-17 - * Author: bernard + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2010-11-17 Bernard first version */ + #include #include #include diff --git a/examples/libc/sem.c b/examples/libc/sem.c index 438a76b7f1..55b85114b8 100644 --- a/examples/libc/sem.c +++ b/examples/libc/sem.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include #include #include diff --git a/examples/libc/termios_test.c b/examples/libc/termios_test.c index 192021b9ab..f65bff1a9f 100644 --- a/examples/libc/termios_test.c +++ b/examples/libc/termios_test.c @@ -1,8 +1,11 @@ /* - * termios_test.c + * Copyright (c) 2006-2021, RT-Thread Development Team * - * Created on: 2017-12-06 - * Author: JasonJia + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2017-12-06 JasonJia first version */ #include diff --git a/examples/libc/time.c b/examples/libc/time.c index d9a6cb5b8e..5e91c1df80 100644 --- a/examples/libc/time.c +++ b/examples/libc/time.c @@ -1,8 +1,11 @@ /* - * time.c + * Copyright (c) 2006-2021, RT-Thread Development Team * - * Created on: 2010-11-17 - * Author: bernard + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2010-11-17 Bernard first version */ #include diff --git a/examples/network/chargen.c b/examples/network/chargen.c index 218449b845..3b4feaca9e 100644 --- a/examples/network/chargen.c +++ b/examples/network/chargen.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include #include diff --git a/examples/network/tcpclient.c b/examples/network/tcpclient.c index cc67645868..8f88985b10 100644 --- a/examples/network/tcpclient.c +++ b/examples/network/tcpclient.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include #include diff --git a/examples/network/tcpsendpacket.c b/examples/network/tcpsendpacket.c index 438423206f..da8bc4f524 100644 --- a/examples/network/tcpsendpacket.c +++ b/examples/network/tcpsendpacket.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include #include /* 为了解析主机名,需要包含netdb.h头文件 */ diff --git a/examples/network/tcpserver.c b/examples/network/tcpserver.c index 8c7382dcbb..e7438eb6f3 100644 --- a/examples/network/tcpserver.c +++ b/examples/network/tcpserver.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include #include diff --git a/examples/network/udpclient.c b/examples/network/udpclient.c index f8c42f3a12..1a3f0268af 100644 --- a/examples/network/udpclient.c +++ b/examples/network/udpclient.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include #include /* 使用BSD socket,需要包含sockets.h头文件 */ diff --git a/examples/network/udpserver.c b/examples/network/udpserver.c index a249475e04..a33a27da10 100644 --- a/examples/network/udpserver.c +++ b/examples/network/udpserver.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include #include diff --git a/examples/test/device_test.c b/examples/test/device_test.c index d62c2168ff..f9a7591478 100644 --- a/examples/test/device_test.c +++ b/examples/test/device_test.c @@ -1,11 +1,7 @@ /* - * File : device_test.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2011, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://openlab.rt-thread.com/license/LICENSE. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/examples/test/fs_test.c b/examples/test/fs_test.c index 2404b82e59..a86bbd6ac2 100644 --- a/examples/test/fs_test.c +++ b/examples/test/fs_test.c @@ -1,11 +1,7 @@ /* - * File : fs_test.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2011, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://openlab.rt-thread.com/license/LICENSE. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/examples/test/hwtimer_test.c b/examples/test/hwtimer_test.c index b488c305b2..15d7aa830f 100644 --- a/examples/test/hwtimer_test.c +++ b/examples/test/hwtimer_test.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include #include #include diff --git a/examples/test/mem_test.c b/examples/test/mem_test.c index 549be80ab4..cd7d1b3552 100644 --- a/examples/test/mem_test.c +++ b/examples/test/mem_test.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include #include diff --git a/examples/test/net_test.c b/examples/test/net_test.c index de143147d1..656686f091 100644 --- a/examples/test/net_test.c +++ b/examples/test/net_test.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + /* * Net Test Utilities for RT-Thread */ diff --git a/examples/test/rbb_test.c b/examples/test/rbb_test.c index f276c993da..c4236bca44 100644 --- a/examples/test/rbb_test.c +++ b/examples/test/rbb_test.c @@ -1,21 +1,7 @@ /* - * File : rbb_test.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/examples/test/rtc_test.c b/examples/test/rtc_test.c index 48129ca36c..4ed1349de4 100644 --- a/examples/test/rtc_test.c +++ b/examples/test/rtc_test.c @@ -1,26 +1,13 @@ /* - * File : rtc_test.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2017, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2018-01-15 Liu2guang the first version. */ + #include #include diff --git a/examples/ymodem/echo.c b/examples/ymodem/echo.c index 5cb807f519..fdd7e5228b 100644 --- a/examples/ymodem/echo.c +++ b/examples/ymodem/echo.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include static rt_device_t _odev; diff --git a/examples/ymodem/null.c b/examples/ymodem/null.c index c72ea064f8..640b8ba11b 100644 --- a/examples/ymodem/null.c +++ b/examples/ymodem/null.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include static enum rym_code _rym_dummy_write( diff --git a/examples/ymodem/tofile.c b/examples/ymodem/tofile.c index 4a3705ede7..35dca2f2c1 100644 --- a/examples/ymodem/tofile.c +++ b/examples/ymodem/tofile.c @@ -1,3 +1,12 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + */ + #include #include #include