// 取得 share 變數使用權:
inc share_token; // 要求取得 share 變數使用權
dzsn share_token; // 由於保證 ram 內容一次只有一個 fppa 能動~所以能保證只有一個 fppa 能過這關
goto $-2; // 其它 fppa 進入等待的循環
inc share_token; // fppa 取得 share 變數使用權
// 釋放 share 變數使用權 :
dec share_token; // fppa 釋放 share 變數使用權
當cpu都同步同速時~幾乎沒有問題~
反之,各cpu就有可能在1-2間打結,造成 share_token 永不為零的狀況,死當。
這個問題很有可能不被發現~要看你這段程式的使用頻率狀況而定~在隨機的情況下,發生的機率應該很大。
2007年7月19日 星期四
訂閱:
張貼留言 (Atom)
VirtualBox 空間減肥
sdelete64 -z c: VBoxManage modifymedium disk "/Users/fellow/VirtualBox VMs/Win10/Win10.vdi" --compact *.vdi 路徑可以在 VirtualBox 儲...
-
https://github.com/ljean/modbus-tk/ install pip… sudo apt-get install python-pip install... download modbus_tk-x.x.x.tar.gz tar zxvf...
-
ARis... ARis 是日本一間公司出品的產品,應用了 ARToolKit 技術。 展示影片在這… http://www.youtube.com/watch?v=yCCx7zANsGE YouTube上可以找到更多類似的影片。 這邊是我用 FLARToolK...
-
set0 bit 位元設0 set1 bit 位元設1 tog bit 位元0/1切換 swapc bit 位元與c切換 =================== call addr 呼叫副程式 goto addr 跳躍到標籤 icall [index] 呼叫指標指到的副程式 ig...
沒有留言:
張貼留言