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

LinuxÄÚºËÊý¾Ý½á¹¹

1.1.Á´±ílist_head
    include/linux/list.h
    ºÜ¾­µä£¬Á´±íÔÚÄÚºËÖкܳ£Óã¬ÀýÈç¹ÜÀí½ø³Ì£¬½ø³ÌµÄ¸÷¸ö״̬¶ÓÁж¼ÊÇʹÓÃÕâ¸öË«ÏòÁ´±íʵÏֵġ£ÄÚºËÖеÄÁ´±í¶¨Òå³ÉºÍÊý¾ÝÎ޹صÄÐÎʽ£¬¶ø²»ÊÇͨ³£ÎÒÃÇʹÓõÄÁ´±í¸ñʽ£¬ÀýÈç
typedef struct _list{
    Elemtype elem;
    struct _list *next;
}list;
ÄÚºËÖеÄÁ´±í¶¨ÒåΪ
struct list_head{
    struct list_head *next, *prev;
};
¿É¼û£¬Õâ¸öÁ´±í½ÚµãÖв»°üº¬ÈκÎÊý¾Ý£¬Ö»ÓÐÁ½¸öÖ¸Õë¡£µ±ÐèҪʹÓÃÁ´±íÀ´×éÖ¯Êý¾Ý½á¹¹Ê±£¬Õâ¸ö½á¹¹ÖоͰüº¬Ò»¸ölist_head³ÉÔ±£¬ÀýÈç
struct _list_struct{
    Elemtype elem;
    struct list_head list;
    ...
};
ÏÔ¶øÒ×¼û£¬Á´±íʵÏֳɺÍÊý¾Ý·ÖÀëµÄºÃ´¦ÊÇ£¬²»ÓÃΪÿÖÖÊý¾Ý¶¼¶¨ÒåÁ´±í²Ù×÷£¬¿ÉÒÔʹÓÃͳһµÄÁ´±í²Ù×÷¼´¿É¡£µ«ÊÇÎÊÌâÊÇ£ºÖ»ÖªµÀÊý¾Ý³ÉÔ±listµÄµØÖ·£¬ÔõÑùÈ¥·ÃÎÊ×ÔÉíÒÔ¼°ÆäËû³ÉÔ±ÄØ£¿
#define list_entry(ptr,type,member)    \
    container_of(ptr,type,member)
¶øcontainer_of(ptr,type,member)ºê¶¨ÒåÔÚinclude/list/kernel.hÖÐ
#define container_of(ptr,type,member)    ({
    const typeof( ((type *)0)->member) *__ptr=ptr;
    (type *)( (char *)__ptr - offsetof(type,member));})
    ÉÏÃæµÄºêÓм¸µãÐèÒª½âÊÍ£º
1£©typeof(type) ºê
    typeof(type) ºê·µ»Ø±äÁ¿typeµÄÀàÐÍ£¬ÀýÈ磺int a; typeof(a) b;µÈ¼ÛÓÚint b;
2£©offsetof(type,member)ºê
    Ëü¶¨ÒåÔÚinclude/linx/stddef.hÖУ¬ÈçÏ£º
#define offsetof(TYPE, MEMBER)  ((size_t) &((TYPE *)0)->MEMBER)
Õâ¸öºê·µ»ØmemberÔÚtypeÀàÐÍÖеÄÆ«ÒÆÁ¿£¬typeÊÇÒ»¸ö½á¹¹£¬ÀýÈ磺
typeof(list_head,next);·µ»Ø0£¬Ò²¾ÍÊÇ·µ»ØÏà¶ÔÓڽṹÆðʼµØÖ·µÄÆ«ÒÆÁ¿¡£
3£©ÎªÊ²Ã´ÒªÊ¹ÓÃtypeof(((type *)0)->member)À´¶¨ÒåÖ¸Õë __ptr£¬¶ø²»ÊÇÕâÑù£º
const typeof(member) *__ptr=ptr;£¿
    Æäʵ£¬Õâ¸öºÜ¼òµ¥£¬ÒòΪmemberÊǽṹµÄ³ÉÔ±£¬Ö»ÄÜͨ¹ý½á¹¹À´·ÃÎÊ£¡
4£©·ÃÎÊÊý¾Ý
    ÔÚÎļþinclude/linux/list.hÖУ¬ÓзÃÎÊÁ´±íÊý¾ÝµÄ´úÂë
#define list_for_each_entry(pos, h


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì(Áù) 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 ......

LinuxÄں˷ÃÎÊÍâÉèI/O×ÊÔ´µÄ·½Ê½

ÎÒÃÇÖªµÀĬÈÏÍâÉèI/O×ÊÔ´ÊDz»ÔÚLinuxÄں˿ռäÖеģ¨Èçsram»òÓ²¼þ½Ó¿Ú¼Ä´æÆ÷µÈ£©£¬ÈôÐèÒª·ÃÎʸÃÍâÉèI/O×ÊÔ´£¬±ØÐëÏȽ«ÆäµØÖ·Ó³Éäµ½Äں˿ռäÖÐÀ´£¬È»ºó²ÅÄÜÔÚÄں˿ռäÖзÃÎÊËü¡£
 
LinuxÄں˷ÃÎÊÍâÉèI/OÄÚ´æ×ÊÔ´µÄ·½Ê½ÓÐÁ½ÖÖ£º¶¯Ì¬Ó³Éä(ioremap)ºÍ¾²Ì¬Ó³Éä(map_desc)¡£
 
Ò»¡¢¶¯Ì¬Ó³Éä(ioremap)·½Ê½
 
¶ ......

ʲôÊÇlinux Qt


Qt ÊÇÒ»¸ö¿çƽ̨µÄ C++ ͼÐÎÓû§½çÃæ¿â£¬ÓÉŲÍþ TrollTech ¹«Ë¾³öÆ·£¬Ä¿Ç°°üÀ¨Qt£¬
»ùÓÚ Framebuffer µÄ Qt Embedded£¬¿ìËÙ¿ª·¢¹¤¾ß Qt Designer£¬¹ú¼Ê»¯¹¤¾ß Qt Linguist µÈ²¿·Ö
Qt Ö§³ÖËùÓÐ Unix ϵͳ£¬µ±È»Ò²°üÀ¨ Linux£¬»¹Ö§³Ö WinNT/Win2k£¬Win95/98 ƽ̨¡£

Trolltech ¹«Ë¾ÔÚ 1994 Äê³ÉÁ¢£¬µ«ÊÇÔÚ 19 ......

linuxϵÄÎļþÎļþ´«Ê乤¾ß sftpÃüÁî

sftp ÊÇÒ»¸ö½»»¥Ê½Îļþ´«Êä³Ìʽ¡£ËüÀàËÆÓÚ ftp, µ«Ëü½øÐмÓÃÜ´«Ê䣬±ÈFTPÓиü¸ßµÄ°²È«ÐÔ¡£Ï±߾ͼòµ¥½éÉÜÒ»ÏÂÈçºÎÔ¶³ÌÁ¬½ÓÖ÷»ú£¬½øÐÐÎļþµÄÉÏ´«ºÍÏÂÔØ£¬ÒÔ¼°Ò»Ð©Ïà¹Ø²Ù×÷¡£
ÔÚubuntuϵݲװapt-get install sftp ,µ±È»µÃÈ·±£ÄúÓÐ×ã¹»µÄȨÏÞ°²×°¸Ã³ÌÐò
linuxÏÂÈçºÎʹÓÃsftpÃüÁî¡£
¾ÙÀý£¬ÈçÔ¶³ÌÖ÷»úµÄ IP ÊÇ 202.206.64. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ