• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

bulkDataNTPosixHelper.h

Go to the documentation of this file.
00001 #ifndef bulkDataNTPosixHelper_H
00002 #define bulkDataNTPosixHelper_H
00003 /*
00004  * @(#) $Id: bulkDataNTPosixHelper.h,v 1.1 2013/02/11 18:37:33 rbourtem Exp $
00005  *
00006  * Copyright (C) 2013
00007  * Associated Universities, Inc. Washington DC, USA.
00008  *
00009  * This library is free software; you can redistribute it and/or modify it
00010  * under the terms of the GNU Library General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or (at your
00012  * option) any later version.
00013  *
00014  * This library is free software; you can redistribute it and/or
00015  * modify it under the terms of the GNU Lesser General Public
00016  * License as published by the Free Software Foundation; either
00017  * version 2.1 of the License, or (at your option) any later version.
00018  * 
00019  * This library is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022  * Lesser General Public License for more details.
00023  * 
00024  * You should have received a copy of the GNU Lesser General Public
00025  * License along with this library; if not, write to the Free Software
00026  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00027  * Correspondence concerning ALMA Software should be addressed as follows:
00028  * Internet email: alma-sw-admin@nrao.edu
00029  */
00030 
00031 //
00032 // System stuff
00033 //
00034 #include <pthread.h>
00035 #include <semaphore.h>
00036 
00037 //
00038 // ACS stuff
00039 //
00040 #include <acstime.h>
00041 
00042 
00043 namespace AcsBulkdata
00044 {
00045 
00046 namespace Pthread
00047 {
00050 namespace CondVar
00051 {
00052 bool wait(pthread_cond_t &cond, pthread_mutex_t &mux, const ACS::TimeInterval to);
00053 };
00054 
00057 namespace Mutex
00058 {
00061 void init(pthread_mutex_t &m, const bool recursive);
00062 
00069 bool lock(const char *desc, pthread_mutex_t &m, const ACS::TimeInterval &to, bool logTimeout = false);
00070 
00076 bool unlock(const char *desc, pthread_mutex_t &m);
00077 
00081 bool unlock(pthread_mutex_t &m);
00082 };
00083 
00086 namespace Semaphore
00087 {
00090 bool lock(const char *desc, sem_t &s, const ACS::TimeInterval &to, bool logTimeout = false);
00091 
00096 bool post(const char *desc, sem_t &s);
00097 };
00098 };
00099 };
00100 
00101 #endif
00102 
00103 /*___oOo___*/

Generated on Mon May 4 2015 08:27:43 for ACS-2015.4 C++ API by  doxygen 1.7.0