Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux¼üÅÌÇý¶¯·¶Àý

¼üÅÌÔÚËùÓеÄÇý¶¯Ö®ÖÐ×îΪ¼òµ¥µÄÒ»ÖÖ£¬µ«ËüÈ´°üº¬ÁËÇý¶¯µÄ»ù±¾¿ò¼Ü£¬¶ÔÒÔºó¼ÌÐøÉîÈëѧϰÆäËû¸´ÔÓµÄÇý¶¯´óÓÐñÔÒ棬ÒÔϱãΪÄãÖð²½ÆÊÎöÇý¶¯µÄ¿ª·¢¡£²ÉÓõÄÊDzéѯ·½Ê½¡£×ªÔØÇë×¢Ã÷³ö´¦£ºqiangren.blog.edu.cn 
Ò».ÄÚºËÄ£¿éµÄ×¢²áºÍ³·Ïú
ÔÚ¼ÓÔØÄ£¿éµÄʱºò£¬Ê×ÏÈÔËÐеÄÊÇÄÚºËÄ£¿éµÄ×¢²áº¯Êý¡£ËüµÄ¹¦ÄÜ°üÀ¨ÄÚºË×¢²áÉ豸ÒÔ¼°±äÁ¿µÄ³õʼ»¯¡£
static int head,tail;
int  _init Keypad_init(void)
{
     int result;
     result=register_chrdev(KEY_LED_MAJOR,KEY_LED_NAME,&Keypad_fops);
     Keypad_clear();
     init_waitqueue_head(&queue);
     prink("%s %s initialized.\n",KEY_LED_NAME,KEY_LED_VERSION);//²»ÄÜÓÃprinf
     return 0;
}
module_init(Keypad_init);//¼ÓÔØÄ£¿é
void _exit Keypad_cleanup(void)
{
     del_timer(&timer);
     unregister_chrdev(KEY_LED_MAJOR,KEY_LED_NAME);
     prink("Keypad driver removed \n");
}
module_exit(Keypad_cleanup);//жÔظÃÄ£¿é
¶þ.ÐéÄâÎļþϵͳÓëÓ²¼þÇý¶¯µÄ½Ó¿Ú
static struct file_operations Keypad_fops={
open:Keypad_open,
read:Keypad_read,
poll:Keypad_poll,
fasync:Keypad_fasync,
release:Keypad_release,
};
¸Ã½Ó¿Ú¶¨ÒåÍêÖ®ºóһЩ±ãÊǶÔÕ⼸¸ö¾ßÌ庯ÊýµÄʵÏÖÁË£¡ÏÖÔÚÎÒÃÇÒ»Æð½øÈëÏÂÒ»²½°É£¬ÊDz»ÊǾõµÃÆäʵûʲôÄѶȵÄÄØ£¿±ðÄÇôÔ翪ÐÄ×ÅÄØ£¿Õ⼸¸öº¯ÊýµÄʵÏÖʱºò£¬Éæ¼°µ½ºÜ¶à¼¼Êõ£¬°üÀ¨Äں˶¨Ê±Æ÷£¬*µÈ´ý¶ÓÁеľßÌåʵÏÖ£¨×èÈû·½Ê½£©£¬Òì²½·½Ê½µÄ¾ßÌåʵÏÖ¼¼ÇÉ£¬Ñ­»·¶ÓÁС£¿´µ½Õâô¶à¼¼ÊõÄãÊÇ·ñ¸Ðµ½ºÜÐË·ÜÄØ£¿ÒÔϱ¾È˽«ÒÔͨË׵ķ½Ê½ÎªÄã½²½â£¬Ï£ÍûÄãÄÜÀí½â¡£
Èý.É豸µÄ´ò¿ª²Ù×÷½Ó¿Úº¯Êý¾ßÌåʵÏÖ£¨Keypad_open)
É豸´ò¿ªÒ»°ã°üÀ¨Á½´ó²Ù×÷£¬Ò»ÊÇÍê³ÉÉ豸µÄ³õʼ»¯£¬¶þÊÇÉ豸ÒýÓüÆÊýÆ÷¼Ó1
static int Keypad_open(struct inode *inode,struct file *filp)
{
     read_xy();
     try_module_get(THIS_MODULE);//´Ëº¯ÊýΪLinux 2.6ÄÚºËÔö¼ÓµÄ£¬²»Í¬ÓÚ2.4Äںˣ¬¹¦ÄÜÊǼÆÊýÆ÷µÄÖµ¼Ó1
     return 0;
}
static void read_xy(void)
{
  &nbs


Ïà¹ØÎĵµ£º

[¸ßÐÔÄܼ¼Êõ] Linux2.6ÄÚºËepoll½éÉÜ(0.1°æ±¾)

[¸ßÐÔÄܼ¼Êõ] Linux2.6ÄÚºËepoll½éÉÜ(0.1°æ±¾)
ת×Ô£º http://mechgouki.blogdriver.com/mechgouki/601157.html
[×÷Õß]£ºëøêÅ,2005/3/30,0.1°æ±¾
[°æȨÉùÃ÷]£º´ËÎĵµ×ñÑ­GNU×ÔÓÉÎĵµÐí¿ÉÖ¤(GNU Free Documentation License).ÈκÎÈË¿ÉÒÔ×ÔÓɸ´ÖÆ,·Ö·¢,ÐÞ¸Ä,²»¹ýÈç¹û·½±ã,Çë×¢Ã÷³ö´¦ºÍ×÷Õß:)
(1)µ¼ÑÔ£º
Ê×ÏÈ£¬ÎÒÇ¿ÁÒ½¨Òé ......

linux D Bus tutorial

http://dbus.freedesktop.org/doc/dbus-tutorial.html
D-Bus Tutorial
Havoc
Pennington
Red Hat, Inc.
<hp@pobox.com
>
David
Wheeler
John
Palmieri
Red Hat, Inc.
<johnp@redhat.com
>
Colin
Walters
Red Hat, Inc.
<walters@redhat.com
>
Version 0.5.0
Table of Contents
......

LinuxÖеŤ×÷¶ÓÁÐ (2.6.0~2.6.19 and 2.6.20 ~ now)

http://blog.chinaunix.net/u2/69889/showart_971040.html
LinuxÖеŤ×÷¶ÓÁÐ
£ÛÇ°¼Ç£ÝLinux×Ô´Ó2.6.20Ö®ºó£¬¹¤×÷¶ÓÁз¢ÉúÁËһЩ±ä»¯£¬Ä¿Ç°´ÓÍøÂçÉÏËÑË÷µÄ×ÊÁÏÒ»°ã¶¼ÊǽéÉÜÀÏ°æ±¾µÄ¹¤×÷¶ÓÁУ¬ºÜÉÙ¼ûµ½¶Ôа汾µÄ½éÉÜ¡£±¾ÎĶÔÐÂÀÏ°æ±¾¶¼×öÁ˼òÒª¸ÅÊö£¬²¢·Ö±ðÌṩÁ˼òµ¥µÄʵ×÷°¸Àý¡£
********************************** ......

linux ÐźŴ¦Àí µÄѧϰ

      linuxϵͳÖжÔÐźŵĴ¦ÀíÖ÷ÒªÊÇsignal ºÍsigactionº¯ÊýÀ´Íê³É£¬pauseÓÃÀ´ÏìÓ¦ÈκÎÐźţ¬µ«²»×öÈκδ¦Àí¡£
      1¡£signalº¯Êý
¸Ãº¯ÊýÓÃÀ´ÉèÖýø³ÌÔÚ½Óµ½ÐźŵĶ¯×÷¡£¿ÉÒÔ man signal²é¿´¾ßÌåÓ÷¨£¬ÏÖÔÚ¶ÔÆäÓ÷¨ÑÝʾ£¬
SIGKILL SIGSTOPÊDz»Äܱ»²¶×½ºÍºöÂÔµÄÐź ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ