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,可以仔细的研究一下!)
键盘驱动将检 ......
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下扩展硬盘(一)
(2009-09-26 19:15:12)
标签:it
四、fdisk 对硬盘及分区的操作,进入fdisk 对硬盘操作阶段
我们可以对硬盘进行分区操作,前提是您把fdisk -l 弄明白了;通过fdisk -l
,我们能找出机器中所有硬盘个数及设备名称;比如上面的例子,我们会看到两个设备一个是/dev/hda ,另一 ......
编译和连接程序
MySQL中有一个特殊的脚本,叫做mysql_config. 它会为你编译MySQL客户端,并连接到MySQL服务器提供有用的信息.你需要使用下面两个选项.
1. --libs 选项 - 连接MySQL客户端函数库所需要的库和选项.
$ mysql_config --libs
2. --cflags 选项 - 使用必要的include文件的选项等等.
......