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

Linux RCU»úÖÆÏê½â

Ô­ÎÄÍøÖ·£ºhttp://blog.chinaunix.net/u1/51562/showart_1341707.html
 
Ò»:Ç°ÑÔ
RCU»úÖƳöÏֵıȽÏÔç,Ö»ÊÇÔÚlinux kernelÖÐÒ»Ö±µ½2.5°æ±¾µÄʱºò²Å±»²ÉÓÃ.¹ØÓÚRCU»úÖÆ,ÕâÀï¾Í²»×ö¹ý¶àµÄ½éÉÜÁË,ÍøÉÏÓкܶàÓйØRCU½éÉܺÍʹÓõÄÎĵµ.Çë×ÔÐвéÔÄ.±¾ÎÄÖ÷ÒªÊÇ´Ólinux kernelÔ´´úÂëµÄ½Ç¶È.À´·ÖÎöRCUµÄʵÏÖ.
ÔÚÌÖÂÛRCUµÄʵÏÖ֮ǰ.ÓбØÒªÖØÉêÒÔϼ¸µã:
1:RCUʹÓÃÔÚ¶ÁÕ߶à¶øдÕßÉÙµÄÇé¿ö.RCUºÍ¶ÁдËøÏàËÆ.µ«RCUµÄ¶ÁÕßÕ¼ËøûÓÐÈκεÄϵͳ¿ªÏú.дÕßÓëддÕßÖ®¼ä±ØÐëÒª±£³Öͬ²½,ÇÒдÕß±ØÐëÒªµÈËü֮ǰµÄ¶ÁÕßÈ«²¿¶¼Í˳öÖ®ºó²ÅÄÜÊÍ·Å֮ǰµÄ×ÊÔ´.
2:RCU±£»¤µÄÊÇÖ¸Õë.ÕâÒ»µãÓÈÆäÖØÒª.ÒòΪָÕ븳ֵÊÇÒ»Ìõµ¥Ö¸Áî.Ò²¾ÍÊÇ˵ÊÇÒ»¸öÔ­×Ó²Ù×÷.ÒòËü¸ü¸ÄÖ¸ÕëÖ¸Ïòû±ØÒª¿¼ÂÇËüµÄͬ²½.Ö»ÐèÒª¿¼ÂÇcacheµÄÓ°Ïì.
3:¶ÁÕßÊÇ¿ÉÒÔǶÌ×µÄ.Ò²¾ÍÊÇ˵rcu_read_lock()¿ÉÒÔǶÌ×µ÷ÓÃ.
4:¶ÁÕßÔÚ³ÖÓÐrcu_read_lock()µÄʱºò,²»ÄÜ·¢Éú½ø³ÌÉÏÏÂÎÄÇл».·ñÔò,ÒòΪдÕßÐèÒªÒªµÈ´ý¶ÁÕßÍê³É,дÕß½ø³ÌÒ²»áÒ»Ö±±»×èÈû.
ÒÔϵĴúÂëÊÇ»ùÓÚlinux kernel 2.6.26
¶þ:ʹÓÃRCUµÄʵÀý
Linux kernelÖÐ×Ô¼º¸½´øÓÐÏêϸµÄÎĵµÀ´½éÉÜRCU,ÕâЩÎĵµÎ»ÓÚlinux-2.6.26.3/Documentation/RCU. ÕâЩÎĵµÖµµÃ¶à»¨µãʱ¼äÈ¥×ÐϸÑжÁÒ»ÏÂ.
ÏÂÃæÒÔwhatisRCU.txtÖеÄÀý×Ó×÷Ϊ½ñÌì·ÖÎöµÄÆðµã:
struct foo {
        int a;
        char b;
        long c;
};
DEFINE_SPINLOCK(foo_mutex);
 
struct foo *gbl_foo;
void foo_update_a(int new_a)
{
        struct foo *new_fp;
        struct foo *old_fp;
 
        new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
        spin_lock(&foo_mutex);
        old_fp = gbl_foo;
        *new_fp = *old_fp;
        new_fp->a = new_a;
        rcu_assign_pointer(gbl_foo, new_fp);
        spin_unlock(&foo_mutex);
        sync


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

Linux »·¾³½ø³Ì¼äͨÐÅ£¨Áù£©


Linux »·¾³½ø³Ì¼äͨÐÅ£¨Áù£©
Ì×½Ó¿Ú
ÎĵµÑ¡Ïî
<tr
valign="top"><td width="8"><img alt="" height="1" width="8"
src="//www.ibm.com/i/c.gif"/></td><td width="16"><img alt="" width=" ......

ǶÈëʽlinuxϵͳÓëÓ¦ÓÃ

Emebedded System and Application(Linux)
 
Goal
--
ÕÆÎÕǶÈëʽϵͳ¿ª·¢µÄÁ÷³Ì£¬ÏµÍ³ÒÆÖ²µÄ·½·¨£¬±àдBootloader
            (Be familiar with the process of ES Developing
, System Migration
amd Bootloader Programming
)
 Requriem ......

Linux±³ºóµÄÈË

1. LinusºÍBill
ËƺõÔÚÒ»Ò¹Ö®¼ä£¬Õâ¸öÃû×ÖͻȻ±äµÃͬÏó±È¶û¡£¸Ç´ÄÒ»ÑùµÄ¶úÊìÄÜÏê¡£µ«ÊDZȶû¡£¸Ç´Ä£¬
ÄÄÅÂÉí¼ÛÓÐÊý²»Ç屶µÄ°ÙÍòÃÀ½ð£¬Ò²ÓÀÔ¶²»»á±ä³ÉLinux Torvalds¡£Õâλ29ËêµÄ·ÒÀ¼ÈË£¬
¼òµ¥¶øÇ¿´óµÄLinux²Ù×÷ϵͳµÄ´´ÔìÕߣ¬³¬Ô½Á˸ǴĵÄÉñ»°¡£Ò²Óд«ÎÅ˵¸Ç´ÄÊÇÒ»¸ö
׿ԽµÄ³ÌÐòÔ±£¬µ«LinusÊÇ»õÕæ¼ÛʵµÄ¸ßÊÖ¡£»¹ÔÚ´óѧÀï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ