#include <j2k/Fred/Standard.hpp>#include <j2k/nto/Basic_PThread.hpp>#include <j2k/nto/Mutex.hpp>Go to the source code of this file.
Compounds | |
| class | Fred |
Defines | |
| #define | MAX 100 |
Functions | |
| int | main (int argc=0, char *argv[]=NULL) |
Variables | |
| Mutex | ml |
| int | p = 100 |
|
|
Definition at line 25 of file Basic_Test.cpp. |
|
||||||||||||
|
Definition at line 51 of file Basic_Test.cpp. 00052 {
00053 Fred* t1 = new Fred( "1", 10 );
00054 Fred* t2 = new Fred( "2", -20 );
00055 Fred* t3 = new Fred( "3", -20 );
00056 Fred* t4 = new Fred( "4", -20 );
00057 Fred* t5 = new Fred( "5", -20 );
00058
00059 t1->start();
00060 t2->start();
00061 t3->start();
00062 t4->start();
00063 t5->start();
00064
00065 t1->join();
00066 t2->join();
00067 t3->join();
00068 t4->join();
00069 t5->join();
00070
00071 printf("t1-5 started.\n\n");
00072
00073 int max = MAX;
00074
00075 setprio( 0, getprio( 0 ) - 1 );
00076
00077 for( int i = 0; i < max; i++ ) {
00078 printf( "." );
00079 sched_yield();
00080 }
00081
00082 return 0;
00083 }
|
|
|
Definition at line 27 of file Basic_Test.cpp. |
|
|
Definition at line 28 of file Basic_Test.cpp. Referenced by main().
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001