惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
C
Check Point Blog
博客园 - Franky
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
V2EX - 技术
V2EX - 技术
AI
AI
Hacker News - Newest:
Hacker News - Newest: "LLM"
Jina AI
Jina AI
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
H
Hacker News: Front Page
H
Hackread – Cybersecurity News, Data Breaches, AI and More
O
OpenAI News
Attack and Defense Labs
Attack and Defense Labs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
爱范儿
爱范儿
H
Heimdal Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
G
Google Developers Blog
G
GRAHAM CLULEY
V
V2EX
The Register - Security
The Register - Security
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
Schneier on Security
Schneier on Security
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
Help Net Security
Help Net Security
大猫的无限游戏
大猫的无限游戏
C
CERT Recently Published Vulnerability Notes
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
The Last Watchdog
The Last Watchdog
J
Java Code Geeks
S
Secure Thoughts
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
量子位
NISL@THU
NISL@THU
K
Kaspersky official blog
Engineering at Meta
Engineering at Meta
T
Threatpost
Recent Commits to openclaw:main
Recent Commits to openclaw:main
宝玉的分享
宝玉的分享
Security Latest
Security Latest
T
The Exploit Database - CXSecurity.com
博客园_首页
A
Arctic Wolf

博客园 - 邗影

关于音频PA结构腔体 球面渲染 关于linux和shi脚本常用的通配符 关于fread读不满一块和读不满count的返回值 如何去掉merge UBI的覆盖写和擦除 DTSI 多个模块共用同一个 GPIO 引脚冲突 问题汇总 debug比release程序启动的快 关于CPU占用优先级的调整 关于蜂鸣器发声 麦序与声源定位 关于squashfs压缩挂载 软连接生成 线程退出未定义行为 linux文件查找 数据传输报错port unreachable D3D11绘制三角形 关于延迟测试 v4l2检测 关于数据库的性能 流媒体小记包含一些面试问题 v4l2视频采集 流媒体ZLM配置vscode远程开发 关于SPS中的帧率问题 Linux编译问题 SSl冲突问题 D3D初始化窗口显示 关于线程池
C语言弱函数
邗影 · 2025-09-19 · via 博客园 - 邗影
project/
├── core/
│   └── system_init.c    // 核心框架代码,包含弱函数
├── boards/
│   └── my_board.c       // 板级特定代码,提供强函数
└── main.c               // 主程序
//定义一系列弱的初始化钩子
__weak void clock_init(void) { }
在其他文件中定义同名函数(普通函数,强函数)

用于在未定义强函数时候走弱函数的定义,避免出现未定义;如果有强函数的定义则真是使用的是强函数(会覆盖);
如弱函数可以实现C语言多态
C语言--__attribute__((weak))_c语言 weak-CSDN博客