Patent ID: 6223335
Filing Date: 2001-04-24
Classification: G06F

Abstract:
A method for providing a double compare and swap operation, comprising:executing a first compare and swap operation, wherein said first compare and swap operation determines if a contents of a first variable is equal to an old value for said first variable, and wherein said first compare and swap operation, responsive to determining that said contents of said first variable is equal to said old value for said first variable, writes a busy value to said first variable and indicates success;executing a second compare and swap operation responsive to said first compare and swap operation indicating success, wherein said second compare and swap operation determines if a contents of by a second variable is equal to an old value for said second variable, and wherein said second compare and swap operation writes a new value for said second variable to said second variable and indicates success responsive to determining that said contents of said second variable is equal to said old value for said second variable;writing a new value for said first variable to said first variable, responsive to said second compare and swap operation indicating success; andpreventing reads and writes on said first variable while said first variable contains said busy value.