hosthooks-def.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Default macros to initialize the lang_hooks data structure.
  2. Copyright (C) 2003-2019 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3, or (at your option)
  7. any later version.
  8. GCC is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef GCC_HOST_HOOKS_DEF_H
  16. #define GCC_HOST_HOOKS_DEF_H
  17. #include "hooks.h"
  18. #define HOST_HOOKS_EXTRA_SIGNALS hook_void_void
  19. #if HAVE_MMAP_FILE
  20. #define HOST_HOOKS_GT_PCH_GET_ADDRESS mmap_gt_pch_get_address
  21. #define HOST_HOOKS_GT_PCH_USE_ADDRESS mmap_gt_pch_use_address
  22. #else
  23. #define HOST_HOOKS_GT_PCH_GET_ADDRESS default_gt_pch_get_address
  24. #define HOST_HOOKS_GT_PCH_USE_ADDRESS default_gt_pch_use_address
  25. #endif
  26. #define HOST_HOOKS_GT_PCH_ALLOC_GRANULARITY \
  27. default_gt_pch_alloc_granularity
  28. extern void* default_gt_pch_get_address (size_t, int);
  29. extern int default_gt_pch_use_address (void *, size_t, int, size_t);
  30. extern size_t default_gt_pch_alloc_granularity (void);
  31. extern void* mmap_gt_pch_get_address (size_t, int);
  32. extern int mmap_gt_pch_use_address (void *, size_t, int, size_t);
  33. /* The structure is defined in hosthooks.h. */
  34. #define HOST_HOOKS_INITIALIZER { \
  35. HOST_HOOKS_EXTRA_SIGNALS, \
  36. HOST_HOOKS_GT_PCH_GET_ADDRESS, \
  37. HOST_HOOKS_GT_PCH_USE_ADDRESS, \
  38. HOST_HOOKS_GT_PCH_ALLOC_GRANULARITY \
  39. }
  40. #endif /* GCC_HOST_HOOKS_DEF_H */