Changeset 8d66610 for tests/unified_locking/timeout_lock.cfa
- Timestamp:
- May 21, 2021, 4:48:10 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- f1bce515
- Parents:
- 5407cdc (diff), 7404cdc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
tests/unified_locking/timeout_lock.cfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/unified_locking/timeout_lock.cfa
r5407cdc r8d66610 33 33 34 34 for ( unsigned int i = 0; i < NoOfTimes + 3; i += 1 ) { 35 if ( wait( c_m, m, 1 `s ) ) {35 if ( wait( c_m, m, 1000000`ns ) ) { 36 36 // printf("Thread: %p signalled\n", active_thread()); // removed since can't expect non deterministic output 37 37 } else { … … 51 51 // Test calls which occur increasingly close to timeout value. 52 52 53 sleep( 100000 000`ns );53 sleep( 100000`ns ); 54 54 notify_one(c_m); 55 55 block(); 56 56 57 sleep( 500000 000`ns );57 sleep( 500000`ns ); 58 58 notify_one(c_m); 59 59 block(); 60 60 61 sleep( 900000 000`ns );61 sleep( 900000`ns ); 62 62 notify_one(c_m); 63 63 block(); 64 64 65 65 for ( unsigned int i = 0; i < NoOfTimes; i += 1 ) { 66 sleep( 999700 000`ns );66 sleep( 999700`ns ); 67 67 notify_one(c_m); 68 68 block(); … … 75 75 wait( c_m, 1`ns ); // bool wait( condition_variable(L) & this, Duration duration ); 76 76 wait( c_m, 10, 1`ns ); // bool wait( condition_variable(L) & this, uintptr_t info, Duration duration ); 77 wait( c_m, __kernel_get_time() + 1`ns ); // bool wait( condition_variable(L) & this, Time time );78 wait( c_m, 10, __kernel_get_time() + 1`ns ); // bool wait( condition_variable(L) & this, uintptr_t info, Time time );79 77 lock(m); wait( c_m, m, 1`ns ); unlock(m); // bool wait( condition_variable(L) & this, L & l, Duration duration ); 80 78 lock(m); wait( c_m, m, 10, 1`ns ); unlock(m); // bool wait( condition_variable(L) & this, L & l, uintptr_t info, Duration duration ); 81 lock(m); wait( c_m, m, __kernel_get_time() + 1`ns ); unlock(m); // bool wait( condition_variable(L) & this, L & l, Time time );82 lock(m); wait( c_m, m, 10, __kernel_get_time() + 1`ns ); unlock(m); // bool wait( condition_variable(L) & this, L & l, uintptr_t info, Time time );83 79 printf("Done Test 1\n"); 84 80
Note:
See TracChangeset
for help on using the changeset viewer.