X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=test%2Fapp_test%2Freceiver.c;h=3cf1498035f3d0873b1016e2ca2f3aa4efc9725c;hb=2596b2305f214efbd7aba832fa009217ab854770;hp=ed2450b422326c25fcb25a1d063344758d1b5507;hpb=a41c6f5f26b3a44009f4aff3df3f83b9a79ace01;p=ric-plt%2Flib%2Frmr.git diff --git a/test/app_test/receiver.c b/test/app_test/receiver.c index ed2450b..3cf1498 100644 --- a/test/app_test/receiver.c +++ b/test/app_test/receiver.c @@ -47,6 +47,12 @@ RMR_SEED_RT -- path to the static routing table RMR_RTG_SVC -- port to listen for RTG connections + Compile time options + if -DMTC is defined on the compile command, then RMr is initialised + with the multi-threaded receive thread rather than using the same + process receive function. All other functions in the receiver are + the same. + Date: 18 April 2019 Author: E. Scott Daniels */ @@ -125,7 +131,13 @@ int main( int argc, char** argv ) { fprintf( stderr, " listening on port: %s for a max of %d messages\n", listen_port, nmsgs ); +#ifdef MTC + fprintf( stderr, " starting in multi-threaded mode\n" ); + mrc = rmr_init( listen_port, RMR_MAX_RCV_BYTES, RMRFL_MTCALL ); // start RMr in mt-receive mode +#else + fprintf( stderr, " starting in direct receive mode\n" ); mrc = rmr_init( listen_port, RMR_MAX_RCV_BYTES, RMRFL_NONE ); // start your engines! +#endif if( mrc == NULL ) { fprintf( stderr, " ABORT: unable to initialise RMr\n" ); exit( 1 );