会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
real-watson
上一页
1
2
3
4
5
6
下一页
2022年5月12日
结构体和指针
摘要: 1. 结构体地址: #include <stdio.h> #include <stdlib.h> #include <string.h> struct son { int money; }; struct dah { int money; }; struct father { struct son
阅读全文
posted @ 2022-05-12 18:22 real-watson
阅读(44)
评论(0)
推荐(0)
编辑
2022年5月9日
深入分析链表实现队列流程(看图)
摘要:
阅读全文
posted @ 2022-05-09 15:15 real-watson
阅读(21)
评论(0)
推荐(0)
编辑
2022年4月25日
浅谈malloc free “机制”(1)
摘要: 该情况出现如下error,并且crash进程: 在by bike 过程中,进行内存分配,由于线程没有优先,乱序的启动running, 在by bus 过程中,进行内存分配,此时才进行双方的exits free,导致double free。 时许发生动态的调度变化,按逻辑可以实现单一线程free后再下
阅读全文
posted @ 2022-04-25 13:33 real-watson
阅读(19)
评论(0)
推荐(0)
编辑
2022年4月13日
vim 实用技巧
摘要: 每一个字母都是有特殊的意义,字母的组合更是体现效率, vim作为“丑陋的编辑器”并非不好用,简单而高效。 1. x,u,. 在光标下按下x,则 按下u则撤回上一步操作,按下 . 又恢复操作。 2. yy,p,5 yy,p 左边5 yy, 右边直接空行p,则可以实现完美的复制,附带格式和该死的spac
阅读全文
posted @ 2022-04-13 17:12 real-watson
阅读(111)
评论(0)
推荐(0)
编辑
2022年4月1日
rockchip 增加uartx的实现
摘要: 一、 谈谈驱动实现。(说的轻松) 针对uart,首先想到是驱动程序的实现,什么uart_driver,uart_port和uart_ops,都是一堆初始化的结构体,研究kernel driver的代码: 得到如下的基本流程实现driver: 1. 针对uart_driver,实现uart_regis
阅读全文
posted @ 2022-04-01 11:15 real-watson
阅读(136)
评论(0)
推荐(0)
编辑
2022年3月27日
浅谈systemd原理和应用
摘要: 多不说,直接上代码(可谓配置): [Unit] Description=demo app After=network-is-online.target [Service] Type=Simple ExecStart=/usr/bin/demo [Install] WantedBy=multi-use
阅读全文
posted @ 2022-03-27 10:42 real-watson
阅读(446)
评论(0)
推荐(0)
编辑
2021年12月21日
浅析memcmp 和 strcmp
摘要: eg: #include <stdio.h> #include <string.h> int main(void) { char string[7] = "ABCDEFG"; char copy[4] = "ABCD"; int ret; ret = memcmp(string,copy,7); p
阅读全文
posted @ 2021-12-21 16:08 real-watson
阅读(66)
评论(0)
推荐(0)
编辑
2021年12月17日
利用多个sem信号量在线程通讯
摘要: 直接上代码,主要用到sem_trywait & sem_post #include<stdio.h> #include<pthread.h> #include<stdlib.h> #include<string.h> #include<semaphore.h> #include<time.h> se
阅读全文
posted @ 2021-12-17 13:47 real-watson
阅读(46)
评论(0)
推荐(0)
编辑
sem信号量与死锁的边缘
摘要: 1. 演示一个例子,出现死锁,用strace debug得到 #include<stdio.h> #include<pthread.h> #include<stdlib.h> #include<string.h> #include<semaphore.h> sem_t sem; typedef st
阅读全文
posted @ 2021-12-17 11:33 real-watson
阅读(367)
评论(0)
推荐(0)
编辑
2021年12月16日
研究一种表驱动法的编程方式
摘要: #include <stdio.h> #include <string.h> typedef void (*func_evt_hdl)(); /*ptr*/ typedef struct _task_list_ { int flag; func_evt_hdl handler; }EVT_HDL_N
阅读全文
posted @ 2021-12-16 22:00 real-watson
阅读(49)
评论(0)
推荐(0)
编辑
上一页
1
2
3
4
5
6
下一页
<
2025年3月
>
日
一
二
三
四
五
六
23
24
25
26
27
28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
公告
昵称:
real-watson
园龄:
4年2个月
粉丝:
3
关注:
1
+加关注
导航
博客园
首页
新随笔
新文章
联系
订阅
管理
统计
随笔: 51
文章: 1
评论: 3
阅读:
17162
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
随笔分类
linux操作层面(17)
代码层面(40)
随笔档案
2022年12月(1)
2022年11月(1)
2022年10月(6)
2022年8月(1)
2022年5月(3)
2022年4月(3)
2022年3月(1)
2021年12月(7)
2021年11月(2)
2021年4月(6)
2021年3月(8)
2021年2月(6)
2021年1月(1)
2020年12月(5)
阅读排行榜
1. Linux C申请内存三种基本方式(1685)
2. linux下串口测试程序(1333)
3. 删除双向链表的其中一个节点(1226)
4. static变量和函数如何巧妙调用(1057)
5. 双向链表的三种插入方法研究(1023)
评论排行榜
1. linux下串口测试程序(3)
最新评论
1. Re:linux下串口测试程序
@豆腐、香菜 这个需要内核进行适配,然后在应用层去增加256000的处理。...
--real-watson
2. Re:linux下串口测试程序
你好,请问一下,我看上面没有波特率256000,我现在想要设置成256000怎么设置???
--豆腐、香菜
3. Re:linux下串口测试程序
你好,请教一个问题,我在read的时候出现 errno Try again 11,是什么原因?
--毛泽平
点击右上角即可分享