CMPXCHG ステートメントは次のように機能します。
CMPXCHG (common, old, new):
int temp
temp <- common
if common = old then
common <- new
return temp
CMPXCHG アトミック命令が使用可能な場合、クリティカル セクションを実装するための最も単純なアルゴリズムは何ですか?
CMPXCHG ステートメントは次のように機能します。
CMPXCHG (common, old, new):
int temp
temp <- common
if common = old then
common <- new
return temp
CMPXCHG アトミック命令が使用可能な場合、クリティカル セクションを実装するための最も単純なアルゴリズムは何ですか?