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