Changeset 3f7e12cb for src/tests/sched-int-barge.c
- Timestamp:
- Nov 8, 2017, 5:43:33 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 954908d
- Parents:
- 78315272 (diff), e35f30a (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
Legend:
- Unmodified
- Added
- Removed
-
src/tests/sched-int-barge.c
r78315272 r3f7e12cb 1 //---------------------------------------------------------------------------------------- 2 //---------------------------------------------------------------------------------------- 3 // 4 // DEPRECATED TEST 5 // 6 //---------------------------------------------------------------------------------------- 7 //---------------------------------------------------------------------------------------- 8 1 9 #include <fstream> 2 10 #include <kernel> … … 56 64 57 65 if( action == 0 ) { 58 c.do_signal = max( ((unsigned)rand48()) % 10, 1);59 c.do_wait1 = ((unsigned)rand48()) % (c.do_signal);60 c.do_wait2 = ((unsigned)rand48()) % (c.do_signal);66 c.do_signal = max( random( 10 ), 1); 67 c.do_wait1 = random( c.do_signal ); 68 c.do_wait2 = random( c.do_signal ); 61 69 62 70 if(c.do_wait1 == c.do_wait2) sout | "Same" | endl; … … 65 73 if( action == c.do_wait1 || action == c.do_wait2 ) { 66 74 c.state = WAIT; 67 wait( &cond );75 wait( cond ); 68 76 69 77 if(c.state != SIGNAL) { … … 75 83 c.state = SIGNAL; 76 84 77 signal( &cond );78 signal( &cond );85 signal( cond ); 86 signal( cond ); 79 87 } 80 88 else { … … 101 109 102 110 int main(int argc, char* argv[]) { 103 rand 48seed(0);111 random_seed(0); 104 112 processor p; 105 113 {
Note:
See TracChangeset
for help on using the changeset viewer.