linux kernel将关键信息保存到文件做法 很好的调试方法
下面有2个示例:
1:保存机器从开机到结束的VBATT;
2:保存uart接收到的数据到文件;
意义不多说了。
以下是代码:
#include
#include
#include
static struct file *fp =NULL;
int write_to_file...
分类:
系统相关 时间:
2014-09-05 22:28:22
阅读次数:
318
Python打印不换行方法一、可以用print i,即在后面加逗号,但是这还是有一个不好的地方,就是会产生空格,print 1,print 2,则会输出:1 2方法二、import syssys.stdout.write("abc")sys.stdout.write("def")链表:一个链表类,一...
分类:
编程语言 时间:
2014-09-05 22:22:32
阅读次数:
188
1.windows下安装python官网下载安装即可2.安装后的环境设置我的电脑--属性--高级--设置path的地方添加python安装目录,如C:\Python27;C:\Python333.多版本的切换三种方法:1)修改C:\Python27;C:\Python33内python.exe为py...
分类:
编程语言 时间:
2014-09-05 21:02:11
阅读次数:
509
Search a 2D Matrix
Total Accepted: 18506 Total
Submissions: 59402My Submissions
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following pr...
分类:
其他好文 时间:
2014-09-05 18:21:38
阅读次数:
232
intel给的sample文档中关于Exception Path Sample Application例子的解释已经很清楚了,但是对于我这个刚刚接触网关知识的人来说还是有点陌生。
引用他们的图例:数据流 流向图
过程分析:
线程CoreA0从port0读数据并写到tapA0;
线程CoreB1从tapB1读数据并写到port1;
这是我们需要创建一个网桥br0来连接t...
分类:
移动开发 时间:
2014-09-05 18:19:41
阅读次数:
616
由于匿名管道使用的是文件描述符,所以我们只能用read和write对其进行读写。因为标准读写函数都是基于文件指针的。当read成功时,返回值为读到的字符数。当遇见文件结尾时,返回0(也就是什么都读不出来了)。出错,返回-1。—> 参考 man 2 read当write成功时,返回值为写入的字符数。返...
分类:
其他好文 时间:
2014-09-05 18:04:41
阅读次数:
221
OverviewWe can get SegFault by several reasons:aligned access to unaligned memory(usally see in ARM NEON)cross-border accessint temp[2] = {0};temp[2] ...
分类:
系统相关 时间:
2014-09-05 17:57:01
阅读次数:
296
1 int f(int*a,int*b,int n) 2 { 3 if(!a||!b||nmax) 8 { 9 temp[i]++;10 max=a[i];11 }12 int min=a[n-1];...
分类:
其他好文 时间:
2014-09-05 17:56:31
阅读次数:
220
dos命令:wmic path win32_printer where network=true deletevbs脚本:Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")...
分类:
其他好文 时间:
2014-09-05 17:56:21
阅读次数:
207
音频文件sound.m4a放到Supporting Files目录引用头文件#import 定义一个全局的属性:@property (nonatomic, strong) AVAudioPlayer *player; //音频播放器//初始化音频播放器NSString *path = [[NSBun...
分类:
移动开发 时间:
2014-09-05 17:53:21
阅读次数:
584