-1

CMPXCHG ステートメントは次のように機能します。

CMPXCHG (common, old, new):
    int temp
    temp <- common
    if common = old then
           common <- new
    return temp    

CMPXCHG アトミック命令が使用可能な場合、クリティカル セクションを実装するための最も単純なアルゴリズムは何ですか?

4

1 に答える 1