04 2017 档案
摘要:hexo你的博客:http://ibruce.info/2013/11/22/hexo-your-blog/ 手把手教你用Hexo+Github 搭建属于自己的博客: http://blog.csdn.net/gdutxiaoxu/article/details/53576018
阅读全文
摘要:http://blog.csdn.net/ljianhui/article/details/10253345 1、shmget函数 该函数用来创建共享内存,它的原型为: [cpp] view plain copy print? int shmget(key_t key, size_t size, i
阅读全文
摘要:其中,参数 fd 表示文件描述符;参数 operation 指定要进行的锁操作,该参数的取值有如下几种:LOCK_SH, LOCK_EX, LOCK_UN 和 LOCK_MAND LOCK_SH:表示要创建一个共享锁,在任意时间内,一个文件的共享锁可以被多个进程拥有 LOCK_EX:表示创建一个排他
阅读全文
摘要:一、命名管道(FIFO) 匿名管道应用的一个限制就是只能在具有共同祖先(具有亲缘关系)的进程间通信。如果我们想在不相关的进程之间交换数据,可以使用FIFO文件来做这项工作,它经常被称为命名管道。 命名管道可以从命令行上创建,命令行方法是使用下面这个命令:$ mkfifo filename命名管道也可
阅读全文
摘要:int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const stru
阅读全文
摘要:Git 参考手册: http://gitref.org/zh/index.html GitHub从入门到精通常用命令: http://www.ihref.com/read-16369.html git常用命令行:http://www.jb51.net/article/100722.htm Works
阅读全文
摘要:http://blog.csdn.net/gdujian0119/article/details/6911620
阅读全文
摘要:1、内核态struct uio_info irq_info ={ .name = "fpga_irq2", .version = "0.1", .irq = 155, .irq_flags = IRQ_TYPE_LEVEL_HIGH | IRQF_SHARED | IRQF_DISABLED, .h
阅读全文
摘要:1、内存 2,线程 3,系统信息 derek@ubox:~/share/uspace$ cat /proc/versionLinux version 4.4.0-72-generic (buildd@lcy01-17) (gcc version 5.4.0 20160609 (Ubuntu 5.4.
阅读全文
摘要:1、查看内核符号:derek@ubox:~/share$ sudo modprobe uioderek@ubox:~/share$ cat /proc/kallsyms | grep uio0000000000000000 t map_type_show [uio]0000000000000000
阅读全文
摘要:1,内核代码 2,用户代码 3,测试脚本
阅读全文
摘要:内核态: 用户态: 测试结果:
阅读全文
摘要:http://blog.chinaunix.net/uid-20543672-id-3211832.html http://smilejay.com/2011/12/linux_loglevel/
阅读全文
摘要:http://blog.csdn.net/linuw/article/details/6048307 __attribute__ ((constructor))指定的函数在共享库loading的时候调用,__attribute__ ((destructor))指定的函数在共享库unloading的时
阅读全文
摘要:初始化:1、open文件2、write 1M空数据到文件3、mmap文件,ptr作为写指针4、关闭文件
阅读全文
摘要:http://pubs.opengroup.org/onlinepubs/009695399/functions/sigaction.html
阅读全文
摘要:#include <pthread.h> pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;int pthread_mutex_init (pthread_mutex_t *mutex , pthread_mutexattr_t * attr );i
阅读全文
摘要:http://www.cnblogs.com/hoys/archive/2012/08/19/2646377.html #include <signal.h> typedef void (*sighandler_t)(int);sighandler_t signal(int signum, sigh
阅读全文
摘要:http://blog.csdn.net/ljianhui/article/details/10287879 #include <sys/type.h>#include <sys/ipc.h>#include <sys/msg.h>int msgget(key_t key, int flag);in
阅读全文
摘要:1-34号错误号是在内核源码的include/asm-generic/errno-base.h定义35-132则是在include/asm-generic/errno.h中定义 #define EPERM 1 /* Operation not permitted*/ #define ENOENT 2
阅读全文
摘要:我们运行如下命令,可看到Linux支持的信号列表: 列表中,编号为1 ~ 31的信号为传统UNIX支持的信号,是不可靠信号(非实时的),编号为32 ~ 63的信号是后来扩充的,称做可靠信号(实时信号)。不可靠信号和可靠信号的区别在于前者不支持排队,可能会造成信号丢失,而后者不会。 下面我们对编号小于
阅读全文
摘要:瀑布开发 瀑布模型(Waterfall Model)是Royce在1970年提出的,他把大型软件开发分为:分析与编程,象工厂流水线一样把软件开发过程分成各种工序,并且每个工序可以根据软件产品的规模、参与人员的多少进一步细分成更细的工序。该模型非常符合软件工程学的分层设计思路,所以成为软件开发企业使用
阅读全文
摘要:进程间通信: # 管道( pipe ):管道是一种半双工的通信方式,数据只能单向流动,而且只能在具有亲缘关系的进程间使用。进程的亲缘关系通常是指父子进程关系。# 命名管道 (named pipe/FIFO) : 命名管道也是半双工的通信方式,但是它允许无亲缘关系进程间的通信。# 信号量( semop
阅读全文
摘要:#include #include #include #include #include #include #include #include #include /* int shm_open(const char *name, int oflag, mode_t mode); //创建或打开一个共享内存,成功返回一个整数的文件描述符,错误返回-1。 name : 共享内...
阅读全文
摘要:参考文档:http://blog.csdn.net/evsqiezi/article/details/8061176头文件:#include<semaphore.h> int sem_init __P ((sem_t *__sem, int __pshared, unsigned int __val
阅读全文
摘要:int pthread_create((pthread_t *thread, pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)若线程创建成功,则返回0。若线程创建失败,则返回出错编号,并且*thread中的内容是未定义的
阅读全文
摘要:1,接口定义就是功能抽象(找共同点)的过程,明确接口的适用范围,功能定义和使用约束。 举个例子:flash_read(int chip, int addr, int len, char *data) chip是flash芯片的编号,多芯片要求统一编码(不可重复),无论flash类型。 addr和le
阅读全文
摘要:《敏捷软件开发:原则、模式与实践.pdf》定义了面向对象设计的5个基本原则: 单一职责原则(Single-Resposibility Principle) 其核心思想为:一个类,最好只做一件事,只有一个引起它的变化。单一职责原则可以看做是低耦合、高内聚在面向对象原则上的引申,将职责定义为引起变化的原
阅读全文
摘要:step1:通过依赖倒置实现单向依赖 A依赖于B,胜过A/B互相依赖。 step2: 层次化 & 胶水层 A1,A2依赖于B,A1依赖于A2。重构为A1/A2依赖于B,A1/A2互不依赖,即分层。 A/B/C互相依赖,增加胶水层D,A/B/C依赖于D,D作为代理模块,A/B/C互不依赖。 step3
阅读全文
摘要:http://www.open-open.com/doc/view/ceee1d75382f4bbc93c8a8a2a98b4e52 Characteristics of a Good API • Easy to learn • Easy to use, even without documenta
阅读全文
摘要:https://en.wikipedia.org/wiki/Coupling_(computer_programming) In software engineering, coupling is the degree of interdependence between software modu
阅读全文

浙公网安备 33010602011771号