LinuxµÄInput Device
Linux µÄ Input Device ÊÇÖØÒªµÄÒ»個 subsystem£¬ÔÚ進ÐÐ實Àý½é紹Ç°£¬ÏÈ´óÂÔÁ˽âÒ»ÏÂÏà關µÄ API¡£input.cÊÇLinuxµÄÊäÈë驅動³Ìʽ£¬Ö÷ÒªÖ§Ô®鍵盤與»¬ÊóµÄ輸È룻input.c½éÃæÌØÊâµÄµØ·½ÊÇ採ÓÃÁËʼþ£¨event£©µÄ·½Ê½來處Àí輸È룬ÒÔÏÂÊÇinput.c½éÃæÖØÒªµÄ資ÁÏ結構與º¯數£º
* struct input_dev
* void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
* void input_register_device(struct input_dev *);
* void input_unregister_device(struct input_dev *);
* void input_register_handler(struct input_handler *);
* void input_unregister_handler(struct input_handler *);
£¨1£© struct input_devÊÇÓÃ來ÃèÊö輸ÈëʼþµÄÖØÒª資ÁÏ結構£¬ÆäÔÐÍÈçÏ£º
struct input_dev {
const char *name;
const char *phys;
const char *uniq;
struct input_id id;
unsigned long evbit[BITS_TO_LONGS(EV_CNT)];
unsigned long keybit[BITS_TO_LONGS(KEY_CNT)];
unsigned long relbit[BITS_TO_LONGS(REL_CNT)];
unsigned long absbit[BITS_TO_LONGS(ABS_CNT)];
unsigned long mscbit[BITS_TO_LONGS(MSC_CNT)];
unsigned long ledbit[BITS_TO_LONGS(LED_CNT)];
unsigned long sndbit[BITS_TO_LONGS(SND_CNT)];
unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];
unsigned long swbit[BITS_TO_LONGS(SW_CNT)];
unsigned int keycodemax;
unsigned int keycodesize;
void *keycode;
int (*setkeycode)(struct input_dev *dev, int scancode, int keycode);
int (*getkeycode)(struct input_dev *dev, int scancode, int *keycode);
struct ff_device *ff;
unsigned int repeat_key;
struct timer_list timer;
int sync;
int abs[ABS_MAX + 1];
int rep[REP_MAX + 1];
unsigned long key[BITS_TO_LONGS(KEY_CNT)];
unsigned long led[BITS_TO_LONGS(LED_CNT)];
unsigned long snd[BITS_TO_LONGS(SND_CNT)];
unsign
Ïà¹ØÎĵµ£º
ÎÞÂÛʲô±à³ÌÓïÑÔ¶¼Àë²»¿ªÌõ¼þÅжϡ£SHELLÒ²²»ÀýÍâ¡£
if list then
do something here
elif list then
do another thing here
......
UNIXÊÇÀúÊ·×îÓƾõÄͨÓòÙ×÷ϵͳ¡£1969Ä꣬ÃÀ¹ú±´¶ûʵÑéÊÒµÄK.ThompsonºÍD.M.RitchieÔÚ¹æÄ£½ÏС¼°½Ï¼òµ¥µÄ·Öʱ²Ù×÷ϵͳMULTICSµÄ»ù´¡ÉÏ¿ª·¢³öUNIX, µ±Ê±ÊÇÔÚDECµÄPDP—7СÐͼÆËã»úÉÏʵÏֵģ¬1970ÄêÕýʽͶÈëÔËÐС£´ËºóÊýÄ꣬UNIXÒ»Ö±ÊÇÒ»¸öÏÞÓÚÔÚAT&TÄÚ²¿Ê¹ÓõIJÙ×÷ϵͳ¡£1971Ä꣬·¢Õ¹³öÒÔ PDP- ......
http://linux.chinaunix.net/bbs/archiver/tid-985372.html
Linux Kernel: ¼ò½éHZ, tick and jiffie
Linux[/b]ºËÐÄ幾個ÖØÒª¸ú時間ÓÐ關µÄÃû詞»ò變數£¬µ×ÏÂ將½é紹HZ[/b]¡¢tick與jiffies¡£
......
ÊØ»¤½ø³ÌÒ²³ÆΪ¾«Áé½ø³Ì£¬ÊÇÒ»ÖÖÔËÐÐÔÚºǫ́µÄÌØÊâ½ø³Ì£¬Ëü²»´æÔÚ¿ØÖÆÖնˣ¬²¢ÖÜÆÚÐÔµØÖ´ÐÐijÏîÈÎÎñ»òµÈ´ý´¦ÀíijÏîÈÎÎñ¡£
ÊØ»¤½ø³ÌÌص㣺
l ËùÓеÄÊØ»¤½ø³Ì¶¼ÊÇÒÔ³¬¼¶Óû§Æô¶¯µÄ(UIDΪ0)£»
l ûÓпØÖÆÖÕ¶Ë(TTYΪ£¿)£»
l Öն˽ø³Ì×éIDΪ-1(TPGID±íʾÖն˽ø³Ì×éID£¬¸ÃÖµ±íʾÓë¿ØÖÆÖÕ¶ËÏà¹ØµÄǰ̨½ø³Ì×é£ ......
µÚÒ»´ÎÔÚLinuxÉÏ°²×°OracleµÄʱºòÅöµ½Õâ¸öÎÊÌ⣬ºÇºÇ¡£Ö®Ç°ÔÚLinuxÉÏ°²×°Oracleʱ£¬Ò»°ã¶¼Ê¹ÓÃRedHatϵÁеÄLinux£¬ÔÚ°²×°¹ý³ÌÖУ¬ÐèÒª×ö´óÁ¿µÄ°²×°Ç°Öù¤×÷£¬Èç°²×°RPM°ü£¬´´½¨×éºÍÓû§£¬ÐÞ¸ÄÄں˲ÎÊý£¬Ð޸Ļ·¾³±äÁ¿µÈ¡£Õâ´ÎʹÓõÄÊÇRedFlagµÄAsianux 3£¬¶øÇÒ×Ô´øOracleµÄ°²×°¸¨Öú¹¤¾ßOrana ......