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

linuxÖеÄlist

LinuxÄÚºËÌṩÁËlistÕâ¸öÊý¾Ý½á¹¹ÒÔ¼°²Ù×÷º¯Êý¡£Õâ¸öÊý¾Ý½á¹¹ÔÚÄÚºËÇý¶¯ÖÐʹÓù㷺£¬¶øÇÒȷʵ·½±ãʹÓá£ÎªÁËÏêϸÁ˽âÕâ¸öÊý¾Ý½á¹¹µÄÓ÷¨£¬·½±ãÒÔºóʹÓ㬰ÑÕâ¸öÊý¾Ý½á¹¹ÀïÃæµÄ¹¦Äܶ¼ÊÔÓÃÁËÒ»´Î£¬Çå³þÁ˺ܶࡣÏÂÃæÊÇʵÑé³ÌÐòºÍ×Ô¼ºµÃ³öµÄʹÓ÷½·¨£¬Çë¸ßÊÖ¶à¶àÖ¸½Ì¡£ Struct list_head { struct list_head *next, *prev ;}£» List½á¹¹Êµ¼ÊÉÏÊÇÒ»¸ölist_head½á¹¹¹¹³ÉµÄÁ´±í¡£Èç¹ûÏëʹÓÃÕâ¸ö½á¹¹À´¹¹Ôì×Ô¼ºµÄÁ´±í£¬Ö»Òª°ÑÕâ¸östruct list_head½á¹¹Ç¶Èëµ½×Ô¼ºµÄ½á¹¹ÌåÖУ¬³ÉΪ×Ô¼º½á¹¹ÌåµÄÒ»¸ö³ÉÔ±¼´¿É¡£Õû¸ölist.hÎļþµÄº¯Êý¶¼Ê¹ÓÃÕâ¸ö½á¹¹¹¹³ÉÒ»¸öÁ´±í£¬¶ø×Ô¼ºµÄ½á¹¹Ìå³ÉԱʵ¼Ê²¢²»ÔÚÁ´±íÉÏ£¬µ«ÊÇlist.hÖÐʹÓÃcontainer_ofÕâ¸öºê¿ÉÒÔͨ¹ý½á¹¹ÌåÖеÄstruct list_head³ÉÔ±µÄµØÖ·À´µÃµ½Õû¸ö½á¹¹ÌåµÄµØÖ·£¬ÕâÑù¾Í¿ÉÒÔʵÏÖʹÓÃlist.hÎļþÖеĶ¨ÒåʵÏÖ×Ô¼ºµÄÁ´±í¹¹ÔìÁË¡£ list.hÌṩµÄº¯Êý¹¹ÔìµÄÁ´±íÊÇÓÐÒ»¸ö¿ÕÍ·½ÚµãµÄ¡£ Èç¹ûÔÚÓû§³ÌÐòÖÐʹÓÃÕâ¸ö½á¹¹µÄ»°£¬ÐèÒª¶ÔÕâ¸öÎļþ×öһЩ¸Ä¶¯¡£Ö÷ÒªÊÇÕÒ²»µ½ÈçºÎ½«Õâ¸öÍ·ÎļþÖ±½Ó°²×°µ½/usr/includeĿ¼Ï£¬Ö»ºÃÖ±½Ó¿½±´¡£µ«ÊÇÕâ¸öÍ·ÎļþÖÐͬʱ°üº¬ÁËÁíÍâµÄÁ½¸öÌåϵÏà¹ØµÄÍ·Îļþ£¬Ò»¸öÊÇprefetch.hÎļþ£¬Õâ¸öÎļþÌṩperfetchÕâ¸öº¯ÊýÓÃÀ´Õë¶ÔÌض¨µÄCPUÌåϵ×öÓÅ»¯£»ÁíÒ»¸öÊÇasm/system.hÕâÁ½¸öÎļþÎÞ·¨Ìṩ£¬Ö»Äܲ»¿½±´£¬½«list.hÖÐʹÓõ½ÕâÁ½¸öÎļþµÄ²¿·ÖÖ±½Ó¿½±´µ½list.hÎļþÖС£Ö÷ÒªÊÇcontainer_ofºê£¨Õâ¸öÔÚkernel.hÖУ»ÁíÍâÐèÒª½«ËùÓеÄprefetch×¢Ê͵ô£¬·ñÔòÎÞ·¨Á´½Óͨ¹ý¡£ LIST_HEAD(name):Õâ¸öºê¿ÉÒÔ¶¨ÒåÒ»¸östruct list_head½á¹¹Ì壬²¢³õʼ»¯½á¹¹ÌåÖеÄÁ½¸ö³ÉÔ±º¯Êý LIST_INIT_HEAD( struct list_head *head) ;Õâ¸öº¯Êý³õʼ»¯¸ø¶¨µÄ½á¹¹Ì壬ʹµÄ³ÉÔ±Ö¸Ïò×Ô¼º£» List_add ( struct list_head *new , struct list_head *list );newÊÇÒªÌí¼Óµ½listÁ´±íÖеĽڵ㣻listÊÇÒªÌí¼Óµ½µÄÁ´±íÖеÄÒ»¸ö½Úµã£¬newÕâ¸ö½Úµã»áÌí¼Óµ½Õâ¸ö½ÚµãºóÃæ¡£Èç¹ûÌṩµÄlistÊÇÒ»¸öÁ´±íµÄÍ·½Úµã£¬ÄÇôÕâ¸öº¯ÊýÓÃÀ´Ä£ÄâÒ»¸öLIFOµÄÕ»ÊDz»´íµÄ¡£ list_add_tail( struct list_head *new , struct list_head *list );ºÍÉÏÃæµÄº¯ÊýÒ»Ñù£¬Ö»²»¹ýÊÇnewµÄλÖÃÔÚlistµÄÇ°Ãæ¡£Èç¹ûÌṩµÄlistÊÇÒ»¸öÁ´±íµÄÍ·½Úµã£¬ÄÇô¾ÍÊÇÒ»¸öFIFOµÄ¶ÓÁС£ list_del (struct list_head *entry , struct list_head *list );´ÓÁ´±íÖÐɾ³ýentry½Úµã£¬²¢½«entry½ÚµãµÄ³ÉÔ±Ö¸ÕëÖ¸ÏòÎÞЧµØÖ·¡£ list_replace(struct list_head * new , struct list_head *old);ÓýÚ


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

ÔÚlinuxµÄPCÉϹÒÔØjffs2¸ùÎļþϵͳӳÏñ

ÎÒÃÇÔÚµ÷ÊÔÓ²¼þ°åʱ£¬¾­³£ÐèÒª×ö¶à¸öjffs2µÄ¸ùÎļþϵͳӳÏñ£¬ÓÐʱҲҪ¶Ô±ÈÆäËû;¾¶µÃµ½µÄ¿ÉÓõÄjffs2¸ùÎļþϵͳӳÏñ¡£µ«jffs2µÄÎļþϵͳӳÏñ²»Ïó¹âÅ̵ÄÓ³ÏñÎļþÒ»Ñù¿ÉÒÔͨ¹ýloopÉ豸À´¹ÒÔØ£¬×ܲ»¿ÉÄÜÒ»¸ö¸öÉÕ¼µ½Ó²¼þ°åÈ¥¿´°É¡£ ºóÀ´µ½ÍøÉÏgoogleÁËÒ»°Ñ£¬×ó·­ÓÒ·­Ö®ºó×ÜËãÕÒµ½ÁËÒ»¸ö·½·¨¡£ÒòΪjffs2Êǹ¹½¨ÓÚMTDÉ豸ÉϵÄÎļ ......

Linux ÖØÆôÃüÁî

----Linux ÖØÆôÃüÁî----
 
1¡¢shutdown
2¡¢poweroff
3¡¢init
4¡¢reboot
5¡¢halt
 
 
*---¾ßÌå˵Ã÷---
 
shutdown
reboot
ÔÚlinuxÏÂһЩ³£ÓõĹػú/ÖØÆôÃüÁîÓÐshutdown¡¢halt¡¢reboot¡¢¼°init£¬ËüÃǶ¼¿ÉÒÔ´ïµ½ÖØÆôϵͳµÄÄ¿µÄ£¬µ«Ã¿¸öÃüÁîµÄÄÚ²¿
¹¤×÷¹ý³ÌÊDz»Í¬µÄ£¬Í¨¹ý±¾ÎĵĽéÉÜ£¬Ï£ÍûÄã ......

linuxµ÷Õûϵͳʱ¼ä ÓÀ¾Ã z



    ²Î¿¼×ÊÁÏÒ»¡¢linuxµ÷ÕûϵͳʱÇø/ʱ¼äµÄ·½·¨(tzselectÃüÁî)

1) ÕÒµ½ÏàÓ¦µÄʱÇøÎļþ /usr/share/zoneinfo/Asia/Shanghai

ÓÃÕâ¸öÎļþÌæ»»µ±Ç°µÄ/etc/localtimeÎļþ¡£

2) ÐÞ¸Ä/etc/sysconfig/clockÎļþ£¬ÐÞ¸ÄΪ£º

ZONE="Asia/Shanghai"
[color=red]UTC=true[/color]
ARC=false ......

LinuxϵÄDhcp°²×°(·þÎñÆ÷ÃûDHcpd)

 
Ò» °²×°DHCP·þÎñÆ÷
1.ÏȲ鿴ϵͳÊÇ·ñ°²×°DHcp
#rpm -qa|grep dhcp
2.°²×°RPM°ü,Èç¹ûÊÇRea Hat LInux9°²×°°üÔÚµÚ¶þÕ¹âÅÌ,¹ÒÔÚÁ˹âÇýºó¿ÉÓòéÕÒÃüÁîÕÒDHCP°ü
#find /mnt/cdrom/ -name "dhcp"
3.²é¿´findÃüÁîËѳöÀ´µÄÎļþ·¾¶½øÐа²×°
#rpm -ivh/mnt/cdrom/RedHat/RPMS/dhcp*/dhcpd*(¸ù¾Ý×Ô¼ºÊµ¼ÊÎļþ·¾¶)
4. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ