The vbs tools - vbs_ls, vbs_rm, vbs_fs - for listing, removing and mounting vbs and Mark6 format scattered VLBI recordings on FlexBuff and Mark6 systems
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

64 lines
1.8 KiB

  1. // implementation
  2. // Copyright (C) 2007-2008 Harro Verkouter
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful, but WITHOUT ANY
  10. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11. // PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. //
  13. // You should have received a copy of the GNU General Public License
  14. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. //
  16. // Author: Harro Verkouter - verkouter@jive.nl
  17. // Joint Institute for VLBI in Europe
  18. // P.O. Box 2
  19. // 7990 AA Dwingeloo
  20. #include <iostream>
  21. // Yah we rly need to lock during outputting stuff
  22. // to the screen ...
  23. #include <pthread.h>
  24. // for ::strerror()
  25. #include <string.h>
  26. static int dbglev_val = 0;
  27. // if msglevel>fnthres_val level => functionnames are printed in DEBUG()
  28. static int fnthres_val = 5;
  29. static pthread_mutex_t evlbidebug_cerr_lock = PTHREAD_MUTEX_INITIALIZER;
  30. int dbglev_fn( void ) {
  31. return dbglev_val;
  32. }
  33. int dbglev_fn( int n ) {
  34. int rv = dbglev_val;
  35. dbglev_val = n;
  36. return rv;
  37. }
  38. int fnthres_fn( void ) {
  39. return fnthres_val;
  40. }
  41. int fnthres_fn( int n ) {
  42. int rv = fnthres_val;
  43. fnthres_val = n;
  44. return rv;
  45. }
  46. void do_cerr_lock( void ) {
  47. int rv;
  48. if( (rv=::pthread_mutex_lock(&evlbidebug_cerr_lock))!=0 )
  49. std::cerr << "do_cerr_lock() failed - " << ::strerror(rv) << std::endl;
  50. }
  51. void do_cerr_unlock( void ) {
  52. int rv;
  53. if( (rv=::pthread_mutex_unlock(&evlbidebug_cerr_lock))!=0 )
  54. std::cerr << "do_cerr_unlock() failed - " << ::strerror(rv) << std::endl;
  55. }