Skip to content

Commit 5f2a5d5

Browse files
authored
Merge pull request #1985 from Bluetooth-BLE/thread_manager
thread manager 软件包
1 parent 31e2e6a commit 5f2a5d5

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

system/thread_manager/Kconfig

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
# Kconfig file for package thread_manager
3+
menuconfig PKG_USING_THREAD_MANAGER
4+
bool "Thread manager (task registry, message dispatch, manager thread)"
5+
default n
6+
select PKG_USING_EVENT_LOOP
7+
select RT_USING_SEMAPHORE
8+
select RT_USING_MUTEX
9+
select RT_USING_EVENT
10+
select RT_USING_MAILBOX
11+
help
12+
Core threading framework for RT-Thread: thread_msg_registry, TASK_ID
13+
lookup, manager thread / thread_spawn_all_registered, and related APIs.
14+
Thread IDs, stack sizes and priorities are defined in inc/thread_config.h
15+
(edit that file for your application).
16+
Delayed events (thread_evt_send_delayed_*) use packages/event_loop.
17+
18+
if PKG_USING_THREAD_MANAGER
19+
20+
config PKG_THREAD_MANAGER_PATH
21+
string
22+
default "/packages/system/thread_manager"
23+
24+
config THREAD_SYSTEM_READY
25+
bool "Publish system-ready event after startup sync"
26+
default y
27+
help
28+
After all registered tasks complete thread_mgr_sys_start_sync_end,
29+
the manager publishes a global rt_event bit. Tasks call
30+
thread_sysready_wait() to block until the system is fully up.
31+
The event bit is never cleared so late callers return immediately.
32+
33+
config THREAD_MANAGER_USING_SAMPLES
34+
bool "Build samples (thread_test / thread_test1 / thread_test2)"
35+
default y
36+
help
37+
Compiles packages/thread_manager/samples/*.c (demo threads and
38+
cross-subscription demo between sample threads). Disable to save Flash.
39+
40+
config PKG_THREAD_MANAGER_VER
41+
string
42+
default "latest"
43+
44+
endif

system/thread_manager/package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "thread_manager",
3+
"description": "RT-Thread thread manager: task registry, message dispatch, manager thread, optional system-ready sync",
4+
"description_zh": "RT-Thread 线程管理器:任务注册表、消息分发、管理线程、可选的系统就绪同步",
5+
"enable": "PKG_USING_THREAD_MANAGER",
6+
"keywords": [
7+
"thread",
8+
"manager"
9+
],
10+
"category": "system",
11+
"author": {
12+
"name": "John.liu",
13+
"email": "450547566@qq.com",
14+
"github": "https://github.com/Bluetooth-BLE"
15+
},
16+
"license": "Apache-2.0",
17+
"repository": "https://github.com/Bluetooth-BLE/thread_manager",
18+
"icon": "unknown",
19+
"homepage": "https://github.com/Bluetooth-BLE/thread_manager#readme",
20+
"doc": "unknown",
21+
"site": [
22+
{
23+
"version": "latest",
24+
"URL": "https://github.com/Bluetooth-BLE/thread_manager.git",
25+
"filename": "",
26+
"VER_SHA": "main"
27+
}
28+
]
29+
}

0 commit comments

Comments
 (0)