Commit 1d7b633a authored by Pavel Vainerman's avatar Pavel Vainerman

Добавил "ускорение" для потоков в/в (std::ios::sync_with_stdio(false);)

во все запускаемые программы.
parent a77d88a8
...@@ -35,6 +35,7 @@ static char* checkArg( int ind, int argc, char* argv[] ); ...@@ -35,6 +35,7 @@ static char* checkArg( int ind, int argc, char* argv[] );
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
std::ios::sync_with_stdio(false);
int optindex = 0; int optindex = 0;
int opt = 0; int opt = 0;
int verb = 0; int verb = 0;
......
...@@ -96,6 +96,7 @@ static char* checkArg( int ind, int argc, char* argv[] ); ...@@ -96,6 +96,7 @@ static char* checkArg( int ind, int argc, char* argv[] );
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
std::ios::sync_with_stdio(false);
Command cmd = cmdNOP; Command cmd = cmdNOP;
int optindex = 0; int optindex = 0;
int opt = 0; int opt = 0;
......
...@@ -31,7 +31,8 @@ static void print_help() ...@@ -31,7 +31,8 @@ static void print_help()
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
std::ios::sync_with_stdio(false);
int optindex = 0; int optindex = 0;
int opt = 0; int opt = 0;
int verb = 0; int verb = 0;
......
...@@ -33,6 +33,7 @@ static void print_help() ...@@ -33,6 +33,7 @@ static void print_help()
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
std::ios::sync_with_stdio(false);
int optindex = 0; int optindex = 0;
int opt = 0; int opt = 0;
int verb = 0; int verb = 0;
......
...@@ -75,6 +75,7 @@ static char* checkArg( int ind, int argc, char* argv[] ); ...@@ -75,6 +75,7 @@ static char* checkArg( int ind, int argc, char* argv[] );
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
std::ios::sync_with_stdio(false);
Command cmd = cmdNOP; Command cmd = cmdNOP;
int optindex = 0; int optindex = 0;
int opt = 0; int opt = 0;
......
...@@ -21,6 +21,7 @@ static void short_usage() ...@@ -21,6 +21,7 @@ static void short_usage()
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
std::ios::sync_with_stdio(false);
try try
{ {
if( argc <=1 ) if( argc <=1 )
......
...@@ -25,6 +25,7 @@ struct ExtInfo: ...@@ -25,6 +25,7 @@ struct ExtInfo:
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
std::ios::sync_with_stdio(false);
try try
{ {
// help // help
......
...@@ -9,6 +9,7 @@ using namespace std; ...@@ -9,6 +9,7 @@ using namespace std;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
int main( int argc, const char **argv ) int main( int argc, const char **argv )
{ {
std::ios::sync_with_stdio(false);
try try
{ {
if( argc>1 && ( !strcmp(argv[1],"--help") || !strcmp(argv[1],"-h") ) ) if( argc>1 && ( !strcmp(argv[1],"--help") || !strcmp(argv[1],"-h") ) )
......
...@@ -13,6 +13,7 @@ static void short_usage() ...@@ -13,6 +13,7 @@ static void short_usage()
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main(int argc, const char **argv) int main(int argc, const char **argv)
{ {
std::ios::sync_with_stdio(false);
try try
{ {
if( argc > 1 && !strcmp(argv[1],"--help") ) if( argc > 1 && !strcmp(argv[1],"--help") )
......
...@@ -13,6 +13,7 @@ static void short_usage() ...@@ -13,6 +13,7 @@ static void short_usage()
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
std::ios::sync_with_stdio(false);
try try
{ {
if( argc > 1 && !strcmp(argv[1],"--help") ) if( argc > 1 && !strcmp(argv[1],"--help") )
......
...@@ -13,6 +13,7 @@ static void short_usage() ...@@ -13,6 +13,7 @@ static void short_usage()
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
std::ios::sync_with_stdio(false);
try try
{ {
if( argc > 1 && !strcmp(argv[1],"--help") ) if( argc > 1 && !strcmp(argv[1],"--help") )
......
...@@ -75,6 +75,7 @@ static struct option longopts[] = { ...@@ -75,6 +75,7 @@ static struct option longopts[] = {
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
std::ios::sync_with_stdio(false);
comedi_t* card; comedi_t* card;
const char* dev = "/dev/comedi0"; const char* dev = "/dev/comedi0";
lsampl_t data = 0; lsampl_t data = 0;
......
...@@ -10,7 +10,8 @@ using namespace std; ...@@ -10,7 +10,8 @@ using namespace std;
using namespace UniSetExtensions; using namespace UniSetExtensions;
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main(int argc, const char **argv) int main(int argc, const char **argv)
{ {
std::ios::sync_with_stdio(false);
if( argc>1 && strcmp(argv[1],"--help")==0 ) if( argc>1 && strcmp(argv[1],"--help")==0 )
{ {
cout << "--io-confile - Использовать указанный конф. файл. По умолчанию configure.xml" << endl; cout << "--io-confile - Использовать указанный конф. файл. По умолчанию configure.xml" << endl;
......
...@@ -9,6 +9,7 @@ using namespace UniSetExtensions; ...@@ -9,6 +9,7 @@ using namespace UniSetExtensions;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
int main(int argc, const char **argv) int main(int argc, const char **argv)
{ {
std::ios::sync_with_stdio(false);
try try
{ {
auto conf = uniset_init( argc, argv ); auto conf = uniset_init( argc, argv );
......
...@@ -11,6 +11,7 @@ using namespace UniSetExtensions; ...@@ -11,6 +11,7 @@ using namespace UniSetExtensions;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
int main(int argc, const char **argv) int main(int argc, const char **argv)
{ {
std::ios::sync_with_stdio(false);
try try
{ {
auto conf = uniset_init( argc, argv ); auto conf = uniset_init( argc, argv );
......
...@@ -11,6 +11,7 @@ using namespace UniSetExtensions; ...@@ -11,6 +11,7 @@ using namespace UniSetExtensions;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
int main( int argc, const char** argv ) int main( int argc, const char** argv )
{ {
std::ios::sync_with_stdio(false);
if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) ) if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) )
{ {
cout << "--smemory-id objectName - SharedMemory objectID. Default: autodetect" << endl; cout << "--smemory-id objectName - SharedMemory objectID. Default: autodetect" << endl;
......
...@@ -13,7 +13,8 @@ static void print_help() ...@@ -13,7 +13,8 @@ static void print_help()
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main( int argc, const char **argv ) int main( int argc, const char **argv )
{ {
std::ios::sync_with_stdio(false);
unsigned short v1 = 0; unsigned short v1 = 0;
unsigned short v2 = 0; unsigned short v2 = 0;
const char* type=""; const char* type="";
......
...@@ -57,6 +57,7 @@ static void readMTR( ModbusRTUMaster* mb, ModbusRTU::ModbusAddr addr, ...@@ -57,6 +57,7 @@ static void readMTR( ModbusRTUMaster* mb, ModbusRTU::ModbusAddr addr,
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
std::ios::sync_with_stdio(false);
Command cmd = cmdNOP; Command cmd = cmdNOP;
int optindex = 0; int optindex = 0;
int opt = 0; int opt = 0;
......
...@@ -73,6 +73,7 @@ static char* checkArg( int ind, int argc, char* argv[] ); ...@@ -73,6 +73,7 @@ static char* checkArg( int ind, int argc, char* argv[] );
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
std::ios::sync_with_stdio(false);
Command cmd = cmdNOP; Command cmd = cmdNOP;
int optindex = 0; int optindex = 0;
int opt = 0; int opt = 0;
......
...@@ -9,6 +9,7 @@ using namespace UniSetExtensions; ...@@ -9,6 +9,7 @@ using namespace UniSetExtensions;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
int main( int argc, char** argv ) int main( int argc, char** argv )
{ {
std::ios::sync_with_stdio(false);
try try
{ {
if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) ) if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) )
......
...@@ -15,7 +15,7 @@ using namespace std; ...@@ -15,7 +15,7 @@ using namespace std;
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main(int argc, const char **argv) int main(int argc, const char **argv)
{ {
std::ios::sync_with_stdio(false);
if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) ) if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) )
{ {
cout << "--smemory-id objectName - SharedMemory objectID. Default: autodetect" << endl; cout << "--smemory-id objectName - SharedMemory objectID. Default: autodetect" << endl;
......
...@@ -15,7 +15,7 @@ using namespace std; ...@@ -15,7 +15,7 @@ using namespace std;
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main(int argc, const char **argv) int main(int argc, const char **argv)
{ {
std::ios::sync_with_stdio(false);
if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) ) if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) )
{ {
cout << "--smemory-id objectName - SharedMemory objectID. Default: autodetect" << endl; cout << "--smemory-id objectName - SharedMemory objectID. Default: autodetect" << endl;
......
...@@ -11,6 +11,7 @@ using namespace UniSetExtensions; ...@@ -11,6 +11,7 @@ using namespace UniSetExtensions;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
int main( int argc, const char** argv ) int main( int argc, const char** argv )
{ {
std::ios::sync_with_stdio(false);
if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) ) if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) )
{ {
cout << "--smemory-id objectName - SharedMemory objectID. Default: autodetect" << endl; cout << "--smemory-id objectName - SharedMemory objectID. Default: autodetect" << endl;
......
...@@ -10,13 +10,15 @@ using namespace UniSetExtensions; ...@@ -10,13 +10,15 @@ using namespace UniSetExtensions;
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
int main(int argc, const char **argv) int main(int argc, const char **argv)
{ {
std::ios::sync_with_stdio(false);
if( argc>1 && ( strcmp(argv[1],"--help")==0 || strcmp(argv[1],"-h")==0 ) ) if( argc>1 && ( strcmp(argv[1],"--help")==0 || strcmp(argv[1],"-h")==0 ) )
{ {
cout << "--confile - Использовать указанный конф. файл. По умолчанию configure.xml" << endl; cout << "--confile - Использовать указанный конф. файл. По умолчанию configure.xml" << endl;
SharedMemory::help_print(argc, argv); SharedMemory::help_print(argc, argv);
return 0; return 0;
} }
try try
{ {
auto conf = uniset_init(argc, argv); auto conf = uniset_init(argc, argv);
......
...@@ -5,6 +5,6 @@ export LD_LIBRARY_PATH="../../lib/.libs;../lib/.libs" ...@@ -5,6 +5,6 @@ export LD_LIBRARY_PATH="../../lib/.libs;../lib/.libs"
ulimit -Sc 10000000000 ulimit -Sc 10000000000
./uniset2-start.sh -f ./uniset2-smemory --smemory-id SharedMemory --pulsar-id DO_C --pulsar-iotype DO --pulsar-msec 100 \ ./uniset2-start.sh -f ./uniset2-smemory --smemory-id SharedMemory --pulsar-id DO_C --pulsar-iotype DO --pulsar-msec 100 \
--confile test.xml --datfile test.xml --db-logging 1 \ --confile test.xml --datfile test.xml --db-logging 1 $* \
#--ulog-add-levels info,crit,warn,level9,system \ #--ulog-add-levels info,crit,warn,level9,system \
#--dlog-add-levels info,crit,warn \ #--dlog-add-levels info,crit,warn \
...@@ -59,12 +59,13 @@ void activator_terminate( int signo ) ...@@ -59,12 +59,13 @@ void activator_terminate( int signo )
int main( int argc, const char **argv ) int main( int argc, const char **argv )
{ {
std::ios::sync_with_stdio(false);
if( argc>1 && ( strcmp(argv[1],"--help")==0 || strcmp(argv[1],"-h")==0 ) ) if( argc>1 && ( strcmp(argv[1],"--help")==0 || strcmp(argv[1],"-h")==0 ) )
{ {
help_print( argc, argv ); help_print( argc, argv );
return 0; return 0;
} }
try try
{ {
auto conf = uniset_init(argc, argv); auto conf = uniset_init(argc, argv);
......
...@@ -9,6 +9,7 @@ using namespace UniSetExtensions; ...@@ -9,6 +9,7 @@ using namespace UniSetExtensions;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
int main( int argc, const char** argv ) int main( int argc, const char** argv )
{ {
std::ios::sync_with_stdio(false);
try try
{ {
if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) ) if( argc>1 && (!strcmp(argv[1],"--help") || !strcmp(argv[1],"-h")) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment