cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
cisst
cisstOSAbstraction
osaThreadSignal.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4
/*
5
6
Author(s): Ankur Kapoor, Peter Kazanzides, Balazs Vagvolgyi, Anton Deguet
7
Created on: 2004-04-30
8
9
(C) Copyright 2004-2012 Johns Hopkins University (JHU), All Rights Reserved.
10
11
--- begin cisst license - do not edit ---
12
13
This software is provided "as is" under an open source license, with
14
no warranty. The complete license can be found in license.txt and
15
http://www.cisst.org/cisst/license.txt.
16
17
--- end cisst license ---
18
*/
19
20
26
27
#ifndef _osaThreadSignal_h
28
#define _osaThreadSignal_h
29
30
#include <
cisstCommon/cmnPortability.h
>
31
32
// Always include last
33
#include <
cisstOSAbstraction/osaExport.h
>
34
35
class
osaThreadId
;
36
37
/* forward declaration for OS dependent internals */
38
struct
osaThreadSignalInternals;
39
40
class
CISST_EXPORT
osaThreadSignal
41
{
42
public
:
43
osaThreadSignal
();
44
~osaThreadSignal
();
45
46
void
Wait
(
void
);
47
bool
Wait
(
double
timeoutInSec);
48
void
Raise
(
void
);
49
50
static
void
SetWaitCallbacks
(
const
osaThreadId
&threadId,
void
(*pre)(
void
),
void
(*post)(
void
));
51
53
void
ToStream
(std::ostream & outputStream)
const
;
54
55
private
:
57
osaThreadSignalInternals * Internals;
58
59
static
void (*PreCallback)(void);
60
static
void (*PostCallback)(void);
61
};
62
64
inline
65
std::ostream &
operator <<
(std::ostream & output,
66
const
osaThreadSignal
& threadSignal) {
67
threadSignal.
ToStream
(output);
68
return
output;
69
}
70
71
#endif
// _osaThreadSignal_h
72
osaThreadId
ThreadId type.
Definition
osaThread.h:77
osaThreadSignal
Definition
osaThreadSignal.h:41
osaThreadSignal::Wait
bool Wait(double timeoutInSec)
osaThreadSignal::Wait
void Wait(void)
osaThreadSignal::ToStream
void ToStream(std::ostream &outputStream) const
osaThreadSignal::~osaThreadSignal
~osaThreadSignal()
osaThreadSignal::Raise
void Raise(void)
osaThreadSignal::SetWaitCallbacks
static void SetWaitCallbacks(const osaThreadId &threadId, void(*pre)(void), void(*post)(void))
osaThreadSignal::osaThreadSignal
osaThreadSignal()
CISST_EXPORT
#define CISST_EXPORT
Definition
cmnExportMacros.h:50
cmnPortability.h
Portability across compilers and operating systems tools.
osaExport.h
Macros to export the symbols of cisstOSAbstraction (in a Dll).
operator<<
std::ostream & operator<<(std::ostream &output, const osaThreadSignal &threadSignal)
Definition
osaThreadSignal.h:65
Generated by
1.18.0