@@ -362,49 +362,6 @@ static void notify_race_completed(void) {
362
362
} \
363
363
static void race_name ##_iter (int vn_participant , struct one_race * vn_race ) /* NOLINT */
364
364
365
- /*
366
- * See http://www.cs.cmu.edu/~410-f10/doc/Intel_Reordering_318147.pdf #2.3
367
- */
368
- DEFINE_RACE (loads_reordered_with_older_stores , participant , race ) {
369
- struct aws_atomic_var * my_var = race -> vars [participant ];
370
- struct aws_atomic_var * their_var = race -> vars [1 - participant ];
371
- struct aws_atomic_var * observed = race -> observations [participant ];
372
- /*
373
- * This test may fail with any other ordering, even on the relatively relaxed x86 architecture.
374
- * This failure seems relatively easy to reproduce, so this is a good way to test for seq_cst ordering.
375
- */
376
- enum aws_memory_order store_order = aws_memory_order_seq_cst ;
377
- enum aws_memory_order load_order = aws_memory_order_seq_cst ;
378
-
379
- aws_atomic_store_int_explicit (my_var , 1 , store_order );
380
- aws_atomic_store_int_explicit (
381
- observed , aws_atomic_load_int_explicit (their_var , load_order ), aws_memory_order_relaxed );
382
- }
383
-
384
- AWS_TEST_CASE (atomics_loads_reordered_with_older_stores , t_loads_reordered_with_older_stores )
385
- static int t_loads_reordered_with_older_stores (struct aws_allocator * allocator , void * ctx ) {
386
- (void )ctx ;
387
-
388
- struct aws_atomic_var template [2 ];
389
- size_t last_race ;
390
- aws_atomic_init_int (& template [0 ], 0 );
391
- aws_atomic_init_int (& template [1 ], 0 );
392
-
393
- setup_races (allocator , 100000 , 2 , 2 , template , template );
394
- run_races (& last_race , allocator , 2 , loads_reordered_with_older_stores );
395
-
396
- for (size_t i = 0 ; i < last_race ; i ++ ) {
397
- size_t a = aws_atomic_load_int_explicit (races [i ].observations [0 ], aws_memory_order_relaxed );
398
- size_t b = aws_atomic_load_int_explicit (races [i ].observations [1 ], aws_memory_order_relaxed );
399
-
400
- ASSERT_TRUE (a || b , "Race at iteration %zu" , i );
401
- }
402
-
403
- free_races (allocator );
404
-
405
- return 0 ;
406
- }
407
-
408
365
/*
409
366
* The following race races these two threads:
410
367
*
0 commit comments