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

ÈçºÎÔÚlinux/unixÖÐÉèÖÃÏ̵߳ÄÓÅÏȼ¶

ÈçºÎÔÚlinux/unixÖÐÉèÖÃÏ̵߳ÄÓÅÏȼ¶
int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg);
À´´´½¨Ị̈߳¬µ«ÊÇÈçºÎÉèÖÃÏ̵߳ÄÓÅÏȼ¶ÄØ£¿
ÔÚÌÖÂÛÕâ¸öÎÊÌâµÄʱºò£¬ÎÒÃÇÏÈҪȷ¶¨µ±Ç°Ïß³ÌʹÓõĵ÷¶È²ßÂÔ£¬posixÌṩÁË
int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy);º¯ÊýÀ´»ñÈ¡Ëù
ʹÓõĵ÷¶È²ßÂÔ£¬ËüÃÇÊÇ£ºSCHED_FIFO, SCHED_RR ºÍ SCHED_OTHER¡£
ÎÒÃÇ¿ÉÒÔʹÓÃ
int sched_get_priority_max(int policy);
int sched_get_priority_min(int policy);
À´»ñÈ¡Ïß³ÌÏ߳̿ÉÊÇÉèÖõÄ×î´óºÍ×îСµÄÓÅÏȼ¶Öµ£¬Èç¹ûµ÷Óóɹ¦¾Í·µ»Ø×î´óºÍ×îСµÄÓÅÏȼ¶Öµ£¬·ñÔò·µ»Ø£­1¡£
´ÓÎÒÏÖÔÚÔËÐеÄlinuxϵͳÖУ¬ÎÒʹÓÃÏÂÁгÌÐò£¨³ÌÐò¼û¸½Â¼£©»ñÈ¡Á˶ÔÓ¦ÈýÖÖµ÷¶È²ßÂÔÖеÄ×î´óºÍ×îСÓÅÏȼ¶£º
policy = SCHED_OTHER
Show current configuration of priority
max_priority = 0
min_priority = 0
Show SCHED_FIFO of priority
max_priority = 99
min_priority = 1
Show SCHED_RR of priority
max_priority = 99
min_priority = 1
Show priority of current thread
priority = 0
Set thread policy
Set SCHED_FIFO policy
policy = SCHED_FIFO
Set SCHED_RR policy
policy = SCHED_RR
Restore current policy
policy = SCHED_OTHER
ÎÒÃÇ¿ÉÒÔ¿´µ½
SCHED_OTHERÊDz»Ö§³ÖÓÅÏȼ¶Ê¹Óõģ¬¶øSCHED_FIFOºÍSCHED_RRÖ§³ÖÓÅÏȼ¶µÄʹÓã¬ËûÃÇ·Ö±ðΪ1ºÍ99£¬ÊýÖµÔ½´óÓÅÏȼ¶Ô½¸ß¡£ ´ÓÉÏÃæµÄ½á¹ûÎÒÃÇ¿ÉÒÔ¿´³ö£¬Èç¹û³ÌÐò¿ØÖÆÏ̵߳ÄÓÅÏȼ¶£¬Ò»°ãÊÇÓÃpthread_attr_getschedpolicyÀ´»ñȡϵͳʹÓõĵ÷¶È²ßÂÔ£¬Èç¹ûÊÇSCHED_OTHERµÄ»°£¬±íÃ÷µ±Ç°²ßÂÔ²»Ö§³ÖÏß³ÌÓÅÏȼ¶µÄʹÓ㬷ñÔò¿ÉÒÔ¡£µ±È»ËùÉ趨µÄÓÅÏȼ¶·¶Î§±ØÐëÔÚ×î´óºÍ×îСֵ֮¼ä¡£ÎÒÃÇ¿ÉÒÔͨ¹ýsched_get_priority_maxºÍsched_get_priority_minÀ´»ñÈ¡¡£
¿ÉÄÜÍøÓÑ»áÎÊ£¬ÊÇ·ñÎÒÃÇ¿ÉÒÔͨ¹ýint pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);À´É趨×Ô¼ºËùÐèµÄµ÷¶È²ßÂÔÄØ£¿ÎÒ¾õµÃÊÇÍêÈ«¿ÉÒԵģ¨ÓÐЩϵͳÐèÒª¶¨Òå_POSIX_THREAD_PRIORITY_SCHEDULING£©£¬Ö»ÒªÏµÍ³ÊµÏÖÁ˶ÔÓ¦µÄµ÷ÓòßÂÔ¡£
˵ÁË°ëÌ죬ÎÒÃÇ»¹Ã»ÓÐ˵£¬ÔÚϵͳÔÊÐíʹÓÃÏß³ÌÓÅÏȼ¶±ðµÄʱºò£¬ÈçºÎÉèÖÃÓÅÏȼ¶±ðÄØ£¿
int pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param);
int pthread_attr_getschedparam(const pthread_attr_t


Ïà¹ØÎĵµ£º

ʵս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 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ÉÏÅäÖÃSamba

×°ÁËÒ»¸öVMWARE£¬ÆäÖÐÔËÐеÄÊÇLINUX-FC11¡£ÎªÁËÄܹ»Í¬Window Host¹²ÏíÎļþ£¬´òËãÔÚLinuxÉÏ×°Samba·þÎñ¡£Ö®Ç°Ò²ÊÔ×ÅÓÃVMWARE Tools£¬²»¹ýûÄܳɹ¦¡£ËµÎÒµÄFC11ÓÐÎÊÌâ¡£¿ÉÄÜÊDZàÒë»·¾³»òÕß°æ±¾µÄÎÊÌâ¡£ÓÚÊÇÓÃSamba¡£
ÓÃSambaµÄGUI½çÃæÉèÖÃÁ˹²ÏíĿ¼¡£¿ÉÊÇWindows»¹ÊÇÕÒ²»µ½ÎҵĹ²ÏíĿ¼¡£½Ó×Å°´ÍøÉϵÄÌáʾ£¬´ò¿ªÁË·À»ðǽ½«S ......

ÍƼö£ºLinuxÈëÃÅ11µã½¨Òé

תÔØÍƼö ---- LinuxÈëÃÅ11µã½¨Òé
Ëæ×Å
Linux
Ó¦ÓõÄÀ©Õ¹Ðí¶àÅóÓÑ¿ªÊ¼½Ó´¥
Linux
£¬¸ù¾Ýѧϰ
Windwos
µÄ¾­ÑéÍùÍùÓÐһЩãȻµÄ¸Ð¾õ£º²»Öª´ÓºÎ´¦¿ªÊ¼Ñ§Æð¡£ÕâÀï½éÉÜѧϰ
Linux
µÄһЩ½¨Òé¡£

Ò»¡¢´Ó»ù´¡¿ªÊ¼£º
 
 
 
³£³£ÓÐЩÅóÓÑÔÚ
Linux
ÂÛ̳ÎÊһЩÎÊÌ⣬²»¹ý£¬ÆäÖдó¶àÊýµÄÎÊÌⶼÊǺܻù´ ......

dzÎölinuxÏÂÊó±êÇý¶¯µÄʵÏÖ

http://blog.chinaunix.net/u1/38994/showart_1132089.html
dzÎölinuxÏÂÊó±êÇý¶¯µÄʵÏÖ
¡¾Ç³ÎölinuxϼüÅÌÉ豸¹¤×÷ºÍ×¢²áÁ÷³Ì¡¿
¶ÔÓÚÊó±êÇý¶¯ºÍÇ°Ãæ·ÖÎö¹ýµÄ¼üÅÌÇý¶¯¶¼Êǹ²ÓÃinputÄ£ÐÍ,
ËùÒÔ,
¶ÔÓÚʼþÉϱ¨ºÍ´¦ÀíµÄ·½Ê½¶¼Ã»ÓÐÇø±ð,
Ö»ÊÇmouseÊó±êÇý¶¯µ±Éϱ¨Íêdx,
dy,
left
,
middle,
rightÖ®ºó,
ÐèÒªµ÷ÓÃinput_ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ