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

Linux Ðźż¯ dzÎö

  LinuxÐźÅÓжàÖÖ˵·¨¡£Ò»¸ö½ø³Ì´´½¨Ò»¸öÐźÅÓÃÓÚ·¢Ë͸øÁíÍâÒ»¸ö½ø³Ì½Ð×ö·¢ËÍÒ»¸öÐźţ¬Äں˴´½¨Ò»¸öÐźŽÐ×öÉú³ÉÒ»¸öÐźţ¬½ø³Ì×Ô¼ºÏò×Ô¼º·¢ËÍÐźŽÐ×ö»½ÆðÒ»¸öÐźš£²»¹ýÎÒ¿´Ò²Ã»±ØÒªÕâôѧ¾¿Æø¡£
  Ðźż¯--signel set,Æäʵ¾ÍÊǽ«¶à¸öÐźŷÅÔÚ¼¯ºÏÖнøÐм¯ÖеĴ¦Àí¡£POSIX.1¶¨ÒåÁËsigset_tÒÔ°üº­Ò»¸öÐźż¯£¬²¢ÇÒ¶¨ÒåÁËÎå¸ö´¦ÀíÐźŵĺ¯Êý£º
  int sigemptyset(sigset_t *set);
  int sigfillset(sigset_t *set);
  int sigaddset(sigset_t *set,int signo);
  int sigdelset(sigset_t *set,int signo)
  int sigismember(const sigset_t *set,int signo);
  »¹ÓÐÒ»¸öÖØÒªµÄº¯Êý£ºint sigprocmask(int how,const sigset_t *restrict set,sigset_t *restrict oset);
  µ¥´¿½²ÕâЩº¯ÊýºÜÄѽ²Ã÷°×£¬ÏÂÃæ½áºÏ³ÌÐòÀ´½²£¬³ÌÐòÀ´×ÔUNIX»·¾³¸ß¼¶±à³Ì£º
  
   static void sig_quit(int);   //ÐźŴ¦Àíº¯Êý
   int main( )
  {
     sigset_t newmask,oldmask,pendmask;
     if(signal(SIGQUIT,sig_quit)==SIG_ERR)
            err_sys("can not catch SIGQUIT");
     -----------------------------------------------------------------------------------------------------------
     sigemptyset(&newmask);    //Çå¿ÕÐźÅÑÚÂ뼯newmask,²»×èÈûÈκÎÐźÅ
     sigaddset(&newmask,SIGQUIT);  //½«SIGQUITÐźŷÅÈëÐźż¯newmaskÖÐÈ¥
    
     if(sigprocmask(SIG_BLOCK,&newmask,&oldmask)<0) //½«oldmask ºÍnewmaskºÏ²¢
             err_sys("SIG_BLOCK error");  //µ±Ç°ÐźÅÆÁ±Î×Ö·ÅÔÚnewmaskÀÒÔÇ°µÄ·ÅÔÚoldmaskÀï
    
     sleep(5);
     if(sigpending(&pendmask)<0)   //±£´æËùÓб»×èÈûµÄÐźţ¬±¾Àý¼´±£´æSIGQUITµ½pendmaskÖÐÈ¥
            


Ïà¹ØÎĵµ£º

[תÌû]LinuxÇý¶¯¿ª·¢Ñ§Ï°µÄһЩ±ØÒª²½Öè

 1. ѧ»áд¼òµ¥µÄmakefile
2. ±àһЩӦÓÃ
³ÌÐò
£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯
µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö
¡£
5. дһÍêÕûÇý¶¯£¬ ¼ÓÉÏread£¬ write£¬ ioctl£¬ pollingµÈ¸ ......

LInux±Ê¼Ç

LInux±Ê¼Ç
¹Û²ìϵͳµÄʹÓÃ״̬:Èç¹ûÒª¿´Ä¿Ç°ÓÐË­ÔÚÔÚÏß,¿ÉÒÔÏ´ï who Õâ¸öÖ¸Áî,¶øÈç¹ûÒª¿´ÍøÂçµÄÁª
»ú״̬,¿ÉÒÔÏ´ï netstat -a Õâ¸öÖ¸Áî,¶øÒª¿´±³¾°Ö´ÐеijÌÐò¿ÉÒÔÖ´ÐÐ ps -aux Õâ¸öÖ¸Áî¡£
ʹÓÃÕâЩָÁî¿ÉÒÔÈÃÄãÉÔ΢Á˽âÖ÷»úÄ¿Ç°µÄʹÓÃ״̬!
¹Ø»úµÄÕýÈ·Ö¸ÁîÓ÷¨啰!
• ½«Êý¾Ýͬ²½Ð´ÈëÓ²ÅÌÖеÄÖ¸Áî: sync
& ......

LinuxÂãÉ豸×ܽá

Ô­Ìû¼ûhttp://www.inthirties.com/thread-685-1-1.html 
1¡¢Ê²Ã´ÂãÉ豸£¿×Ö·ûÉ豸£¿¿éÉ豸£¿ 
ÂãÉ豸£ºÒ²½ÐÂã·ÖÇø£¨Ô­Ê¼·ÖÇø£©£¬ÊÇÒ»ÖÖûÓо­¹ý¸ñʽ»¯£¬²»±»Unix/Linuxͨ¹ýÎļþϵͳÀ´¶ÁÈ¡µÄÌØÊâ×Ö·ûÉ豸¡£ÂãÉ豸¿ÉÒÔ°ó¶¨Ò»¸ö·ÖÇø£¬Ò²¿ÉÒÔ°ó¶¨Ò»¸ö´ÅÅÌ¡£ 
×Ö·ûÉ豸£º¶Ô×Ö·ûÉ豸µÄ¶Áд²»ÐèҪͨ¹ýOSµÄbuffer ......

[ת]×Ô¼º¶¯ÊÖ´òÔìǶÈëʽLinuxÈíÓ²¼þ¿ª·¢»·¾³

      Ô­ÎĵØÖ·£ºhttp://www.xxlinux.com/linux/article/development/embed/20080227/14047.html
      LinuxºÍuClinux
      LinuxÕýÖð½¥µØÓ¦ÓÃÓÚǶÈëʽÉ豸£¬uClinuxÕýÊÇÔÚÕâÖÖ·ÕΧϲúÉúµÄ¡£uClinux¾ÍÊÇMicro-Control-Linux£¬ËüÒ²ÊÇÒ»¸ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ