Imported Upstream version 1.1
[platform/upstream/libunwind.git] / doc / unw_is_signal_frame.tex
1 \documentclass{article}
2 \usepackage[fancyhdr,pdf]{latex2man}
3
4 \input{common.tex}
5
6 \begin{document}
7
8 \begin{Name}{3}{unw\_is\_signal\_frame}{David Mosberger-Tang}{Programming Library}{unw\_is\_signal\_frame}unw\_is\_signal\_frame -- check if current frame is a signal frame
9 \end{Name}
10
11 \section{Synopsis}
12
13 \File{\#include $<$libunwind.h$>$}\\
14
15 \Type{int} \Func{unw\_is\_signal\_frame}(\Type{unw\_cursor\_t~*}\Var{cp});\\
16
17 \section{Description}
18
19 The \Func{unw\_is\_signal\_frame}() routine returns a positive value
20 if the current frame identified by \Var{cp} is a signal frame, and a
21 value of 0 otherwise.  For the purpose of this discussion, a signal
22 frame is a frame that was created in response to a potentially
23 asynchronous interruption.  For UNIX and UNIX-like platforms, such
24 frames are normally created by the kernel when delivering a signal.
25 In a kernel-environment, a signal frame might, for example, correspond
26 to a frame created in response to a device interrupt.
27
28 Signal frames are somewhat unusual because the asynchronous nature of
29 the events that create them require storing the contents of registers
30 that are normally treated as scratch (``caller-saved'') registers.
31
32 \section{Return Value}
33
34 On successful completion, \Func{unw\_is\_signal\_frame}() returns a
35 positive value if the current frame is a signal frame, or 0 if it is
36 not.  Otherwise, a negative value of one of the error-codes below is
37 returned.
38
39 \section{Thread and Signal Safety}
40
41 \Func{unw\_is\_signal\_frame}() is thread-safe as well as safe to use
42 from a signal handler.
43
44 \section{Errors}
45
46 \begin{Description}
47 \item[\Const{UNW\_ENOINFO}] \Prog{Libunwind} is unable to determine
48   whether or not the current frame is a signal frame.
49 \end{Description}
50
51 \section{See Also}
52
53 \SeeAlso{libunwind(3)},
54 \SeeAlso{unw\_get\_reg(3)},
55 \SeeAlso{unw\_set\_reg(3)},
56 \SeeAlso{unw\_get\_fpreg(3)},
57 \SeeAlso{unw\_set\_fpreg(3)}
58
59 \section{Author}
60
61 \noindent
62 David Mosberger-Tang\\
63 Email: \Email{dmosberger@gmail.com}\\
64 WWW: \URL{http://www.nongnu.org/libunwind/}.
65 \LatexManEnd
66
67 \end{document}