Changeset 62006a3
- Timestamp:
- Jun 1, 2021, 4:06:30 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- a804f81
- Parents:
- bc179fd3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/unified_locking/fast.cfa
rbc179fd3 r62006a3 8 8 fast_lock l; 9 9 $thread * id; 10 size_t sum;10 uint32_t sum; 11 11 }; 12 12 … … 20 20 } 21 21 22 u nsignedcs() {22 uint32_t cs() { 23 23 $thread * me = active_thread(); 24 u nsigned value = (unsigned)me;24 uint32_t value = (uint32_t)me; 25 25 lock(mo.l); 26 26 { 27 size_t tsum = mo.sum;27 uint32_t tsum = mo.sum; 28 28 mo.id = me; 29 29 yield(random(5)); … … 36 36 37 37 thread LockCheck { 38 size_t sum;38 uint32_t sum; 39 39 }; 40 40 … … 50 50 51 51 int main() { 52 size_t sum = -32;52 uint32_t sum = -32; 53 53 mo.sum = -32; 54 54 processor p[2];
Note: See TracChangeset
for help on using the changeset viewer.