摘要: 固件升级流程,升级软件向app进程发送升级指令,在app中使用system(“./app.sh upgrade start”)执行脚本,启动upgrade进行升级包接收,同时关闭app进程;但发现升级完成后fd增加,app进程打开的fd存在两份; 分析原因:在使用 system 函数创建子进程执行脚 阅读全文
posted @ 2025-12-17 10:42 我自逍遥笑 阅读(10) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/opensmarty/p/17108834.html https://blog.csdn.net/qq_41908302/article/details/141278218 #define PRINT_MACRO_HELPER(x) #x #defin 阅读全文
posted @ 2025-12-17 10:41 我自逍遥笑 阅读(3) 评论(0) 推荐(0)
摘要: 需实现想大分辨率的二值化图像,其8bytes压缩成1bytes的数据,使用Neon实现快速压缩 #include <string> #include <vector> #include <unordered_map> #include <arm_neon.h> // 高效的8位打包, 使用Neon 阅读全文
posted @ 2025-12-17 10:39 我自逍遥笑 阅读(3) 评论(0) 推荐(0)
摘要: spdlog 直接集成了 fmt 库,所以所有 fmt 格式化语法都适用 0. 格式说明符语法结构 格式说明符的完整语法是: {[参数索引]:[对齐][符号][#][0][宽度][.精度][类型]} 关键总结: 整型格式化: {:d} - 十进制 {:x} - 小写十六进制 {:X} - 大写十六进 阅读全文
posted @ 2025-12-17 10:35 我自逍遥笑 阅读(15) 评论(0) 推荐(0)
摘要: # 配置 ~/.bashrc 来启用高级历史功能 #打开 ~/.bashrc 文件: vi ~/.bashrc #在文件末尾添加以下内容: # Enable incremental history search bind '"\C-r": reverse-search-history' #保存文件并 阅读全文
posted @ 2024-12-26 15:45 我自逍遥笑 阅读(28) 评论(0) 推荐(0)
摘要: 使用 std::all_of 判断字符串是否全为字母、数字或字母数字 #include <iostream> #include <string> #include <algorithm> #include <cctype> // 用于 isdigit, isalpha 等函数 // std::isl 阅读全文
posted @ 2024-11-29 16:14 我自逍遥笑 阅读(358) 评论(0) 推荐(0)
摘要: Liunx应用编译,需要降低GLIBC版本编译运行,但libc.so.6出现异常,shell 命令均不支持; /bin/ls: error while loading shared libraries: libc.so.6: cannot open shared object file: No su 阅读全文
posted @ 2024-03-02 14:28 我自逍遥笑 阅读(772) 评论(0) 推荐(0)
摘要: #获取branch名 GIT_BRANCH=$(shell git branch | sed -n '/\* /s///p')$(info GIT_REVISION = $(GIT_BRANCH)) #获取commit GIT_REVISION = $(shell git show -s --pre 阅读全文
posted @ 2021-11-24 15:32 我自逍遥笑 阅读(695) 评论(0) 推荐(0)
摘要: 普通的C++成员函数都隐含了一个传递函数作为参数,亦即“this”指针; 与类相关的回调函数要注意,类成员函数,如果是非静态,是带有this指针的,会与函数指针的类型不一致(无this),所以需要使用static函数,或者使用bind(&class::handler,this,_1) 1.普通函数方 阅读全文
posted @ 2021-10-27 09:21 我自逍遥笑 阅读(286) 评论(0) 推荐(0)
摘要: 使用memset会造成两个问题: 内存泄漏; =赋值时出现crash string类内部是使用char* data维护,使用new分配空间,直接memset会导致string内部data=NULL, 造成内存泄露; 如果这时使用string s1 = s2; 会出现NULL= new char(si 阅读全文
posted @ 2021-10-26 19:54 我自逍遥笑 阅读(130) 评论(0) 推荐(0)