上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页

2013年3月23日

连续整数和

摘要: 1 #include 2 3 void show(unsigned int value, unsigned int start, unsigned seq_end) 4 { 5 int i = 0; 6 printf("%d = %d + ", value, start); 7 for(i = 1; i = value)37 break;3... 阅读全文

posted @ 2013-03-23 10:53 阿加 阅读(180) 评论(0) 推荐(0) 编辑

2013年3月19日

unicore32-linux-gcc 预定义宏

摘要: unicore32-linux-gcc -dM -E - </dev/null 阅读全文

posted @ 2013-03-19 12:36 阿加 阅读(155) 评论(0) 推荐(0) 编辑

2013年3月17日

汉明码距

摘要: lib/hweight.c 阅读全文

posted @ 2013-03-17 14:12 阿加 阅读(211) 评论(0) 推荐(0) 编辑

2013年3月10日

ConText

摘要: 想画下流程图,感觉word不好用,无意间看了这个,可是流程图这个周末是画不出来了。apt-get install texlive apt-get intall context 下载字体至/usr/share/fonts/truetype/adobe/ 目录下 并设置环境变量 OSFONTDIR 每次放置好字体后需要运行mtxrun --scripts fonts --reload mtxrun --scripts fonts --list --pattern=* -all 显示支持字体引述:http://liyanrui.is-programmer.com/2009/10/21/not-jus 阅读全文

posted @ 2013-03-10 20:03 阿加 阅读(225) 评论(0) 推荐(0) 编辑

2013年3月9日

内核中的原子上下文

摘要: 引述自:http://blog.csdn.net/lizhibin1091666592/article/details/6976254 内核的一个基本原则就是:在中断或者说原子上下文中,内核不能访问用户空间,而且内核是不能睡眠的。也就是说在这种情况下,内核是不能调用有可能引起睡眠的任何函数。一般来讲原子上下文指的是在中断或软中断中,以及在持有自旋锁的时候。内核提供了四个宏来判断是否处于这几种情况里:#define in_irq() (hardirq_count()) //在处理硬中断中#define in_softirq() (softirq_count()) //在处理软中断... 阅读全文

posted @ 2013-03-09 22:09 阿加 阅读(1470) 评论(0) 推荐(0) 编辑

PREEMPT_ACTIVE

摘要: thread_info中的preempt_count域设置当前进程是否可被抢占,但是我们还得注意下内核中会用到preempt_count() & PREEMPT_ACTIVE,这就是判断preempt_count 的PREEMPT_ACTIVE是否被置位,preempt_count的PREEMPT_ACTIVE位只有在内核抢占中才会被置位。__irq_svc: svc_entry#ifdef CONFIG_PREEMPT get_thread_info tsk ldr r8, [tsk, #TI_PREEMPT] @ get preempt count add... 阅读全文

posted @ 2013-03-09 22:01 阿加 阅读(2042) 评论(1) 推荐(1) 编辑

2013年3月3日

类继承

摘要: 1 #include 2 3 class CSofa 4 { 5 public: 6 CSofa() 7 { 8 m_nColor = 2; 9 } 10 11 virtual ~CSofa()12 { 13 ... 阅读全文

posted @ 2013-03-03 18:13 阿加 阅读(390) 评论(0) 推荐(0) 编辑

2013年2月27日

C++ 与 C 的预处理能力

摘要: #include <stdio.h> int main(void){ const int first = 5; int second = 8; int *p = (int *) &first; *p = 6; second = first; printf("second %d first %d\n", second, first); printf("con... 阅读全文

posted @ 2013-02-27 12:53 阿加 阅读(148) 评论(0) 推荐(0) 编辑

2013年2月24日

python

摘要: python学习 http://www.pythoner.cn/关于feed:http://buxulianwang.lofter.com/post/12a32e_af2368 不许联网Google group 订阅方法组页: https://groups.google.com/forum/#!forum/python-cn对应的 feed.新主题.top50: https://groups.google.com/forum/feed/python-cn/topics/atom.xml?num=50对应的 feed.有新回复主题.top50: https://groups... 阅读全文

posted @ 2013-02-24 16:15 阿加 阅读(261) 评论(0) 推荐(0) 编辑

2013年2月19日

find

摘要: find start_directory test options criteria_to_match action_to_perform_on_results-perm mode:文件许可正好符合mode-perm +mode:文件许可部分符合mode-perm -mode:文件许可至少符合mode忽略某个目录:如果在查找文件时希望忽略某个目录,那么可以使用-prune选项来指出需要忽略的目录。在使用-prune选项时要当心,因为如果你同时使用了-depth选项,那么-prune选项就会被find命令忽略。例如:在/apps目录下查找文件,而不再/apps/bin目录下查找,可以用:find 阅读全文

posted @ 2013-02-19 17:29 阿加 阅读(229) 评论(0) 推荐(0) 编辑

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 25 下一页

导航