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

Linux kernel development Chapter2 ½ø³Ì¹ÜÀí

1 ½ø³Ì¹ÜÀíÏà¹Ø´úÂë
  1.1 thread_info½á¹¹£¬ÔÚÎļþ<asm/thread_info.h>Öж¨Òå
      struct thread_info {
           struct task_struct *task;
           struct exec_domain *exec_domain£»
           unsigned long flags;
           __u32 cpu;
           __s32 preempt_count;
           mm_segment_t addr_limit;
           u8 supervisor_stack[0];
        };
        ÿ¸öÈÎÎñµÄthread_info½á¹¹ÔÚÆäÄÚºËÕ»¶¥¶Ë·ÖÅ䣬ÆätaskÓòÖ¸Ïò¸ÃÈÎÎñµÄʼþtask_struct½á¹¹¡£
   1.2 ÈÎÎñ¶ÓÁУ¨task list£©
      Ë«ÏòÑ­»·Á´±í£¬Á´±íÿһÏÊÇÒ»¸ötask_struct(¶¨ÒåÔÚinclude/linux/sched.hÖÐ),¸Ã½ø³ÌÃèÊö·û°üº¬ÁËÒ»¸ö½ö½ø³ÌµÄËùÓÐÐÅÏ¢¡£
   1.3 slab
       linuxͨ¹ýslab»úÖÆ·ÖÅätask_struct½á¹¹£¬ÒÔ´ïµ½¶ÔÏó¸´Óúͻº´æ×ÅÉ«µÄÄ¿µÄ¡£
   1.4 pid
       linuxͨ¹ýpid£¨pid_tÀàÐÍ,integer)À´±êʾÿһ¸öÈÎÎñ½ø³Ì¡£ÎªÁËÓëÀÏ°æ±¾unixºÍlinux¼æÈÝ£¬pid×î´óֵΪ32767.Èç¹ûÐèÒª¸ü¶à½ø³Ì£¬¿ÉÒÔͨ¹ý
ÐÞ¸Ä/proc/sys/kernel/pid_maxÀ´Ìá¸ßÉÏÏÞ¡£
   1.5 currentºê
        currentºêÓÃÓÚ²éÕÒµ±Ç°ÕýÔÚÔËÐнø³ÌµÄ½ø³ÌÃèÊö·û¡£²»Í¬µÄÓ²¼þÌåϵ½á¹¹µÄʵÏÖ²»Í¬¡£
        ÔÚx86¼Ü¹¹ÖУ¬¼Ä´æÆ÷²»¶à£¬²»ÄÜʹÓÃרÃŵļĴæÆ÷Ö¸Ïòµ±Ç°½ø³ÌµÄtask_struct.ËüµÄ·½Ê½ÊÇͨ¹ýÔÚÄÚºËÕ»¶¥¶Ë´´½¨thread_info½á¹¹£¬¼ä½ÓµÄ
²éÕÒtask_struct½á¹¹£º
         £¨1£©Í¨¹ýÆÁ±ÎÕ»Ö¸Õ루esp£©µÄºó13¸öÓÐЧλ»ñµÃthread_info½á¹¹£¬ÔÚcurrent_thread_info()º¯ÊýÍê³É£º
        &n


Ïà¹ØÎĵµ£º

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

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

linuxϵͳÏÂrpm°üµÄ°²×°¡¢É¾³ý¡¢Ð§Ñé¡¢²éѯ

 µãÆÀ£º°²×°Èí¼þ°ü rpm  -i °üÈ«Ãû ɾ³ý rpm -e name(²»ÊÇ°üÃû) ²ÎÊý -ivh »ñµÃÒ»¸öÏêϸµÄ°²×°½ø³Ì --nodeps ºöÂÔÒÀÀµ¹Øϵ --force Ç¿ÖÆ°²×° -U °üÃû:Éý¼¶°²×° -F ¸üв»¹ÜÊÇʲôֱ½Ó¸²¸Ç --replacepkgsÕâÑù RPM ½«ºöÂԸôíÎóÐÅÏ¢ -vih --repla
ÄÚÈÝÀ´×Ô: ½Å±¾Ö®¼Ò www.jb51.net
°²×°Èí¼þ°ü
rpm  -i °üÈ ......

linux Socket±à³ÌÈëÃÅ

ÒÔÇ°ÒѾ­½Ó´¥WindowsϵÄSocket±à³Ì£¬×î½üÒ²³¢ÊÔ×ÅÔÙlinuxÏÂʹÓÃSocket±à³Ì£¬ÏÂÃæÊÇÔÚÍøÉÏÕÒµÄÀý×Ó(ÒѾ­²âÊÔ¹ý)
 tcp_server.c:
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <stdlib.h>
# ......

linuxѧϰ±Ê¼Ç

 Ò»±ßѧϰubuntu,Ò»±ß·¢ÏÖÎÊÌ⣬Ŀǰ·¢ÏÖµÄÎÊÌâÓÐÒÔϼ¸¸ö£¬²¢³É¹¦½â¾ö¡£
        Ê×ÏÈ£¬´ò¿ªfirefox,flash²»ÄÜÕýÈ·ÏÔʾ£¬°²×°adobe  flash  ×îвå¼þ¾Í¿ÉÒÔ½â¾ö£¬ÆäËûflash²å¼þЧ¹û²»Ì«ºÃ¡£ºóÀ´´ò¿ªQQÅ©³¡µÄflash£¬ÖÐÎÄÏÔʾ¿Õ¸ñ£¬½â¾ö·½·¨£¬´ò¿ªÖնˣ¬ÊäÈëÒÔÏÂÃüÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ