※ 引述《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); <