Changeset 6a6e205 for tests/concurrency/unified_locking
- Timestamp:
- Jan 13, 2025, 1:32:32 PM (8 months ago)
- Branches:
- master
- Children:
- c086c6e
- Parents:
- 267b543
- Location:
- tests/concurrency/unified_locking
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/unified_locking/mcs.cfa
r267b543 r6a6e205 22 22 unsigned cs() { 23 23 thread$ * me = active_thread(); 24 unsigned value = (u nsigned)me;24 unsigned value = (uintptr_t)me; 25 25 mcs_node n; 26 26 lock(mo.l, n); -
tests/concurrency/unified_locking/mcs_spin.cfa
r267b543 r6a6e205 32 32 mo.id = me; 33 33 yield(random(5)); 34 value = ((uint32_t)random()) ^ ((uint32_t) me);34 value = ((uint32_t)random()) ^ ((uint32_t)(uintptr_t)me); 35 35 if(mo.id != me) sout | "Intruder!"; 36 36 mo.cnt = cnt + 1; -
tests/concurrency/unified_locking/mutex_test.hfa
r267b543 r6a6e205 32 32 mo.id = me; 33 33 yield(random(5)); 34 value = ((uint32_t)random()) ^ ((uint32_t) me);34 value = ((uint32_t)random()) ^ ((uint32_t)(uintptr_t)me); 35 35 if(mo.id != me) sout | "Intruder!"; 36 36 mo.cnt = cnt + 1; -
tests/concurrency/unified_locking/timeout_lock.cfa
r267b543 r6a6e205 23 23 thread T1 {}; 24 24 25 void main( T1 & this) {25 void main( T1 & ) { 26 26 lock(m); 27 27 wait( c_m, m, 1`s ); … … 46 46 thread T2 {}; 47 47 48 void main( T2 & this) {48 void main( T2 & ) { 49 49 block(); 50 50
Note:
See TracChangeset
for help on using the changeset viewer.