#include <j2k/Net/TFTP/TFTP.hpp>
#include <j2k/Fred/JFile.cpp>
#include <j2k/Fred/Error/JError.cpp>
#include <j2k/Net/TFTP/TFTP_Project.cpp>
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
|
Definition at line 114 of file TFTP.cpp. 00115 { 00116 pthread_attr_t attr; 00117 sched_param param; 00118 00119 memset( &attr, 0, sizeof( attr ) ); 00120 memset( ¶m, 0, sizeof( param ) ); 00121 00122 pthread_attr_init( &attr ); 00123 pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM ); 00124 pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_JOINABLE ); 00125 pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 00126 pthread_attr_setschedparam( &attr, ¶m ); 00127 00128 param.sched_priority = 15; 00129 pthread_setschedparam( pthread_self(), SCHED_RR, ¶m ); 00130 00131 size_t q = 0; 00132 TFTP( argc, argv ); 00133 while( option.state != TFTP_Finished && !option.isEnding() ) 00134 { 00135 // q++; 00136 // if ( q > 100 ) { 00137 // printf("."); 00138 // q = 0; 00139 // } 00140 sched_yield(); // I'm lazy, let bright children run please. 00141 } 00142 return 0; 00143 } |