Changeset f3c1737
- Timestamp:
- Jul 6, 2017, 4:19:42 PM (7 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:
- 3873b5a1
- Parents:
- 955d27e9
- Location:
- src/tests
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/preempt_longrun/Makefile.am
r955d27e9 rf3c1737 10 10 ## Author : Thierry Delisle 11 11 ## Created On : Fri Jun 16 10:57:34 2017 12 ## Last Modified By : 13 ## Last Modified On : 12 ## Last Modified By : 13 ## Last Modified On : 14 14 ## Update Count : 0 15 15 ############################################################################### … … 17 17 repeats=10 18 18 max_time=30 19 preempt=1 0_000ul19 preempt=1_000ul 20 20 21 21 REPEAT = ${abs_top_srcdir}/tools/repeat -s … … 25 25 CC = @CFA_BINDIR@/@CFA_NAME@ 26 26 27 TESTS = barge block create disjoint processor stack wait yield27 TESTS = barge block create disjoint enter enter3 processor stack wait yield 28 28 29 29 .INTERMEDIATE: ${TESTS} -
src/tests/preempt_longrun/Makefile.in
r955d27e9 rf3c1737 450 450 repeats = 10 451 451 max_time = 30 452 preempt = 1 0_000ul452 preempt = 1_000ul 453 453 REPEAT = ${abs_top_srcdir}/tools/repeat -s 454 454 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -DPREEMPTION_RATE=${preempt} 455 TESTS = barge block create disjoint processor stack wait yield455 TESTS = barge block create disjoint enter enter3 processor stack wait yield 456 456 all: all-am 457 457 … … 663 663 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ 664 664 "$$tst" $(AM_TESTS_FD_REDIRECT) 665 enter.log: enter 666 @p='enter'; \ 667 b='enter'; \ 668 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ 669 --log-file $$b.log --trs-file $$b.trs \ 670 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ 671 "$$tst" $(AM_TESTS_FD_REDIRECT) 672 enter3.log: enter3 673 @p='enter3'; \ 674 b='enter3'; \ 675 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ 676 --log-file $$b.log --trs-file $$b.trs \ 677 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ 678 "$$tst" $(AM_TESTS_FD_REDIRECT) 665 679 processor.log: processor 666 680 @p='processor'; \ -
src/tests/preempt_longrun/create.c
r955d27e9 rf3c1737 15 15 16 16 int main(int argc, char* argv[]) { 17 for(int i = 0; i < 100_000ul; i++) {17 for(int i = 0; i < 250_000ul; i++) { 18 18 Worker w; 19 19 } -
src/tests/preempt_longrun/enter.c
r955d27e9 rf3c1737 4 4 5 5 #undef N 6 static const unsigned long N = 50_000ul;6 static const unsigned long N = 70_000ul; 7 7 8 8 #ifndef PREEMPTION_RATE -
src/tests/preempt_longrun/processor.c
r955d27e9 rf3c1737 15 15 16 16 int main(int argc, char* argv[]) { 17 for(int i = 0; i < 10 0_000ul; i++) {17 for(int i = 0; i < 10_000ul; i++) { 18 18 processor p; 19 19 } -
src/tests/preempt_longrun/yield.c
r955d27e9 rf3c1737 13 13 14 14 void main(Worker * this) { 15 for(int i = 0; i < 100_000ul; i++) {15 for(int i = 0; i < 325_000ul; i++) { 16 16 yield(); 17 17 } -
src/tests/sched-int-block.c
r955d27e9 rf3c1737 6 6 7 7 #ifndef N 8 #define N 10 0_0008 #define N 10_000 9 9 #endif 10 10 -
src/tests/sched-int-wait.c
r955d27e9 rf3c1737 50 50 unsigned action = (unsigned)rand48() % 4; 51 51 switch( action ) { 52 case 0: 52 case 0: 53 53 signal( &condABC, &globalA, &globalB, &globalC ); 54 54 break; 55 case 1: 55 case 1: 56 56 signal( &condAB , &globalA, &globalB ); 57 57 break; 58 case 2: 58 case 2: 59 59 signal( &condBC , &globalB, &globalC ); 60 60 break; 61 case 3: 61 case 3: 62 62 signal( &condAC , &globalA, &globalC ); 63 63 break; … … 67 67 } 68 68 yield(); 69 } 69 } 70 70 } 71 71 -
src/tests/thread.c
r955d27e9 rf3c1737 4 4 #include <thread> 5 5 6 // thread First;7 // void main(First* this);6 thread First { semaphore* lock; }; 7 thread Second { semaphore* lock; }; 8 8 9 // thread Second; 10 // void main(Second* this); 11 12 thread First { signal_once* lock; }; 13 thread Second { signal_once* lock; }; 14 15 void ?{}( First * this, signal_once* lock ) { this->lock = lock; } 16 void ?{}( Second * this, signal_once* lock ) { this->lock = lock; } 9 void ?{}( First * this, semaphore* lock ) { this->lock = lock; } 10 void ?{}( Second * this, semaphore* lock ) { this->lock = lock; } 17 11 18 12 void main(First* this) { … … 21 15 yield(); 22 16 } 23 signal(this->lock);17 V(this->lock); 24 18 } 25 19 26 20 void main(Second* this) { 27 wait(this->lock);21 P(this->lock); 28 22 for(int i = 0; i < 10; i++) { 29 23 sout | "Second : Suspend No." | i + 1 | endl; … … 34 28 35 29 int main(int argc, char* argv[]) { 36 s ignal_once lock;30 semaphore lock = { 0 }; 37 31 sout | "User main begin" | endl; 38 32 {
Note: See TracChangeset
for help on using the changeset viewer.