linux中的信号结构体
typedef struct siginfo
{
int si_signo; /* Signal number.*/
int si_errno; /* If non-zero, an errno value associated with this signal, as defined in <errno.h>.*/
int si_code; /* Signal code*/
union
{
int _pad[__SI_PAD_SIZE];
struct /* kill().*/
{
__pid_t si_pid; /* Sending process ID.*/
__uid_t si_uid; /* Real user ID of sending process.*/
&n
相关文档:
一:前言
最近在研究android的sensor driver,主要是E-compass,其中用到了Linux input子系统.在网上也看了很多这方面的资料,感觉还是这篇分析的比较细致透彻,因此转载一下以便自己学习,同时和大家分享!
(这篇博客主要是以键盘驱动为例的,不过讲解的是Linux Input Subsystem,可以仔细的研究一下!)
键盘驱动将检 ......
一、下载
gd-2.0.33.tar.gz http://www.boutell.com/gd/
jpegsrc.v6b.tar.gz http://www.ijg.org/
libpng-1.2.7.tar.tar http://sourceforge.net/projects/libpng/
zlib-1.2.2.tar.gz http://sourceforge.net/projects/zlib/
freetype-2.1.9.tar.gz http://sourceforge.net/projects/freetype/
php-4.3.9.tar.g ......
gcc mousekey.c -lX11 -IX11
打开mousekeys运行./a.out
关闭mousekeys运行./a.out 1,这里在a.out后面随便加一个参数就可以了,因为判断条件为 if(argc < 2)
/*********source code***************/
#include <stdio.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X ......
linux的文件安装路径
2006年07月15日 星期六 上午 11:09
如果是别人发布的二进制包,可执行文件通常都安装到 /usr/bin 下面;如果是自己从源代码安装的,可执行文件通常都在 /usr/local/bin 下面,除非配置时指定了安装位置。
例如:
rpm -ivh xxx1.rpm
可执行文件通常都安装到 /usr/bin 下面
./configure (或者 ......
Linux 释放内存方法
先看看内存使用状况
[root@node1 ~]# free -m
total used free shared buffers cached
Mem: 8004 6557 1446 0 163 5630
-/+ buffers/cache: 763 7240
Swap: 1983 0 1983
把内存里的数据暂时写到硬盘里
[root@node1 ~]# sync
修改 /proc/sys/vm/drop_caches文件
[root@node1 ~]# echo 3 > ......