Home | History | Annotate | Download | only in offline_tests
      1 # Start thread T0.
      2 THR_START 0 0 0 0
      3 
      4 
      5 # Create two locks.
      6 LOCK_CREATE 0 ff0 7777 0
      7 LOCK_CREATE 0 ff1 7778 0
      8 
      9 
     10 # Start thread T1
     11 THR_START 1 ff 0 0
     12 
     13 # Call few functions in T0
     14 RTN_CALL 0 ca000001 ca000002 0
     15 RTN_CALL 0 ca000002 ca000003 0
     16 
     17 # Call few functions in T1
     18 RTN_CALL 1 ca100001 ca100002 0
     19 RTN_CALL 1 ca100002 ca100003 0
     20 
     21 # Allocate 0xff bytes of memory in T0
     22 MALLOC 0 cdeffedc abcd0 ff
     23 
     24 # Malloc some more (unrelated)
     25 MALLOC 0 cdeffedc ccc ff
     26 MALLOC 0 cdeffedc cccccccc ff
     27 
     28 # Acquire lock 7777 in T0
     29 WRITER_LOCK 0 aa 7777 0
     30 
     31 # Write to 0xabcde in T0
     32 SBLOCK_ENTER 0 ca000003 0 0
     33 WRITE 0 aa008001 abcde 1
     34 
     35 # Acquire reader lock 7778 in T1
     36 READER_LOCK 1 bb 7778 0
     37 
     38 ##############
     39 # Race here: #
     40 ##############
     41 #
     42 # Read 0xabcde in T1
     43 READ 1 aa108001 abcde 1
     44