Line | |
---|
1 | // (C) Copyright Mac Murrett 2001. |
---|
2 | // Use, modification and distribution are subject to the |
---|
3 | // Boost Software License, Version 1.0. (See accompanying file |
---|
4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
---|
5 | |
---|
6 | // See http://www.boost.org for most recent version. |
---|
7 | |
---|
8 | #include "ot_context.hpp" |
---|
9 | |
---|
10 | #include "execution_context.hpp" |
---|
11 | |
---|
12 | |
---|
13 | #include <cassert> |
---|
14 | |
---|
15 | |
---|
16 | namespace boost { |
---|
17 | |
---|
18 | namespace threads { |
---|
19 | |
---|
20 | namespace mac { |
---|
21 | |
---|
22 | namespace detail { |
---|
23 | |
---|
24 | |
---|
25 | ot_context::ot_context() |
---|
26 | { |
---|
27 | assert(at_st()); |
---|
28 | |
---|
29 | OSStatus lStatus = InitOpenTransportInContext(0UL, &m_pContext); |
---|
30 | // TODO - throw on error |
---|
31 | assert(lStatus == noErr); |
---|
32 | } |
---|
33 | |
---|
34 | ot_context::~ot_context() |
---|
35 | { |
---|
36 | CloseOpenTransportInContext(m_pContext); |
---|
37 | } |
---|
38 | |
---|
39 | |
---|
40 | } // namespace detail |
---|
41 | |
---|
42 | } // namespace mac |
---|
43 | |
---|
44 | } // namespace threads |
---|
45 | |
---|
46 | } // namespace boost |
---|
Note: See
TracBrowser
for help on using the repository browser.