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

linux϶àÏß³Ì Ö® pthread_detach(pthread_self())

ÕýʽʵϰһÖÜ£¬Óеã¸Ð´¥¡£±¾À´¾ÍûָÍûÄܳÉΪʲô¼¼Êõ´óÅ££¬ÓÃ×Ô¼ºµ÷Ù©µÄ»°À´Ëµ¾ÍÊÇ“»ì¿Ú·¹³Ô”¡£²»¹ýÀÏ´ó¶ÔmeµÄÆÚÍûÖµÄÇô¸ß£¬¾­Àí¹ÜµÃÕâôÑÏ£¬Ñ¹Á¦ÆĴ󡣶Ô×Ô¼ºÍ¦Ê§Íû£¬Ã»ÄÜ¿ªºÃÍ·£¬Óеã¶Ô²»ÆðÕâô³É¹¦µÄÀÏ´ó¡£»¹ºÃû׼±¸×öʲô´óÊ£¬Òª²»È»ÕâÐÔ¸ñµÃ·Ñ¶à´óÁ¦Æø²ÅÄÜÖØËÜ¡£¡£¡£
¶¼ÊDZƳöÀ´µÄ£¬±»¾­Àíѵºó£¬Ò»Ìì¶àµÄʱ¼ä¾Í°ÑÏîÄ¿µÄ´úÂëÀí³öÁ˸ö´ó¸Å£¬¶ÔÕâ´úÂëÕæÊÇû»°Ëµ£¬Ò»µã×¢ÊͶ¼Ã»ÓУ¬´úÂë¹æ·¶°¥£¬¾¹È»»¹ÊǺöàÈ˾­¹ýÊÖ»ýÀÛÏÂÀ´µÄ¡£
¶àÏß³ÌÉÔ΢¿´ÁËÏ»¹ÄܽÓÊÜûÏëÏóÖеÄÄÑ£¬Ð´Á˸öʾÀý³ÌÐòÔËÐÐÐÞ¸ÄÔËÐÐÐ޸ļ¸±éºóÒ²´óÖÂÃ÷°×ÁË¡£
д¸öÅöµ½µÄÎÊÌ⣬¼Ç¼ÏÂ×Ô¼ºµÄ¼¼Êõ֮·µãµÎ
pthread_detach(pthread_self())
linuxÏß³ÌÖ´ÐкÍwindows²»Í¬£¬pthreadÓÐÁ½ÖÖ״̬joinable״̬ºÍunjoinable״̬£¬
Èç¹ûÏß³ÌÊÇjoinable״̬£¬µ±Ï̺߳¯Êý×Ô¼º·µ»ØÍ˳öʱ»òpthread_exitʱ¶¼²»»áÊÍ·ÅÏß³ÌËùÕ¼ÓöÑÕ»ºÍÏß³ÌÃèÊö·û£¨×ܼÆ8K¶à£©¡£Ö»Óе±Äãµ÷ÓÃÁËpthread_joinÖ®ºóÕâЩ×ÊÔ´²Å»á±»ÊÍ·Å¡£
ÈôÊÇunjoinable״̬µÄỊ̈߳¬ÕâЩ×ÊÔ´ÔÚÏ̺߳¯ÊýÍ˳öʱ»òpthread_exitʱ×Ô¶¯»á±»ÊÍ·Å¡£
unjoinableÊôÐÔ¿ÉÒÔÔÚpthread_createʱָ¶¨£¬»òÔÚÏ̴߳´½¨ºóÔÚÏß³ÌÖÐpthread_detach×Ô¼º, È磺pthread_detach(pthread_self())£¬½«×´Ì¬¸ÄΪunjoinable״̬£¬È·±£×ÊÔ´µÄÊÍ·Å¡£»òÕß½«Ïß³ÌÖÃΪ joinable,È»ºóÊÊʱµ÷ÓÃpthread_join.
Õª×Ô  http://kb.cnblogs.com/a/1285801/
Æäʵ¼òµ¥µÄ˵¾ÍÊÇÔÚÏ̺߳¯ÊýÍ·¼ÓÉÏ pthread_detach(pthread_self())µÄ»°£¬Ïß³Ì״̬¸Ä±ä£¬ÔÚº¯Êýβ²¿Ö±½Ó pthread_exitÏ߳̾ͻá×Ô¶¯Í˳ö¡£Ê¡È¥Á˸øÏ̲߳Áƨ¹ÉµÄÂé·³


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â

Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......

LinuxÍø¿¨Çý¶¯³ÌÐò·ÖÎö

ѧϰӦ¸ÃÊÇÒ»¸öÏÈ°ÑÎÊÌâ¼òµ¥»¯£¬ÔÙ°ÑÎÊÌ⸴ÔÓ»¯µÄ¹ý³Ì¡£Ò»¿ªÊ¼¾Í×ÅÊÖ´¦Àí¸´ÔÓµÄÎÊÌ⣬ÄÑÃâÈÃÈËÓÐÐľªµ¨²ü£¬×½½ó¼ûÖâµÄ¸Ð¾õ¡£¶ÁLinuxÍø¿¨Çý¶¯ Ò²ÊÇÒ»Ñù¡£Ädz¤³¤µÄÔ´Âë¼ÐÔÓ×ÅÄÇЩÎÒÃÇÄ°ÉúµÄ±äÁ¿ºÍ·ûºÅ£¬Íû¶øÉúη±ãÊÇÀíËùµ±È»µÄÁË¡£²»Òªµ£ÐÄ£¬ÊÂÇé×ÜÓнâ¾öµÄ°ì·¨£¬ÏÈ°ÑһЩÎÒÃǹܲ»×ŵĴúÂëÇиî³öÈ¥£¬ÁôϱØÐëµÄ²¿·Ö£¬°Ñ¿ò¼ÜÕÆ ......

ÔÚLinux²Ù×÷ϵͳÏÂÐÞ¸ÄIP¡¢DNSºÍ·ÓÉÅäÖÃ

ifconfig eth0 ÐÂIP
È»ºó±à¼­/etc/sysconfig/network-scrIPts/ifcfg-eth0£¬ÐÞ¸ÄIP
Ò»¡¢ÐÞ¸ÄIPµØÖ·
[aeolus@db1 network-scrIPts]$ vi ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=219.136.241.211
NETMASK=255.255.255.128
GATEWAY=219.136.241.254
¶þ¡¢ÐÞ¸ÄÍø¹Ø
vi /etc/sysconfig/ ......

linuxµÄchmodÃüÁîʹÓÃÏê½â

ʹÓ÷½Ê½ : chmod [-cfvR] [--help] [--version] mode file...
˵Ã÷ : Linux/Unix µÄµµ°¸´æȡȨÏÞ·ÖΪÈý¼¶ : µµ°¸ÓµÓÐÕß¡¢Èº×é¡¢ÆäËû¡£ÀûÓà chmod ¿ÉÒÔ½åÒÔ¿ØÖƵµ°¸ÈçºÎ±»ËûÈËËù´æÈ¡¡£
mode : ȨÏÞÉ趨×Ö´®£¬¸ñʽÈçÏ : [ugoa...][[+-=][rwxX]...][,...]£¬ÆäÖÐu ±íʾ¸Ãµµ°¸µÄÓµÓÐÕߣ¬g ±íʾÓë¸Ãµµ°¸µÄÓµÓÐÕßÊôÓÚͬһ¸öÈºÌ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ