linux¶à½ø³Ì±à³Ì
ÔÚlinuxÖÐ,ÔËÐеÄÒ»¸ö½ø³Ì,»áռȥlinuxµÄÈý¸öµØ·½,´úÂëÇø,¶ÑÕ»ÇøºÍÊý¾ÝÇø.Èç¹ûͬʱÔËÐжà¸öÏàͬµÄ³ÌÐò,ËûÃǾͻáʹÓÃÏàͬµÄ´úÂëÇø,´úÂëÇøÖдæ·ÅµÄ¾Í³ÌÐòµÄ´úÂë,µ«ÊÇÊý¾ÝÇøºÍ¶ÑÕ»Çø·Ö±ð´æ·ÅµÄÊdzÌÐòµÄÊý¾Ý,È«¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿,Òò´Ë¼´Ê¹ÊÇÏàͬµÄ³ÌÐò,Ò²²»¿ÉͬʱʹÓÃÏàͬµÄÊý¾ÝºÍ¶ÑÕ»Çø.
#include<stdio.h>
#include<unistd.h>
int main()
{
if(fork() == 0)
{
printf("First.\n");
if(fork() == 0)
{
printf("Second.\n");
}
else
{
printf("Third.\n");
}
}
else
{
printf("Fourth.\n");
if(fork() == 0)
{
printf("Fivth.\n");
}
else
{
printf("Sixth.\n");
}
}
}
¿ÉÒÔ¹ØעϳÌÐòµÄÔËÐнá¹û,ÒÔ¼°Êä³öµÄ˳Ðò,²¢Àí½âΪʲôÊÇÕâÖÖÊä³ö½á¹û
Ïà¹ØÎĵµ£º
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 Ê ......
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
PCI: bus0: Fast back to back transfers disabled
PCI: Configured XX as a PCI slave with 128MB PCI memory
PCI: Each Region size is 16384KB
PCI: Reserved memory from 0x10080000 to 0x15080000 for DMA and mapped to 0x12000000
¡¡¡¡É豸µÄ³õʼ»¯ init()--->do_basic_init()--->pci_init()£¬³õÊ ......
ÕªÒª
ÎÒÃÇÔÚÕâÀïÌÖÂÛµÄÊǶÔǶÈëʽlinuxϵͳµÄÆô¶¯¹ý³ÌµÄÊä³öÐÅÏ¢µÄ×¢ÊÍ£¬Í¨¹ýÎÒÃǵÄÌÖÂÛ£¬´ó¼Ò»á¶ÔǶÈëʽlinuxÆô¶¯¹ý³ÌÖгöÏֵġ¢ÒÔÇ°¸Ð¾õÊìϤµÄ¡¢µ«È´ÓÖËÆÊǶø·ÇµÄ¶«Î÷ÓÐÒ»¸öÈ·ÇеÄÁ˽⣬²¢ÇÒÄÜÁ˽⵽ÕâЩÊä³öÐÅÏ¢µÄÀ´ÁúÈ¥Âö¡£
ǶÈëʽlinuxµÄÆô¶¯ÐÅÏ¢ÊÇÒ»¸öºÜÖµµÃÎÒÃÇÈ¥ºÃºÃÑо¿µÄ¶«Î÷£¬ËüÄܽ«Ò»·ùËõӰͼ³ÊÏÖÔÚÎÒà ......