发明名称 Platform independent double compare and swap operation
摘要 A system for providing a double compare and swap operation is disclosed. In the disclosed system, a first single compare and swap operation is performed. If a contents of a first variable is equal to an old value for the first variable, then the first compare and swap operation writes a value to the first variable indicating that the variable is not accessible and indicates success. A second single compare and swap operation is executed in the event that the first single compare and swap operation indicates success. If a contents of a second variable is equal to an old value for the second variable, then the second single compare and swap operation writes a new value for the second variable into the second variable and indicates success. If the second single compare and swap operation indicates success, a new value for the first variable is written to the first variable. Reads and writes on the first variable are prevented while the first variable contains the value indicating that the variable is inaccessible. The disclosed double compare and swap operation writes the old value for the first variable into the first variable if the second single compare and swap operation fails.
申请公布号 US6223335(B1) 申请公布日期 2001.04.24
申请号 US19980207940 申请日期 1998.12.09
申请人 SUN MICROSYSTEMS, INC. 发明人 CARTWRIGHT, JR. ROBERT S.;AGESEN OLE
分类号 G06F9/44;(IPC1-7):G06F9/45 主分类号 G06F9/44
代理机构 代理人
主权项
地址