Linux 2.6Äں˵ÄÐÂËø»úÖÆ RCU
http://www.ibm.com/developerworks/cn/linux/l-rcu/
º¯ÊýÕªÒª£º
C´úÂë
/*¶ÁÕßÔÚ¶ÁÈ¡ÓÉRCU±£»¤µÄ¹²ÏíÊý¾ÝʱʹÓøú¯Êý±ê¼ÇËü½øÈë¶Á¶ËÁÙ½çÇø¡£*/
rcu_read_lock()
/*
¸Ãº¯ÊýÓërcu_read_lockÅä¶ÔʹÓã¬ÓÃÒÔ±ê¼Ç¶ÁÕßÍ˳ö¶Á¶ËÁÙ½çÇø¡£¼ÐÔÚÕâÁ½¸öº¯ÊýÖ®¼äµÄ´úÂëÇø³ÆΪ"¶Á¶ËÁÙ½çÇø"(read-side critical section)¡£¶Á¶ËÁÙ½çÇø¿ÉÒÔǶÌ×£¬Èçͼ3£¬ÁÙ½çÇø2±»Ç¶Ì×ÔÚÁÙ½çÇø1ÄÚ¡£
*/
rcu_read_unlock()
/*
¸Ãº¯ÊýÓÉRCUд¶Ëµ÷Óã¬Ëü½«×èÈûдÕߣ¬Ö±µ½¾¹ýgrace periodºó£¬¼´ËùÓеĶÁÕßÒѾÍê³É¶Á¶ËÁÙ½çÇø£¬Ð´Õ߲ſÉÒÔ¼ÌÐøÏÂÒ»²½²Ù×÷¡£Èç¹ûÓжà¸öRCUд¶Ëµ÷Óøú¯Êý£¬ËûÃǽ«ÔÚÒ»¸ögrace periodÖ®ºóÈ«²¿±»»½ÐÑ¡£
*/
synchronize_rcu()
/*
º¯
Êý call_rcu Ò²ÓÉ RCU д¶Ëµ÷Óã¬Ëü²»»áʹдÕß×èÈû£¬Òò¶ø¿ÉÒÔÔÚÖжÏÉÏÏÂÎÄ»ò softirq ʹÓ㬶ø
synchronize_rcu¡¢synchronize_kernel ºÍsynchronize_shced
Ö»ÄÜÔÚ½ø³ÌÉÏÏÂÎÄʹÓ᣸ú¯Êý½«°Ñº¯Êý func ¹Ò½Óµ½ RCU»Øµ÷º¯ÊýÁ´ÉÏ£¬È»ºóÁ¢¼´·µ»Ø¡£Ò»µ©ËùÓÐµÄ CPU
¶¼ÒѾÍê³É¶ËÁÙ½çÇø²Ù×÷£¬¸Ãº¯Êý½«±»µ÷ÓÃÀ´ÊÍ·Åɾ³ýµÄ½«¾ø²»ÔÚ±»Ó¦ÓõÄÊý¾Ý¡£²ÎÊý head ÓÃÓڼǼ»Øµ÷º¯Êý func£¬Ò»°ã¸Ã½á¹¹»á×÷Ϊ±» RCU
±£»¤µÄÊý¾Ý½á¹¹µÄÒ»¸ö×ֶΣ¬ÒÔ±ãÊ¡È¥µ¥¶ÀΪ¸Ã½á¹¹·ÖÅäÄÚ´æµÄ²Ù×÷¡£ÐèÒªÖ¸³öµÄÊÇ£¬º¯Êý synchronize_rcu
µÄʵÏÖʵ¼ÊÉÏʹÓú¯Êýcall_rcu¡£
*/
void fastcall call_rcu(struct rcu_head *head,
void (*func)(struct rcu_head *rcu))
/*
д¶Ëµ÷Ó㬰ÑÒ»¸öÖ¸Õëp¸³ÎªÖ¸Õëv¡£
*/
rcu_assign_pointer()
typeof(p) rcu_assign_pointer(p, typeof(p) v);
/*
»ñµÃÖ¸ÕëpµÄ½âÒýÓÃÖµ
*/
rcu_dereference()
typeof(p) rcu_assign_pointer(p, typeof(p) v);
http://group.ednchina.com/1036/21283.aspx
http://blog.chinaunix.net/u1/51562/showart_1341707.html
http://www.360doc.com/content/10/0106/17/701200_12820595.shtml
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
×î½ü£¬ÎÒÔÚѧϰLinux£¬ÏÂÃæÊÇһЩ±Ê¼Ç¡£
ʹÓõçÄÔµÄʱºò£¬¾³£ÐèÒª²éÕÒÎļþ¡£
ÔÚLinuxÖУ¬Óкܶ෽·¨¿ÉÒÔ×öµ½ÕâÒ»µã¡£¹úÍâÍøÕ¾LinuxHaxor×ܽáÁËÎåÌõÃüÁÄã¿ÉÒÔ¿´¿´×Ô¼ºÖªµÀ¼¸Ìõ¡£´ó¶àÊý³ÌÐòÔ±£¬¿ÉÄܾ³£Ê¹ÓÃÆäÖеÄ2µ½3Ìõ£¬¶ÔÕâ5ÌõÃüÁºÜÊìϤµÄÈËÓ¦¸ÃÊDz»¶àµÄ¡£
1. find
findÊÇ×î³£¼ûºÍ×îÇ¿´óµÄ²éÕÒÃüÁÄã¿ÉÒÔÓà ......
ÔÎĵØÖ·£ºhttp://www.ibm.com/developerworks/cn/linux/l-cn-cmake/index.html
±¾ÎĽéÉÜÁËÒ»¸ö¿çƽ̨µÄ×Ô¶¯»¯¹¹½¨ÏµÍ³ CMake ÔÚ linux ÉϵÄʹÓ÷½·¨¡£ CMake ÊÇÒ»¸ö±È automake ¸ü¼ÓÈÝÒ×ʹÓõŤ¾ß£¬Äܹ»Ê¹³ÌÐòÔ±´Ó¸´ÔӵıàÒëÁ¬½Ó¹ý³ÌÖнâÍѳöÀ´¡£ÎÄÖÐͨ¹ýһЩÀý×Ó½éÉÜʹÓà CMake ´¦Àí¶àÔ´ÎļþĿ¼µÄ·½·¨¡¢²éÕÒ²¢Ê¹ÓÃÆäËû ......