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

Linux ºÍ ¶àÏß³Ì

ÿ´Î¶¼ÊÇÓõ½£¬²éһϣ¬Ð´Ï£¬Õâ´ÎÉÔ΢¼Ç¼Ï±ʼǡ£
ºÍThreadÏà¹Ø£¬»ù±¾µÄÓÐ3¸ö¸ÅÄÏ̵߳Ľ¨Á¢ºÍÏú»Ù£»Ïß³ÌËø£»Ïß³ÌÌõ¼þ
¹ØÓÚ½¨Á¢Ị̈߳º
ret = pthread_create(&thread_id, NULL, Do_Thread, &Do_Thread_Para);
// µÚ2²ÎÊýÊÇthread ÊôÐÔ£¬Ò»°ãÎÒ²»ÓÃÉèÖÃ
// µÚ4¸ö²ÎÊýÊÇDo_ThreadµÄÈë¿Ú²ÎÊý£¬Ò»°ãÎÒ´«Ò»¸ö½á¹¹Ìå½øÈ¥
¹ØÓÚÏú»ÙỊ̈߳º
µÈ´ýÏ߳̽áÊø£ºpthread_join
Ç¿ÐÐɱµôỊ̈߳ºpthread_exit
ÈÃÏß³Ì×ÔÉú×ÔÃð£ºpthread_detach
ÎÒÒ»°ãÓõÄÊǵÚÒ»¸ö£º
pthread_join(thread_id, &Do_Thread_ret);
// µÚ¶þ¸ö²ÎÊýÊÇÏ̷߳µ»ØÖµ 
¹ØÓÚÏß³ÌËø£ºµ±ÒªÔÚ¶à¸öÏ̹߳²ÏíijЩ±äÁ¿µÄʱºò£¬¾ÍÐèÒªÓÃËø¡£ÕâÑù¿ÉÒÔ±£Ö¤Ò»¸öʱ¼äµã£¬Ö»ÓÐÒ»¸öÏß³ÌÄܹ»·ÃÎÊÕâ¸öÏß³Ì
pthread_mutex_t mMutexData£»
pthread_mutex_init(&(mMutexData), NULL); // µÚ2¸ö²ÎÊýÊÇËøµÄÊôÐÔ£¬ÎÒÒ»°ãÓÃĬÈÏ£¬NULL
pthread_mutex_lock(&mMutexData);  // ¼ÓËø
pthread_mutex_unlock(&mMutexData) // È¥Ëø
pthread_mutex_destroy(&mMutexData) // Ïú»Ù
¹ØÓÚÌõ¼þ£ºµ±Ä³¸öÏß³ÌÐèÒªµÈ´ýÆäËûÏ̴߳¦ÀíÍêij¸öÊý¾Ý£¨ÔËÐе½Ä³¸öµã£©µÄ»°£¬¾ÍÐèÒªÓÃÌõ¼þ£¬Ò»°ã¼Ó¸öʱ¼ä²ÎÊý£¬ÒÔ·ÀÖ¹ËÀµÈÏÂÈ¥¡£
pthread_cond_t *sConditionData£»
pthread_cond_init(&(sConditionData), NULL)£» // µÚ2¸ö²ÎÊýÊÇËøµÄÊôÐÔ£¬ÎÒÒ»°ãÓÃĬÈÏ£¬NULL
 pthread_mutex_lock(&mMutexData); // Ò»°ãÌõ¼þ±ØÐëºÍËø¼ÓÔÚÒ»ÆðÓã¬ÒÔ±£Ö¤Ìõ¼þ±äÁ¿²»ÖØÈë
  pthread_cond_signal(&sConditionData); // ·¢ÐźÅ
  pthread_mutex_unlock(&mMutexData);
    struct timespec  ts;
    struct timeval sTime;
    struct timezone sTimeZone£»
   long res;
  pthread_mutex_lock(&(pApp->mMutexData));
  gettimeofday(&sTime, &sTimeZone);
  ts.tv_sec = sTime.tv_sec;
  ts.tv_nsec += 5sTime. tv_usec * 1000 £«20*1000*1000; // 20 ms
  ret = pthread_cond_timedwait(&(pApp->sConditionData), &(pApp->mMutexData), &ts); // µÈºò
  if(ret == ETIMEDOUT)
  {
   pthread_mutex_unlock(&(pApp->mMutexData));
  


Ïà¹ØÎĵµ£º

ÔÚlinuxÏÂʵÏÖweb qqµÄ×ÀÃæ»¯


´´½¨×ÀÃæÍ¼±ê
Ŀǰ½«ÍøÂçÓ¦ÓÃÀ©Õ¹µ½×ÀÃæÊÇÒ»¸öÇ÷ÊÆ£¬´æÔÚןܶà½â¾ö·½°¸£¬±¾ÎÄÒÔ Mozilla Prism ΪÀý£¬ÀàËÆµÄ·½·¨Í¬ÑùÊÊÓÃÓÚ Google Chrome ¡£
1. µ½ Mozilla Prism µÄÍøÕ¾ÉÏÏÂÔØ Prism£¬µã»÷ Download Now Ö®ºó»áÌáʾÓÐÁ½ÖÖ£¬Ò»ÖÖÊÇÒÔ Mozilla Firefox À©Õ¹µÄ·½Ê½£¬ÊʺÏÒѾ­°²×°ÓÐ Firefox µÄÅóÓÑ£»Ò»Ö ......

SynapticsÖúÁ¦Chrome OSºÍLinux¶à點觸Ãþ

4ÔÂ19ÈÕ£¬²Ù×÷½çÃæ½â¾ö·½°¸ÌṩÉÌSynaptics Inc.Ðû²¼ÁËÒ»Ì×ÓÃÓÚLinuxϵ統µÄ Synaptics Gesture Suite¿ª·¢Ì××°£¨SGS-L£©£¬Õâ¿îÈí¼þ½«´ø¸ø¿ªÔ´LinuxϵͳÒÔ¶àµã´¥ÃþµÄÄÜÁ¦¡£
SGS-LÖ§³Ö眾¶àµÄLinux·¢ÐаæÈçFedora, Millos Linpus, Red Flag, SuSE, UbuntuºÍXandros£¬並ÌØ別Ìá¼°¿ÉÍØÕ¹Chrome OSµÄй¦Ä ......

Linux ÖÐ RPM ÃüÁî²ÎÊýʹÓÃÏê½â

ÔÚLinux²Ù×÷ϵͳÖУ¬ÓÐÒ»¸öϵͳÈí¼þ°ü£¬ËüµÄ¹¦ÄÜÀàËÆÓÚWindowsÀïÃæµÄ“Ìí¼Ó/ɾ³ý³ÌÐò”£¬µ«Êǹ¦ÄÜÓֱȓÌí¼Ó/ɾ³ý³ÌÐò”Ç¿ºÜ¶à£¬Ëü¾ÍÊÇRed Hat Package Manager(¼ò³ÆRPM)¡£´Ë¹¤¾ß°ü×îÏÈÊÇÓÉRed Hat¹«Ë¾ÍƳöµÄ£¬ºóÀ´±»ÆäËûLinux¿ª·¢ÉÌËù½èÓá£ÓÉÓÚËüΪLinuxʹÓÃÕßʡȥÁ˺ܶàʱ¼ä£¬ËùÒÔ±»¹ã·ºÓ¦ÓÃÓÚÔÚLin ......

×ªÔØ ½ñÌìΪÎÒµÄGodaddy LinuxÖ÷»ú¿ªÍ¨SSH

ÒÔǰGodaddyµÄLinuxµÄÖ÷»úÊDz»ÄÜ¿ªÍ¨SSHµÄ£¬Ö»ÓÐVDS¡¢VPS¡¢¶ÀÁ¢Ö÷»ú¿ÉÒÔ¿ªÍ¨£¬Ç°¼¸ÌìÔÚºǫ́ÉÏ¿´µ½ÓÐÁËSSHÕâ¸ö¹¦ÄÜ£¬²»¹ýÐèҪɾ³ýËùÓеÄÊý¾Ý¿â£¬²Å¿ÉÒÔ½øÐпªÍ¨µÄ²½Ö衣ǿÁÒ½¨Ò鱸·ÝÊý¾Ý¿â¼°ÍøÕ¾£¡£¡
ɾ³ýÊý¾Ý¿â¾Í²»ÓÃ˵ÁË¡«ºÜ¼òµ¥¡£
²½Ö裺½øÈë¿Õ¼ä¹ÜÀíÃæ°å£¬Ñ¡ÔñSettingsÑ¡ÏϵÄSSHÑ¡ÏÈçÏÂͼ£º
godaddyssh-thumb. ......

linux Äں˰汾¼°²¹¶¡ËµÃ÷

ת×Ô£ºhttp://lkml.org/lkml/2005/8/2/242
--------------------------------------------------------------------------------------------
from
Jesper Juhl <>
Subject
Documentation - how to apply patches for various trees
Date
Tue, 2 Aug 2005 23:32:20 +0200
Hi,
How to apply the -rc, -git, ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ