uwx_self.h revision 121642
1251881Speter/*
2251881SpeterCopyright (c) 2003 Hewlett-Packard Development Company, L.P.
3251881SpeterPermission is hereby granted, free of charge, to any person
4251881Speterobtaining a copy of this software and associated documentation
5251881Speterfiles (the "Software"), to deal in the Software without
6251881Speterrestriction, including without limitation the rights to use,
7251881Spetercopy, modify, merge, publish, distribute, sublicense, and/or sell
8251881Spetercopies of the Software, and to permit persons to whom the
9251881SpeterSoftware is furnished to do so, subject to the following
10251881Speterconditions:
11251881Speter
12251881SpeterThe above copyright notice and this permission notice shall be
13251881Speterincluded in all copies or substantial portions of the Software.
14251881Speter
15251881SpeterTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16251881SpeterEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17251881SpeterOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18251881SpeterNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19251881SpeterHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20251881SpeterWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21251881SpeterFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22251881SpeterOTHER DEALINGS IN THE SOFTWARE.
23251881Speter*/
24251881Speter
25251881Speter#ifndef _KERNEL
26251881Speter#include <signal.h>
27251881Speter#endif
28251881Speter
29251881Speterstruct uwx_self_info;
30251881Speter
31251881Speterextern struct uwx_self_info *uwx_self_init_info(struct uwx_env *env);
32251881Speter
33251881Speterextern int uwx_self_free_info(struct uwx_self_info *info);
34251881Speter
35251881Speterextern int uwx_self_init_context(struct uwx_env *env);
36251881Speter
37251881Speterextern int uwx_self_init_from_sigcontext(
38251881Speter    struct uwx_env *env,
39251881Speter    struct uwx_self_info *info,
40251881Speter    ucontext_t *ucontext);
41251881Speter
42251881Speterextern int uwx_self_do_context_frame(
43251881Speter    struct uwx_env *env,
44251881Speter    struct uwx_self_info *info);
45251881Speter
46251881Speterextern int uwx_self_copyin(
47251881Speter    int request,
48251881Speter    char *loc,
49251881Speter    uint64_t rem,
50251881Speter    int len,
51251881Speter    intptr_t tok);
52251881Speter
53251881Speterextern int uwx_self_lookupip(
54251881Speter    int request,
55251881Speter    uint64_t ip,
56251881Speter    intptr_t tok,
57251881Speter    uint64_t **resultp);
58251881Speter
59251881Speter#define UWX_SELF_ERR_BADABICONTEXT  (-101)
60251881Speter