You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
4.1 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: platformstl/synch/util/features.h
  3. *
  4. * Purpose: Discrimination of synchronisation features.
  5. *
  6. * Created: 15th January 2007
  7. * Updated: 10th August 2009
  8. *
  9. * Home: http://stlsoft.org/
  10. *
  11. * Copyright (c) 2007-2009, Matthew Wilson and Synesis Software
  12. * All rights reserved.
  13. *
  14. * Redistribution and use in source and binary forms, with or without
  15. * modification, are permitted provided that the following conditions are met:
  16. *
  17. * - Redistributions of source code must retain the above copyright notice, this
  18. * list of conditions and the following disclaimer.
  19. * - Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
  23. * any contributors may be used to endorse or promote products derived from
  24. * this software without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  27. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  30. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  31. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  32. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  33. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  34. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  35. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  36. * POSSIBILITY OF SUCH DAMAGE.
  37. *
  38. * ////////////////////////////////////////////////////////////////////// */
  39. /** \file platformstl/synch/util/features.h
  40. *
  41. * \brief [C, C++] Discrimination of synchronisation features
  42. * (\ref group__library__synch "Synchronisation" Library).
  43. */
  44. #ifndef PLATFORMSTL_INCL_PLATFORMSTL_SYNCH_UTIL_H_FEATURES
  45. #define PLATFORMSTL_INCL_PLATFORMSTL_SYNCH_UTIL_H_FEATURES
  46. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  47. # define PLATFORMSTL_VER_PLATFORMSTL_SYNCH_UTIL_H_FEATURES_MAJOR 1
  48. # define PLATFORMSTL_VER_PLATFORMSTL_SYNCH_UTIL_H_FEATURES_MINOR 1
  49. # define PLATFORMSTL_VER_PLATFORMSTL_SYNCH_UTIL_H_FEATURES_REVISION 2
  50. # define PLATFORMSTL_VER_PLATFORMSTL_SYNCH_UTIL_H_FEATURES_EDIT 5
  51. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  52. /* /////////////////////////////////////////////////////////////////////////
  53. * Includes
  54. */
  55. #ifndef PLATFORMSTL_INCL_PLATFORMSTL_H_PLATFORMSTL
  56. # include <platformstl/platformstl.h>
  57. #endif /* !PLATFORMSTL_INCL_PLATFORMSTL_H_PLATFORMSTL */
  58. #if defined(PLATFORMSTL_OS_IS_UNIX)
  59. # ifndef UNIXSTL_INCL_UNIXSTL_SYNCH_UTIL_H_FEATURES
  60. # include <unixstl/synch/util/features.h>
  61. # endif /* !UNIXSTL_INCL_UNIXSTL_SYNCH_UTIL_H_FEATURES */
  62. #elif defined(PLATFORMSTL_OS_IS_WINDOWS)
  63. #else /* ? operating system */
  64. # error Operating system not discriminated
  65. #endif /* operating system */
  66. /* /////////////////////////////////////////////////////////////////////////
  67. * Features
  68. */
  69. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  70. # ifdef PLATFORMSTL_HAS_ATOMIC_INTEGER_OPERATIONS
  71. # undef PLATFORMSTL_HAS_ATOMIC_INTEGER_OPERATIONS
  72. # endif /* PLATFORMSTL_HAS_ATOMIC_INTEGER_OPERATIONS */
  73. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  74. #if defined(PLATFORMSTL_OS_IS_UNIX)
  75. # ifdef UNIXSTL_HAS_ATOMIC_INTEGER_OPERATIONS
  76. # define PLATFORMSTL_HAS_ATOMIC_INTEGER_OPERATIONS
  77. # endif /* UNIXSTL_HAS_ATOMIC_INTEGER_OPERATIONS */
  78. #elif defined(PLATFORMSTL_OS_IS_WINDOWS)
  79. # define PLATFORMSTL_HAS_ATOMIC_INTEGER_OPERATIONS /* Windows always has it */
  80. #else /* ? operating system */
  81. # error Operating system not discriminated
  82. #endif /* operating system */
  83. /* ////////////////////////////////////////////////////////////////////// */
  84. #endif /* !PLATFORMSTL_INCL_PLATFORMSTL_SYNCH_UTIL_H_FEATURES */
  85. /* ///////////////////////////// end of file //////////////////////////// */