host-config.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* Copyright (C) 2014-2015 Free Software Foundation, Inc.
  2. Contributed by Kai Tietz <ktietz@redhat.com>.
  3. This file is part of the GNU Atomic Library (libatomic).
  4. Libatomic is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. Libatomic is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  10. FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. more details.
  12. Under Section 7 of GPL version 3, you are granted additional
  13. permissions described in the GCC Runtime Library Exception, version
  14. 3.1, as published by the Free Software Foundation.
  15. You should have received a copy of the GNU General Public License and
  16. a copy of the GCC Runtime Library Exception along with this program;
  17. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  18. <http://www.gnu.org/licenses/>. */
  19. /* Included after all more target-specific host-config.h. */
  20. #ifndef protect_start_end
  21. # ifdef HAVE_ATTRIBUTE_VISIBILITY
  22. # pragma GCC visibility push(hidden)
  23. # endif
  24. void libat_lock_1 (void *ptr);
  25. void libat_unlock_1 (void *ptr);
  26. static inline UWORD
  27. protect_start (void *ptr)
  28. {
  29. libat_lock_1 (ptr);
  30. return 0;
  31. }
  32. static inline void
  33. protect_end (void *ptr, UWORD dummy UNUSED)
  34. {
  35. libat_unlock_1 (ptr);
  36. }
  37. # define protect_start_end 1
  38. # ifdef HAVE_ATTRIBUTE_VISIBILITY
  39. # pragma GCC visibility pop
  40. # endif
  41. #endif /* protect_start_end */
  42. #include_next <host-config.h>