Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / library / BH / include / boost / asio / detail / impl / posix_tss_ptr.ipp @ 2486

History | View | Annotate | Download (1.2 kB)

1 2486 sjacqu01
//
2 2486 sjacqu01
// detail/impl/posix_tss_ptr.ipp
3 2486 sjacqu01
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 2486 sjacqu01
//
5 2486 sjacqu01
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 2486 sjacqu01
//
7 2486 sjacqu01
// Distributed under the Boost Software License, Version 1.0. (See accompanying
8 2486 sjacqu01
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 2486 sjacqu01
//
10 2486 sjacqu01
11 2486 sjacqu01
#ifndef BOOST_ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP
12 2486 sjacqu01
#define BOOST_ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP
13 2486 sjacqu01
14 2486 sjacqu01
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 2486 sjacqu01
# pragma once
16 2486 sjacqu01
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 2486 sjacqu01
18 2486 sjacqu01
#include <boost/asio/detail/config.hpp>
19 2486 sjacqu01
20 2486 sjacqu01
#if defined(BOOST_ASIO_HAS_PTHREADS)
21 2486 sjacqu01
22 2486 sjacqu01
#include <boost/asio/detail/posix_tss_ptr.hpp>
23 2486 sjacqu01
#include <boost/asio/detail/throw_error.hpp>
24 2486 sjacqu01
#include <boost/asio/error.hpp>
25 2486 sjacqu01
26 2486 sjacqu01
#include <boost/asio/detail/push_options.hpp>
27 2486 sjacqu01
28 2486 sjacqu01
namespace boost {
29 2486 sjacqu01
namespace asio {
30 2486 sjacqu01
namespace detail {
31 2486 sjacqu01
32 2486 sjacqu01
void posix_tss_ptr_create(pthread_key_t& key)
33 2486 sjacqu01
{
34 2486 sjacqu01
  int error = ::pthread_key_create(&key, 0);
35 2486 sjacqu01
  boost::system::error_code ec(error,
36 2486 sjacqu01
      boost::asio::error::get_system_category());
37 2486 sjacqu01
  boost::asio::detail::throw_error(ec, "tss");
38 2486 sjacqu01
}
39 2486 sjacqu01
40 2486 sjacqu01
} // namespace detail
41 2486 sjacqu01
} // namespace asio
42 2486 sjacqu01
} // namespace boost
43 2486 sjacqu01
44 2486 sjacqu01
#include <boost/asio/detail/pop_options.hpp>
45 2486 sjacqu01
46 2486 sjacqu01
#endif // defined(BOOST_ASIO_HAS_PTHREADS)
47 2486 sjacqu01
48 2486 sjacqu01
#endif // BOOST_ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP