]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/valgrind/src/valgrind-3.6.0-svn/coregrind/m_syswrap/priv_syswrap-aix5.h
update
[l4.git] / l4 / pkg / valgrind / src / valgrind-3.6.0-svn / coregrind / m_syswrap / priv_syswrap-aix5.h
1
2 /*--------------------------------------------------------------------*/
3 /*--- AIX5-specific syscalls stuff.            priv_syswrap-aix5.h ---*/
4 /*--------------------------------------------------------------------*/
5
6 /*
7    This file is part of Valgrind, a dynamic binary instrumentation
8    framework.
9
10    Copyright (C) 2006-2010 OpenWorks LLP
11       info@open-works.co.uk
12
13    This program is free software; you can redistribute it and/or
14    modify it under the terms of the GNU General Public License as
15    published by the Free Software Foundation; either version 2 of the
16    License, or (at your option) any later version.
17
18    This program is distributed in the hope that it will be useful, but
19    WITHOUT ANY WARRANTY; without even the implied warranty of
20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21    General Public License for more details.
22
23    You should have received a copy of the GNU General Public License
24    along with this program; if not, write to the Free Software
25    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26    02111-1307, USA.
27
28    The GNU General Public License is contained in the file COPYING.
29
30    Neither the names of the U.S. Department of Energy nor the
31    University of California nor the names of its contributors may be
32    used to endorse or promote products derived from this software
33    without prior written permission.
34 */
35
36 #ifndef __PRIV_SYSWRAP_AIX5_H
37 #define __PRIV_SYSWRAP_AIX5_H
38
39 /* requires #include "priv_types_n_macros.h" */
40
41
42 /* Allocate a stack for this thread, if it doesn't already have one.
43    They're allocated lazily, and never freed.  Returns the initial stack
44    pointer value to use, or 0 if allocation failed. */
45 extern Addr ML_(allocstack)(ThreadId tid);
46
47 /* Re-read /proc/../map and update everything that depends on it. */
48 extern void ML_(aix5_rescan_procmap_after_load_or_unload) ( void );
49
50 /* Mess with the given thread's pc/toc so that it is entering
51    pthread_exit() with argument PTHREAD_CANCELED.  Returns True if ok,
52    False if it failed to do so, due to not being able to find
53    pthread_exit() by searching symbol tables. */
54 extern Bool ML_(aix5_force_thread_into_pthread_exit)( ThreadId );
55
56 /* For various reasons, on AIX we may have to just give up if
57    continuing is too difficult (eg, risk of future deadlock).  This
58    sets up the process state to exit straight away, but does not
59    actually itself exit. */
60 extern
61 void ML_(aix5_set_threadstate_for_emergency_exit)(ThreadId tid, HChar* why);
62
63 /* Debugging stuff, for making sense of AIX5 threading syscalls. */
64 extern void   ML_(aix5debugstuff_show_tstate) ( Addr, HChar* who );
65 extern void   ML_(aix5debugstuff_show_tstate_flags) ( UWord w );
66 extern HChar* ML_(aix5debugstuff_pc_to_fnname) ( Addr pc );
67
68
69 // Syscalls which can be handled by a common wrapper for
70 // both ppc32-aix5 and ppc64-aix5
71
72 DECL_TEMPLATE(aix5, sys___libc_sbrk);
73 DECL_TEMPLATE(aix5, sys___msleep);
74 DECL_TEMPLATE(aix5, sys__clock_settime);
75 DECL_TEMPLATE(aix5, sys__exit);
76 DECL_TEMPLATE(aix5, sys__fp_fpscrx_sc);
77 DECL_TEMPLATE(aix5, sys__getpgrp);
78 DECL_TEMPLATE(aix5, sys__getpid);
79 DECL_TEMPLATE(aix5, sys__getppid);
80 DECL_TEMPLATE(aix5, sys__getpriority);
81 DECL_TEMPLATE(aix5, sys__nsleep);
82 DECL_TEMPLATE(aix5, sys__pause);
83 DECL_TEMPLATE(aix5, sys__poll);
84 DECL_TEMPLATE(aix5, sys__select);
85 DECL_TEMPLATE(aix5, sys__sem_wait);
86 DECL_TEMPLATE(aix5, sys__setpgid);
87 DECL_TEMPLATE(aix5, sys__setsid);
88 DECL_TEMPLATE(aix5, sys__sigaction);
89 DECL_TEMPLATE(aix5, sys__thread_self);
90 DECL_TEMPLATE(aix5, sys__thread_setsched);
91 DECL_TEMPLATE(aix5, sys_access);
92 DECL_TEMPLATE(aix5, sys_accessx);
93 DECL_TEMPLATE(aix5, sys_appgetrlimit);
94 DECL_TEMPLATE(aix5, sys_appgetrusage);
95 DECL_TEMPLATE(aix5, sys_apprestimer);
96 DECL_TEMPLATE(aix5, sys_appsetrlimit);
97 DECL_TEMPLATE(aix5, sys_appulimit);
98 DECL_TEMPLATE(aix5, sys_bind);
99 DECL_TEMPLATE(aix5, sys_chdir);
100 DECL_TEMPLATE(aix5, sys_chmod);
101 DECL_TEMPLATE(aix5, sys_chown);
102 DECL_TEMPLATE(aix5, sys_close);
103 DECL_TEMPLATE(aix5, sys_connext);
104 DECL_TEMPLATE(aix5, sys_execve);
105 DECL_TEMPLATE(aix5, sys_finfo);
106 DECL_TEMPLATE(aix5, sys_fstatfs);
107 DECL_TEMPLATE(aix5, sys_fstatx);
108 DECL_TEMPLATE(aix5, sys_fsync);
109 DECL_TEMPLATE(aix5, sys_getdirent);
110 DECL_TEMPLATE(aix5, sys_getdirent64);
111 DECL_TEMPLATE(aix5, sys_getdomainname);
112 DECL_TEMPLATE(aix5, sys_getgidx);
113 DECL_TEMPLATE(aix5, sys_getgroups);
114 DECL_TEMPLATE(aix5, sys_gethostname);
115 DECL_TEMPLATE(aix5, sys_getpriv);
116 DECL_TEMPLATE(aix5, sys_getprocs);
117 DECL_TEMPLATE(aix5, sys_getrpid);
118 DECL_TEMPLATE(aix5, sys_getsockopt);
119 DECL_TEMPLATE(aix5, sys_gettimerid);
120 DECL_TEMPLATE(aix5, sys_getuidx);
121 DECL_TEMPLATE(aix5, sys_incinterval);
122 DECL_TEMPLATE(aix5, sys_kfcntl);
123 DECL_TEMPLATE(aix5, sys_kfork);
124 DECL_TEMPLATE(aix5, sys_kftruncate);
125 DECL_TEMPLATE(aix5, sys_kgetsidx);
126 DECL_TEMPLATE(aix5, sys_kill);
127 DECL_TEMPLATE(aix5, sys_kioctl);
128 DECL_TEMPLATE(aix5, sys_klseek);
129 DECL_TEMPLATE(aix5, sys_knlist);
130 DECL_TEMPLATE(aix5, sys_kpread);
131 DECL_TEMPLATE(aix5, sys_kread);
132 DECL_TEMPLATE(aix5, sys_kreadv);
133 DECL_TEMPLATE(aix5, sys_kthread_ctl);
134 DECL_TEMPLATE(aix5, sys_ktruncate);
135 DECL_TEMPLATE(aix5, sys_kwaitpid);
136 DECL_TEMPLATE(aix5, sys_kwrite);
137 DECL_TEMPLATE(aix5, sys_kwritev);
138 DECL_TEMPLATE(aix5, sys_listen);
139 DECL_TEMPLATE(aix5, sys_loadbind);
140 DECL_TEMPLATE(aix5, sys_loadquery);
141 DECL_TEMPLATE(aix5, sys_lseek);
142 DECL_TEMPLATE(aix5, sys_mkdir);
143 DECL_TEMPLATE(aix5, sys_mmap);
144 DECL_TEMPLATE(aix5, sys_mprotect);
145 DECL_TEMPLATE(aix5, sys_mntctl);
146 DECL_TEMPLATE(aix5, sys_munmap);
147 DECL_TEMPLATE(aix5, sys_naccept);
148 DECL_TEMPLATE(aix5, sys_ngetpeername);
149 DECL_TEMPLATE(aix5, sys_ngetsockname);
150 DECL_TEMPLATE(aix5, sys_nrecvfrom);
151 DECL_TEMPLATE(aix5, sys_nrecvmsg);
152 DECL_TEMPLATE(aix5, sys_nsendmsg);
153 DECL_TEMPLATE(aix5, sys_open);
154 DECL_TEMPLATE(aix5, sys_pipe);
155 DECL_TEMPLATE(aix5, sys_privcheck);
156 DECL_TEMPLATE(aix5, sys_readlink);
157 DECL_TEMPLATE(aix5, sys_recv);
158 DECL_TEMPLATE(aix5, sys_rename);
159 DECL_TEMPLATE(aix5, sys_sbrk);
160 DECL_TEMPLATE(aix5, sys_sched_get_priority_max);
161 DECL_TEMPLATE(aix5, sys_sem_destroy);
162 DECL_TEMPLATE(aix5, sys_sem_init);
163 DECL_TEMPLATE(aix5, sys_sem_post);
164 DECL_TEMPLATE(aix5, sys_send);
165 DECL_TEMPLATE(aix5, sys_setgid);
166 DECL_TEMPLATE(aix5, sys_setsockopt);
167 DECL_TEMPLATE(aix5, sys_setuid);
168 DECL_TEMPLATE(aix5, sys_shmat);
169 DECL_TEMPLATE(aix5, sys_shmctl);
170 DECL_TEMPLATE(aix5, sys_shmdt);
171 DECL_TEMPLATE(aix5, sys_shmget);
172 DECL_TEMPLATE(aix5, sys_shutdown);
173 DECL_TEMPLATE(aix5, sys_sigcleanup);
174 DECL_TEMPLATE(aix5, sys_sigprocmask);
175 DECL_TEMPLATE(aix5, sys_socket);
176 DECL_TEMPLATE(aix5, sys_statfs);
177 DECL_TEMPLATE(aix5, sys_statx);
178 DECL_TEMPLATE(aix5, sys_symlink);
179 DECL_TEMPLATE(aix5, sys_sys_parm);
180 DECL_TEMPLATE(aix5, sys_sysconfig);
181 DECL_TEMPLATE(aix5, sys_thread_create);
182 DECL_TEMPLATE(aix5, sys_thread_init);
183 DECL_TEMPLATE(aix5, sys_thread_kill);
184 /* thread_setmymask_fast is platform specific */
185 DECL_TEMPLATE(aix5, sys_thread_setmystate);
186 DECL_TEMPLATE(aix5, sys_thread_setmystate_fast);
187 /* thread_setstate is platform specific */
188 DECL_TEMPLATE(aix5, sys_thread_terminate_unlock);
189 DECL_TEMPLATE(aix5, sys_thread_tsleep);
190 DECL_TEMPLATE(aix5, sys_thread_tsleep_event);
191 DECL_TEMPLATE(aix5, sys_thread_twakeup);
192 DECL_TEMPLATE(aix5, sys_thread_twakeup_event);
193 DECL_TEMPLATE(aix5, sys_thread_unlock);
194 DECL_TEMPLATE(aix5, sys_thread_waitlock);
195 DECL_TEMPLATE(aix5, sys_thread_waitlock_);
196 DECL_TEMPLATE(aix5, sys_times);
197 DECL_TEMPLATE(aix5, sys_umask);
198 DECL_TEMPLATE(aix5, sys_uname);
199 DECL_TEMPLATE(aix5, sys_unlink);
200 DECL_TEMPLATE(aix5, sys_utimes);
201 DECL_TEMPLATE(aix5, sys_vmgetinfo);
202 DECL_TEMPLATE(aix5, sys_yield);
203
204
205 #endif   // __PRIV_SYSWRAP_AIX5_H
206
207 /*--------------------------------------------------------------------*/
208 /*--- end                                                          ---*/
209 /*--------------------------------------------------------------------*/