Re: [问题] 关于多process执行顺序 (QT)

楼主: leolarrel (真.粽子无双)   2012-12-15 00:23:09
※ 引述《cty222 (纵裕)》之铭言:
: 小弟写了一支关于 share memory 的程式
: 里面加入了类似hand shake的机制
: 一开始两支C code compiler 工作正常
: 后来其中一支C code改成用QT compiler就不正常了
: 节取问题code如下
: *share 是共享内存
: C code QT code
: 1. *share = 0 ; *share=0;
: 2. while(*share==1); while(*share!=2){
: *share = 1 ;
: sleep(1); <

Links booklink

Contact Us: admin [ a t ] ucptt.com