Use C++ isostream in JackEngineProfiling class.
[jack2.git] / windows / JackWinProcessSync.h
blob33a340c9224fa8d9edddd7e83295a685c39838f5
1 /*
2 Copyright (C) 2004-2006 Grame
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 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __JackWinProcessSync__
21 #define __JackWinProcessSync__
23 #include "JackWinMutex.h"
25 namespace Jack
28 /*!
29 \brief A synchronization primitive built using a condition variable.
32 class JackWinProcessSync : public JackWinMutex
35 private:
37 HANDLE fEvent;
39 public:
41 JackWinProcessSync():JackWinMutex()
43 fEvent = (HANDLE)CreateEvent(NULL, FALSE, FALSE, NULL);
45 ~JackWinProcessSync()
47 CloseHandle(fEvent);
50 bool TimedWait(long usec);
51 bool LockedTimedWait(long usec);
53 void Wait();
54 void LockedWait();
56 void Signal();
57 void LockedSignal();
59 void SignalAll();
60 void LockedSignalAll();
63 } // end of namespace
65 #endif