Add memory fence
This commit is contained in:
parent
6ac0f3c369
commit
f479f85676
6 changed files with 54 additions and 2 deletions
|
|
@ -90,10 +90,15 @@ class TestAtomic(unittest.TestCase):
|
|||
loaded = bldr.atomic_load(ptr, ordering)
|
||||
self.assertIn('load atomic', str(loaded))
|
||||
self.assertEqual(ordering, str(loaded).strip().split(' ')[-1])
|
||||
|
||||
stored = bldr.atomic_store(loaded, ptr, ordering)
|
||||
self.assertIn('store atomic', str(stored))
|
||||
self.assertEqual(ordering, str(stored).strip().split(' ')[-1])
|
||||
|
||||
fenced = bldr.fence(ordering)
|
||||
self.assertEqual(['fence', ordering], str(fenced).strip().split(' '))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue