C语言进阶
文章平均质量分 76
向上奋进的菜鸟狸
这个作者很懒,什么都没留下…
展开
-
Linux list双向链表实现
list.h #ifndef _LIST_H #define _LIST_H #include "common.h" struct list_head { struct list_head *next, *prev; }; /** * INIT_LIST_HEAD - Initialize a list_head structure * @list: list_head structure to be initialized. * * Initializes the list_he原创 2022-01-22 11:46:40 · 430 阅读 · 0 评论 -
printf
printf()函数调用 __swrite _write_r _write HAL_UART_Transmit __swrite \newlib-cygwin-cygwin-3_3_2-release\newlib\libc\stdio\stdio.c _READ_WRITE_RETURN_TYPE __swrite (struct _reent *ptr, void *cookie, char const *buf, _READ_WRITE原创 2021-11-20 16:59:08 · 330 阅读 · 0 评论 -
ThreadX移植
TreadX移植 移植需要的文件 GitHub\threadx-6.1.9_rel\common\inc\ GitHub\threadx-6.1.9_rel\common\src\ GitHub\threadx-6.1.9_rel\ports\cortex_m3\gnu\inc\ GitHub\threadx-6.1.9_rel\ports\cortex_m3\gnu\src\ GitHub\threadx-6.1.9_rel\ports\cortex_m3\gnu\example_build\tx_in原创 2021-11-18 20:14:19 · 2687 阅读 · 0 评论 -
Linux内核中的巧妙实现
使用宏实现MIN/MAX函数 Linux内核实现(\linux-5.14.7\include\linux\minmax.h) /* * min()/max()/clamp() macros must accomplish three things: * * - avoid multiple evaluations of the arguments (so side-effects like * "x++" happen only once) when non-constant. * - p.原创 2021-10-26 15:30:10 · 246 阅读 · 0 评论