Linux???????С??
???????????? ???????[ 2014/11/4 11:51:46 ] ?????????????? Linux ???????
????4.?????????????
????????????????????д?????????????????????????????????е?????????????????????????????????????????????????CPU?????????????л?????????
??????????????????????????????????????????????????????????????е?????????????????
??????????????У????????????????????????????????????????????????????????Ч???????????????????????????????????????????????
???????μ?????У??????????????????flag?????????????????
???????????????
????gcc -D_REENTRANT thread2.c -o thread2 –lpthread
??????????????
????$ ./thread2
????121212121212121212
????Waiting for thread to finish...
????5.???????
??????????????????У???????????????????????????????л???????????Ч???????????????????????????????????????????????????????к???????????????????
??????С?????????????????????????????????????????????????????????????????????????????????????????????????????У??????Щ???????????????????????????е??????????????????壬????Ч?????á?
????5.1??????????????
????1.?????????
????#include <semaphore.h>
????int sem_init(sem_t *sem?? int pshared?? unsigned int value);
????????????
????sem???????????
????pshared??????????????????0??????????????????????????????????????????????????????乲???
????value??????????????
????2.?????????
????#include <semaphore.h>
????int sem_wait(sem_t *sem);
????int sem_post(sem_t *sem);
????sem_post????????????????????????????????1??
????sem_wait????????????????????????????????1?????????????????0???????????????????????0???????????sem_wait???????????????????????????????????????????0??
????3.?????????
????#include <semaphore.h>
????int sem_destory(sem_t *sem);
?????????????????????????????????????????????????????????е??????????????????????????????Щ???????????????????
??????????Linux???????????Щ???????????????0??
???????±??????????????????????е????????????“end”????????
???????????????
????gcc -D_REENTRANT thread2.c -o thread2 –lpthread
??????????????
$ ./thread3
Input some text. Enter 'end' to finish
123
You input 3 characters
1234
You input 4 characters
12345
You input 5 characters
end
Waiting for thread to finish…
Thread join
?????????????????????????????????????????????????????????????????????е?????????????????????????????Ч????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Linux??????DDR????????????Linux?????????????????豸??????????linux???в???????????м??????????????????????????Linux????Linux??DNS????????????γ???????????Linux?????????????Linux????(???)????????Linux ????????????????????????????????Windows???У?Linux???????Linux????????????????Linux iommu??vfio???????Linux????ε???TCP???????Linux?????????????СLinux?·???????????Linux???Jexus?й?Asp.Net Core??ó???Linux?????????Щ??
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????