LinuxÄں˽â¶ÁÈëÃÅ(ת)
Õë¶ÔºÃ¶àLinux °®ºÃÕ߶ÔÄں˺ÜÓÐÐËȤȴÎÞ´ÓÏ¿ڣ¬±¾ÎÄÖ¼ÔÚ½éÉÜÒ»ÖÖ½â¶ÁlinuxÄÚºËÔ´ÂëµÄÈëÃÅ·½·¨£¬¶ø²»Êǽâ˵linux¸´ÔÓµÄÄں˻úÖÆ£» £¨²Î¿¼×ÊÁÏÀ´Ô´£º·ÉÁè http://www.witech.com.cn/£©
Ò»£®ºËÐÄÔ´³ÌÐòµÄÎļþ×éÖ¯£º
1£®LinuxºËÐÄÔ´³ÌÐòͨ³£¶¼°²×°ÔÚ/usr/src/linuxÏ£¬¶øÇÒËüÓÐÒ»¸ö·Ç³£¼òµ¥µÄ±àºÅÔ¼¶¨£ºÈκÎżÊýµÄºËÐÄ£¨ÀýÈç2.0.30£©¶¼ÊÇÒ»¸öÎȶ¨µØ·¢ÐеĺËÐÄ£¬¶øÈκÎÆæÊýµÄºËÐÄ£¨ÀýÈç2.1.42£©¶¼ÊÇÒ»¸ö¿ª·¢ÖеĺËÐÄ¡£
±¾ÎÄ»ùÓÚÎȶ¨µÄ2.2.5Ô´´úÂ룬µÚ¶þ²¿·ÖµÄʵÏÖƽ̨Ϊ Redhat Linux 6.0¡£
2£®ºËÐÄÔ´³ÌÐòµÄÎļþ°´Ê÷Ðνṹ½øÐÐ×éÖ¯£¬ÔÚÔ´³ÌÐòÊ÷µÄ×îÉϲãÄã»á¿´µ½ÕâÑùһЩĿ¼£º
¡ñArch £ºarch×ÓĿ¼°üÀ¨ÁËËùÓкÍÌåϵ½á¹¹Ïà¹ØµÄºËÐÄ´úÂë¡£ËüµÄÿһ¸ö×ÓĿ¼¶¼´ú±íÒ»ÖÖÖ§³ÖµÄÌåϵ½á¹¹£¬ÀýÈçi386¾ÍÊǹØÓÚintel cpu¼°ÓëÖ®Ïà¼æÈÝÌåϵ½á¹¹µÄ×ÓĿ¼¡£PC»úÒ»°ã¶¼»ùÓÚ´ËĿ¼£»
¡ñInclude: include×ÓĿ¼°üÀ¨±àÒëºËÐÄËùÐèÒªµÄ´ó²¿·ÖÍ·Îļþ¡£Óëƽ̨Î޹صÄÍ·ÎļþÔÚ include/linux×ÓĿ¼Ï£¬Óë intel cpuÏà¹ØµÄÍ·ÎļþÔÚinclude/asm-i386×ÓĿ¼ÏÂ,¶øinclude/scsiĿ¼ÔòÊÇÓйØscsiÉ豸µÄÍ·ÎļþĿ¼£»
¡ñInit£º Õâ¸öĿ¼°üº¬ºËÐĵijõʼ»¯´úÂë(×¢£º²»ÊÇϵͳµÄÒýµ¼´úÂë)£¬°üº¬Á½¸öÎļþmain.cºÍVersion.c£¬ÕâÊÇÑо¿ºËÐÄÈçºÎ¹¤×÷µÄÒ»¸ö·Ç³£ºÃµÄÆðµã¡£
¡ñMm £ºÕâ¸öĿ¼°üÀ¨ËùÓжÀÁ¢ÓÚ cpu Ìåϵ½á¹¹µÄÄÚ´æ¹ÜÀí´úÂ룬Èçҳʽ´æ´¢¹ÜÀíÄÚ´æµÄ·ÖÅäºÍÊͷŵȣ»¶øºÍÌåϵ½á¹¹Ïà¹ØµÄÄÚ´æ¹ÜÀí´úÂëÔòλÓÚarch/*/mm/£¬ÀýÈçarch/i386/mm/Fault.c
¡ñKernel£ºÖ÷ÒªµÄºËÐÄ´úÂ룬´ËĿ¼ÏµÄÎļþʵÏÖÁË´ó¶àÊýlinuxϵͳµÄÄں˺¯Êý£¬ÆäÖÐ×îÖØÒªµÄÎļþµ±Êôsched.c£»Í¬Ñù£¬ºÍÌåϵ½á¹¹Ïà¹ØµÄ´úÂëÔÚarch/*/kernelÖУ»
¡ñDrivers£º ·ÅÖÃϵͳËùÓеÄÉ豸Çý¶¯³ÌÐò;ÿÖÖÇý¶¯³ÌÐòÓÖ¸÷Õ¼ÓÃÒ»¸ö×ÓĿ¼£ºÈ磬/block ÏÂΪ¿éÉ豸Çý¶¯³ÌÐò£¬±ÈÈçide£¨ide.c£©¡£Èç¹ûÄãÏ£Íû²é¿´ËùÓпÉÄÜ°üº¬ÎļþϵͳµÄÉ豸ÊÇÈçºÎ³õʼ»¯µÄ£¬Äã¿ÉÒÔ¿´drivers/block/genhd.cÖеÄdevice_setup()¡£Ëü²»½ö³õʼ»¯Ó²ÅÌ£¬Ò²³õʼ»¯ÍøÂ磬ÒòΪ°²×°nfsÎļþϵͳµÄʱºòÐèÒªÍøÂçÆäËû: Èç, Lib·ÅÖúËÐĵĿâ´úÂë; Net,ºËÐÄÓëÍøÂçÏà¹ØµÄ´úÂë; Ipc,Õâ¸öĿ¼°üº¬ºËÐĵĽø³Ì¼äͨѶµÄ´úÂë; Fs ,ËùÓеÄÎļþϵͳ´úÂëºÍ¸÷ÖÖÀàÐ͵ÄÎļþ²Ù×÷´úÂ룬ËüµÄÿһ¸ö×ÓĿ¼֧³ÖÒ»¸öÎļþϵͳ£¬ÀýÈçfatºÍext2;
scripts, ´ËĿ¼°üº¬ÓÃÓÚÅäÖúËÐĵĽű¾ÎļþµÈ¡£
Ò»°ã£¬ÔÚÿ¸öĿ¼Ï£¬¶¼ÓÐÒ»¸ö .depend ÎļþºÍÒ»¸ö Makefile Îļþ£¬ÕâÁ½¸öÎļþ¶¼ÊDZàÒëʱʹÓõ
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
Ãû³Æ
daemon-ÔËÐÐÓÚºǫ́
¸ÅÒª
#include <unistd.h>
int daemon(int nochdir, int noclose);
ÃèÊö
daemon()º¯Êý£¬Ö÷ÒªÓÃÓÚijЩ³ÌÐòÏ£Íû×Ô¼ºÍÑÀëÖն˵ĿØÖƶøÔËÐÐ ......