gvisor icon indicating copy to clipboard operation
gvisor copied to clipboard

Support for "only store is exclusive" atomic variables

Open oakad opened this issue 10 months ago • 2 comments

Description

A rather common pattern in concurrent code is a use of atomic variable, that can be read outside of locked section but must be modified only inside the locked section. Examples of such usage are quite plentiful both in Go runtime and elsewhere in application software (one of the simplest such examples is implementation of sync.Once).

It will be very helpful is such use of atomic variables with locks could be expressed in checklocks annotations.

Is this feature related to a specific bug?

No response

Do you have a specific solution in mind?

No response

oakad avatar Feb 19 '25 04:02 oakad

Can I take this one?

Vperiodt avatar Apr 17 '25 13:04 Vperiodt

Hello! Do you have some more information about this enhancement? I would like to know more about the scale of the issue and what it would look like. Thanks!

julieta-3 avatar Nov 12 '25 01:11 julieta-3