vtv-change-permission.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Copyright (C) 2013-2022 Free Software Foundation, Inc.
  2. This file is part of GCC.
  3. modify it under the terms of the GNU Library General Public License
  4. as published by the Free Software Foundation; either version 2, or
  5. (at your option) any later version.
  6. In addition to the permissions in the GNU Library General Public
  7. License, the Free Software Foundation gives you unlimited
  8. permission to link the compiled version of this file into
  9. combinations with other programs, and to distribute those
  10. combinations without any restriction coming from the use of this
  11. file. (The Library Public License restrictions do apply in other
  12. respects; for example, they cover modification of the file, and
  13. distribution when not linked into a combined executable.)
  14. This program is distributed in the hope that it will be useful, but
  15. WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. Library General Public License for more details.
  18. You should have received a copy of the GNU Library General Public
  19. License along with this program; if not, write to the Free Software
  20. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  21. 02110-1301, USA. */
  22. #ifndef __VTV_H__
  23. #define __VTV_H__
  24. /* We could have used an enumeration here but it just makes it more
  25. difficult for the compiler to generate a call to this. These are
  26. used as arguments to the function __VLTChangePermission, declared
  27. below. */
  28. #define __VLTP_READ_ONLY 0
  29. #define __VLTP_READ_WRITE 1
  30. #ifdef __cplusplus
  31. extern "C" void __VLTChangePermission (int);
  32. #else
  33. extern void __VLTChangePermission (int);
  34. #endif
  35. #ifdef BIG_PAGE_SIZE
  36. /* TODO - Replace '4096' below with correct big page size. */
  37. #define VTV_PAGE_SIZE 4096
  38. #else
  39. #if defined(__sun__) && defined(__svr4__) && defined(__sparc__)
  40. #define VTV_PAGE_SIZE 8192
  41. #else
  42. #define VTV_PAGE_SIZE 4096
  43. #endif
  44. #endif
  45. #endif /* __VTV_H__ */