unw_set_caching_policy.man 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. '\" t
  2. .\" Manual page created with latex2man on Thu Aug 16 09:44:45 MDT 2007
  3. .\" NOTE: This file is generated, DO NOT EDIT.
  4. .de Vb
  5. .ft CW
  6. .nf
  7. ..
  8. .de Ve
  9. .ft R
  10. .fi
  11. ..
  12. .TH "UNW\\_SET\\_CACHING\\_POLICY" "3" "16 August 2007" "Programming Library " "Programming Library "
  13. .SH NAME
  14. unw_set_caching_policy
  15. \-\- set unwind caching policy
  16. .PP
  17. .SH SYNOPSIS
  18. .PP
  19. #include <libunwind.h>
  20. .br
  21. .PP
  22. int
  23. unw_set_caching_policy(unw_addr_space_t
  24. as,
  25. unw_caching_policy_t
  26. policy);
  27. .br
  28. .PP
  29. .SH DESCRIPTION
  30. .PP
  31. The unw_set_caching_policy()
  32. routine sets the caching policy
  33. of address space as
  34. to the policy specified by argument
  35. policy\&.
  36. The policy
  37. argument can take one of three
  38. possible values:
  39. .TP
  40. UNW_CACHE_NONE
  41. Turns off caching completely. This
  42. also implicitly flushes the contents of all caches as if
  43. unw_flush_cache()
  44. had been called.
  45. .TP
  46. UNW_CACHE_GLOBAL
  47. Enables caching using a global cache
  48. that is shared by all threads. If global caching is unavailable or
  49. unsupported, libunwind
  50. may fall back on using a per\-thread
  51. cache, as if UNW_CACHE_PER_THREAD
  52. had been specified.
  53. .TP
  54. UNW_CACHE_PER_THREAD
  55. Enables caching using
  56. thread\-local caches. If a thread\-local caching are unavailable or
  57. unsupported, libunwind
  58. may fall back on using a global cache,
  59. as if UNW_CACHE_GLOBAL
  60. had been specified.
  61. .PP
  62. If caching is enabled, an application must be prepared to make
  63. appropriate calls to unw_flush_cache()
  64. whenever the target
  65. changes in a way that could affect the validity of cached information.
  66. For example, after unloading (removing) a shared library,
  67. unw_flush_cache()
  68. would have to be called (at least) for the
  69. address\-range that was covered by the shared library.
  70. .PP
  71. For address spaces created via unw_create_addr_space(3),
  72. caching is turned off by default. For the local address space
  73. unw_local_addr_space,
  74. caching is turned on by default.
  75. .PP
  76. .SH RETURN VALUE
  77. .PP
  78. On successful completion, unw_set_caching_policy()
  79. returns 0.
  80. Otherwise the negative value of one of the error\-codes below is
  81. returned.
  82. .PP
  83. .SH THREAD AND SIGNAL SAFETY
  84. .PP
  85. unw_set_caching_policy()
  86. is thread\-safe but \fInot\fP
  87. safe
  88. to use from a signal handler.
  89. .PP
  90. .SH ERRORS
  91. .PP
  92. .TP
  93. UNW_ENOMEM
  94. The desired caching policy could not be
  95. established because the application is out of memory.
  96. .PP
  97. .SH SEE ALSO
  98. .PP
  99. libunwind(3),
  100. unw_create_addr_space(3),
  101. unw_flush_cache(3)
  102. .PP
  103. .SH AUTHOR
  104. .PP
  105. David Mosberger\-Tang
  106. .br
  107. Email: \fBdmosberger@gmail.com\fP
  108. .br
  109. WWW: \fBhttp://www.nongnu.org/libunwind/\fP\&.
  110. .\" NOTE: This file is generated, DO NOT EDIT.