|
From: <sv...@va...> - 2006-10-17 01:04:18
|
Author: sewardj
Date: 2006-10-17 02:04:15 +0100 (Tue, 17 Oct 2006)
New Revision: 6245
Log:
Merge r6092 and some of r6093:
AIX5 kernel-interface stuff.
Added:
trunk/auxprogs/aix5_VKI_info.c
trunk/auxprogs/aix5_proc_self_sysent.c
trunk/include/vki/vki-ppc32-aix5.h
trunk/include/vki/vki-ppc64-aix5.h
trunk/include/vki/vki-scnums-aix5.h
Added: trunk/auxprogs/aix5_VKI_info.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/auxprogs/aix5_VKI_info.c (rev 0)
+++ trunk/auxprogs/aix5_VKI_info.c 2006-10-17 01:04:15 UTC (rev 6245)
@@ -0,0 +1,340 @@
+
+/* Used to generate include/vki/vki-ppc{32,64}-aix5.h. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/statfs.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <errno.h>
+#include <string.h>
+#include <time.h>
+#include <sys/ptrace.h>
+#include <sys/uio.h>
+#include <sys/ioctl.h>
+
+#undef offsetof
+
+/* This is so useful it should be visible absolutely everywhere. */
+#if !defined(offsetof)
+# define offsetof(type,memb) ((int)&((type*)0)->memb)
+#endif
+
+
+int main ( void )
+{
+ printf ("aix5_VKI_info: sizeof(void*) =3D %d\n", (int)sizeof(void*));
+
+ printf("/* ---------------- Errors ---------------- */\n");
+ printf("\n");
+ printf("#define VKI_EINVAL %d\n", EINVAL);
+ printf("#define VKI_EINTR %d\n", EINTR);
+ printf("#define VKI_ENOSYS %d\n", ENOSYS);
+ printf("#define VKI_EAGAIN %d\n", EAGAIN);
+ printf("#define VKI_ENOMEM %d\n", ENOMEM);
+ printf("#define VKI_EACCES %d\n", EACCES);
+ printf("#define VKI_EEXIST %d\n", EEXIST);
+ printf("#define VKI_EPERM %d\n", EPERM);
+ printf("#define VKI_ENOENT %d\n", ENOENT);
+ printf("#define VKI_ESRCH %d\n", ESRCH);
+ printf("#define VKI_EBADF %d\n", EBADF);
+ printf("#define VKI_EFAULT %d\n", EFAULT);
+ printf("#define VKI_EMFILE %d\n", EMFILE);
+ printf("#define VKI_ECHILD %d\n", ECHILD);
+ printf("#define VKI_EOVERFLOW %d\n", EOVERFLOW);
+ printf("\n");
+ printf("/* ---------------- File I/O ---------------- */\n");
+ printf("\n");
+ printf("#define VKI_O_WRONLY 0x%08x\n", O_WRONLY);
+ printf("#define VKI_O_RDONLY 0x%08x\n", O_RDONLY);
+ printf("#define VKI_O_APPEND 0x%08x\n", O_APPEND);
+ printf("#define VKI_O_CREAT 0x%08x\n", O_CREAT);
+ printf("#define VKI_O_RDWR 0x%08x\n", O_RDWR);
+ printf("#define VKI_O_EXCL 0x%08x\n", O_EXCL);
+ printf("#define VKI_O_TRUNC 0x%08x\n", O_TRUNC);
+ printf("\n");
+ printf("#define VKI_S_IRUSR 0x%08x\n", S_IRUSR);
+ printf("#define VKI_S_IXUSR 0x%08x\n", S_IXUSR);
+ printf("#define VKI_S_IXGRP 0x%08x\n", S_IXGRP);
+ printf("#define VKI_S_IXOTH 0x%08x\n", S_IXOTH);
+ printf("#define VKI_S_IWUSR 0x%08x\n", S_IWUSR);
+ printf("#define VKI_S_ISUID 0x%08x\n", S_ISUID);
+ printf("#define VKI_S_ISGID 0x%08x\n", S_ISGID);
+ printf("#define VKI_S_IFMT 0x%08x\n", S_IFMT);
+ printf("#define VKI_S_IFDIR 0x%08x\n", S_IFDIR);
+ printf("#define VKI_S_IFCHR 0x%08x\n", S_IFCHR);
+ printf("#define VKI_S_IFBLK 0x%08x\n", S_IFBLK);
+ printf("\n");
+ printf("#define VKI_F_DUPFD 0x%08x\n", F_DUPFD);
+ printf("#define VKI_F_SETFD 0x%08x\n", F_SETFD);
+ printf("#define VKI_FD_CLOEXEC 0x%08x\n", FD_CLOEXEC);
+ printf("\n");
+ printf("#define VKI_R_OK 0x%08x\n", R_OK);
+ printf("#define VKI_W_OK 0x%08x\n", W_OK);
+ printf("#define VKI_X_OK 0x%08x\n", X_OK);
+
+ /* info about struct stat */
+ struct stat st;
+ printf("\nsizeof(struct stat) =3D %d\n", (int)sizeof(struct stat));
+
+ printf(" st_size: off %2d sz %d\n",=20
+ offsetof(struct stat, st_size),
+ (int)sizeof(st.st_size));
+
+ printf(" st_mode: off %2d sz %d\n",=20
+ offsetof(struct stat, st_mode),
+ (int)sizeof(st.st_mode));
+
+ printf(" st_uid: off %2d sz %d\n",=20
+ offsetof(struct stat, st_uid),
+ (int)sizeof(st.st_uid));
+
+ printf(" st_gid: off %2d sz %d\n",=20
+ offsetof(struct stat, st_gid),
+ (int)sizeof(st.st_gid));
+
+ printf(" st_dev: off %2d sz %d\n",=20
+ offsetof(struct stat, st_dev),
+ (int)sizeof(st.st_dev));
+
+ printf(" st_ino: off %2d sz %d\n",=20
+ offsetof(struct stat, st_ino),
+ (int)sizeof(st.st_ino));
+
+ printf("\n");
+ printf("#define VKI_STX_NORMAL %d\n", (int)STX_NORMAL);
+ printf("\n");
+ printf("sizeof(size_t) =3D %d\n", (int)sizeof(size_t) );
+ printf("\n");
+ printf("#define VKI_SEEK_SET %d\n", SEEK_SET);
+ printf("#define VKI_PATH_MAX %d\n", PATH_MAX);
+
+ /* info about struct iovec */
+ struct iovec iov;
+ printf("\nsizeof(struct iovec) =3D %d\n", (int)sizeof(struct iovec));
+ printf(" iov_base: off %2d sz %d\n",=20
+ offsetof(struct iovec, iov_base),
+ (int)sizeof(iov.iov_base));
+ printf(" iov_len: off %2d sz %d\n",=20
+ offsetof(struct iovec, iov_len),
+ (int)sizeof(iov.iov_len));
+
+ printf("\n");
+ printf("#define _VKI_IOC_NONE %d\n", 3 & (IOC_VOID >> 30));
+ printf("#define _VKI_IOC_READ %d\n", 3 & (IOC_OUT >> 30));
+ printf("#define _VKI_IOC_WRITE %d\n", 3 & (IOC_IN >> 30));
+ printf("\n");
+ printf("/* ---------------- MMappery ---------------- */\n");
+ printf("\n");
+ printf("#define VKI_PAGE_SIZE %d\n", (int)sysconf(_SC_PAGESIZE));
+ printf("\n");
+ printf("#define VKI_PROT_NONE 0x%08x\n", PROT_NONE);
+ printf("#define VKI_PROT_READ 0x%08x\n", PROT_READ);
+ printf("#define VKI_PROT_WRITE 0x%08x\n", PROT_WRITE);
+ printf("#define VKI_PROT_EXEC 0x%08x\n", PROT_EXEC);
+ printf("\n");
+ printf("#define VKI_MAP_FIXED 0x%08x\n", MAP_FIXED);
+ printf("#define VKI_MAP_PRIVATE 0x%08x\n", MAP_PRIVATE);
+ printf("#define VKI_MAP_ANONYMOUS 0x%08x\n", MAP_ANONYMOUS);
+ printf("\n");
+ printf("/* ---------------- RLimitery ---------------- */\n");
+ printf("\n");
+ printf("#define VKI_RLIMIT_DATA 0x%08x\n", RLIMIT_DATA);
+ printf("#define VKI_RLIMIT_NOFILE 0x%08x\n", RLIMIT_NOFILE);
+ printf("#define VKI_RLIMIT_STACK 0x%08x\n", RLIMIT_STACK);
+ printf("#define VKI_RLIMIT_CORE 0x%08x\n", RLIMIT_CORE);
+
+ /* info about struct rlimit */
+ struct rlimit rl;
+ printf("\nsizeof(struct rlimit) =3D %d\n", (int)sizeof(struct rlimit)=
);
+ printf(" rlim_cur: off %2d sz %d\n",=20
+ offsetof(struct rlimit, rlim_cur),
+ (int)sizeof(rl.rlim_cur));
+ printf(" rlim_max: off %2d sz %d\n",=20
+ offsetof(struct rlimit, rlim_max),
+ (int)sizeof(rl.rlim_max));
+ printf("\n");
+ printf("/* ---------------- Time ---------------- */\n");
+ printf("\n");
+
+ /* print info about struct timeval */
+ struct timeval tv;
+ printf("sizeof(struct timeval) =3D %d\n", (int)sizeof(struct timeval)=
);
+ printf(" tv_sec: off %2d sz %d\n",=20
+ offsetof(struct timeval, tv_sec),
+ (int)sizeof(tv.tv_sec));
+ printf(" tv_usec: off %2d sz %d\n",=20
+ offsetof(struct timeval, tv_usec),
+ (int)sizeof(tv.tv_usec));
+
+ /* print info about struct timespec */
+ struct timespec ts;
+ printf("\nsizeof(struct timespec) =3D %d\n", (int)sizeof(struct times=
pec));
+ printf(" tv_sec: off %2d sz %d\n",=20
+ offsetof(struct timespec, tv_sec),
+ (int)sizeof(ts.tv_sec));
+ printf(" tv_nsec: off %2d sz %d\n",=20
+ offsetof(struct timespec, tv_nsec),
+ (int)sizeof(ts.tv_nsec));
+
+ printf("\n");
+ printf("/* ---------------- Signals ---------------- */\n");
+ printf("\n");
+ printf("#define _VKI_NSIG %ld\n", 8 * sizeof(sigset_t) );
+ printf("\n");
+ printf("#define VKI_SIGSEGV %d\n", SIGSEGV);
+ printf("#define VKI_SIGBUS %d\n", SIGBUS);
+ printf("#define VKI_SIGFPE %d\n", SIGFPE);
+ printf("#define VKI_SIGHUP %d\n", SIGHUP);
+ printf("#define VKI_SIGINT %d\n", SIGINT);
+ printf("#define VKI_SIGQUIT %d\n", SIGQUIT);
+ printf("#define VKI_SIGABRT %d\n", SIGABRT);
+ printf("#define VKI_SIGUSR1 %d\n", SIGUSR1);
+ printf("#define VKI_SIGUSR2 %d\n", SIGUSR2);
+ printf("#define VKI_SIGPIPE %d\n", SIGPIPE);
+ printf("#define VKI_SIGALRM %d\n", SIGALRM);
+ printf("#define VKI_SIGTERM %d\n", SIGTERM);
+ printf("/* VKI_SIGSTKFLT does not exist on AIX 5.2 */\n");
+ printf("#define VKI_SIGTTIN %d\n", SIGTTIN);
+ printf("#define VKI_SIGTTOU %d\n", SIGTTOU);
+ printf("#define VKI_SIGXCPU %d\n", SIGXCPU);
+ printf("#define VKI_SIGXFSZ %d\n", SIGXFSZ);
+ printf("#define VKI_SIGVTALRM %d\n", SIGVTALRM);
+ printf("#define VKI_SIGPROF %d\n", SIGPROF);
+ printf("#define VKI_SIGIO %d\n", SIGIO);
+ printf("#define VKI_SIGPWR %d\n", SIGPWR);
+ printf("/* VKI_SIGUNUSED does not exist on AIX 5.2 */\n");
+ printf("#define VKI_SIGRTMIN %d\n", SIGRTMIN);
+ printf("#define VKI_SIGRTMAX %d\n", SIGRTMAX);
+ printf("#define VKI_SIGTRAP %d\n", SIGTRAP);
+ printf("#define VKI_SIGCONT %d\n", SIGCONT);
+ printf("#define VKI_SIGCHLD %d\n", SIGCHLD);
+ printf("#define VKI_SIGWINCH %d\n", SIGWINCH);
+ printf("#define VKI_SIGURG %d\n", SIGURG);
+ printf("#define VKI_SIGILL %d\n", SIGILL);
+ printf("#define VKI_SIGSTOP %d\n", SIGSTOP);
+ printf("#define VKI_SIGKILL %d\n", SIGKILL);
+ printf("#define VKI_SIGTSTP %d\n", SIGTSTP);
+ printf("#define VKI_SIGSYS %d\n", SIGSYS);
+
+ /* print info about struct sigaction */
+ struct sigaction sa;
+ printf("\n");
+ printf("sizeof(struct sigaction) =3D %d\n", (int)sizeof(struct sigact=
ion));
+ printf(" sa_handler: off %2d sz %d\n",=20
+ offsetof(struct sigaction, sa_handler),
+ (int)sizeof(sa.sa_handler));
+ printf(" sa_mask: off %2d sz %d\n",=20
+ offsetof(struct sigaction, sa_mask),
+ (int)sizeof(sa.sa_mask));
+ printf(" sa_flags: off %2d sz %d\n",=20
+ offsetof(struct sigaction, sa_flags),
+ (int)sizeof(sa.sa_flags));
+ printf("sa_sigaction: off %2d sz %d\n",=20
+ offsetof(struct sigaction, sa_sigaction),
+ (int)sizeof(sa.sa_sigaction));
+ printf("\n");
+ printf("#define VKI_SA_ONSTACK %d\n",SA_ONSTACK );
+ printf("#define VKI_SA_RESTART %d\n",SA_RESTART );
+ printf("#define VKI_SA_RESETHAND %d\n",SA_RESETHAND );
+ printf("#define VKI_SA_SIGINFO %d\n",SA_SIGINFO);
+ printf("#define VKI_SA_NODEFER %d\n",SA_NODEFER );
+ // printf("#define VKI_SA_NOMASK %d\n",SA_NOMASK ) ;
+ // printf("#define VKI_SA_ONESHOT %d\n",SA_ONESHOT );
+ printf("#define VKI_SA_NOCLDSTOP %d\n",SA_NOCLDSTOP );
+ printf("#define VKI_SA_NOCLDWAIT %d\n",SA_NOCLDWAIT );
+ // printf("#define VKI_SA_RESTORER %d\n",SA_RESTORER );
+ printf("\n");
+ printf("#define VKI_SS_ONSTACK %d\n",SS_ONSTACK );
+ printf("#define VKI_SS_DISABLE %d\n",SS_DISABLE );
+ printf("\n");
+ printf("#define VKI_MINSIGSTKSZ %ld\n",MINSIGSTKSZ );
+ printf("\n");
+ printf("#define VKI_SI_USER %d\n",SI_USER );
+ printf("\n");
+ printf("#define VKI_SIG_BLOCK %d\n",SIG_BLOCK );
+ printf("#define VKI_SIG_SETMASK %d\n",SIG_SETMASK );
+ printf("#define VKI_SIG_UNBLOCK %d\n",SIG_UNBLOCK );
+ printf("#define VKI_SIG_IGN (void*)%d\n",(int)SIG_IGN );
+ printf("#define VKI_SIG_DFL (void*)%d\n",(int)SIG_DFL );
+ printf("\n");
+ // printf("#define VKI_SI_TKILL %d\n",SI_TKILL );
+ printf("#define VKI_SI_USER %d\n",SI_USER );
+ printf("\n");
+ printf("#define VKI_SEGV_ACCERR %d\n", SEGV_ACCERR);
+ printf("#define VKI_SEGV_MAPERR %d\n", SEGV_MAPERR);
+ printf("\n");
+ printf("#define VKI_TRAP_TRACE %d\n", TRAP_TRACE);
+ printf("#define VKI_BUS_OBJERR %d\n", BUS_OBJERR);
+ printf("#define VKI_BUS_ADRERR %d\n", BUS_ADRERR);
+ printf("#define VKI_BUS_ADRALN %d\n", BUS_ADRALN);
+ printf("#define VKI_FPE_FLTSUB %d\n", FPE_FLTSUB);
+ printf("#define VKI_FPE_FLTINV %d\n", FPE_FLTINV);
+ printf("#define VKI_FPE_FLTRES %d\n", FPE_FLTRES);
+ printf("#define VKI_FPE_FLTUND %d\n", FPE_FLTUND);
+ printf("#define VKI_FPE_FLTOVF %d\n", FPE_FLTOVF);
+ printf("#define VKI_FPE_FLTDIV %d\n", FPE_FLTDIV);
+ printf("#define VKI_FPE_INTOVF %d\n", FPE_INTOVF);
+ printf("#define VKI_FPE_INTDIV %d\n", FPE_INTDIV);
+ printf("\n");
+ printf("#define VKI_ILL_BADSTK %d\n", ILL_BADSTK);
+ printf("#define VKI_ILL_COPROC %d\n", ILL_COPROC);
+ printf("#define VKI_ILL_PRVREG %d\n", ILL_PRVREG);
+ printf("#define VKI_ILL_PRVOPC %d\n", ILL_PRVOPC);
+ printf("#define VKI_ILL_ILLTRP %d\n", ILL_ILLTRP);
+ printf("#define VKI_ILL_ILLADR %d\n", ILL_ILLADR);
+ printf("#define VKI_ILL_ILLOPN %d\n", ILL_ILLOPN);
+ printf("#define VKI_ILL_ILLOPC %d\n", ILL_ILLOPC);
+
+ /* info about siginfo_t */
+ siginfo_t si;
+ printf("\nsizeof(siginfo_t) =3D %d\n", (int)sizeof(siginfo_t));
+ printf(" si_signo: off %2d sz %d\n",=20
+ offsetof(siginfo_t, si_signo),
+ (int)sizeof(si.si_signo));
+ printf(" si_code: off %2d sz %d\n",=20
+ offsetof(siginfo_t, si_code),
+ (int)sizeof(si.si_code));
+ printf(" si_pid: off %2d sz %d\n",
+ offsetof(siginfo_t, si_pid),
+ (int)sizeof(si.si_pid));
+ printf(" si_addr: off %2d sz %d\n",=20
+ offsetof(siginfo_t, si_addr),
+ (int)sizeof(si.si_addr));
+
+ /* info about sigaltstack */
+ stack_t ss;
+ printf("\nsizeof(stack_t) =3D %d\n", (int)sizeof(stack_t));
+ printf(" ss_sp: off %2d sz %d\n",=20
+ offsetof(stack_t, ss_sp),
+ (int)sizeof(ss.ss_sp));
+ printf(" ss_size: off %2d sz %d\n",=20
+ offsetof(stack_t, ss_size),
+ (int)sizeof(ss.ss_size));
+ printf(" ss_flags: off %2d sz %d\n",=20
+ offsetof(stack_t, ss_flags),
+ (int)sizeof(ss.ss_flags));
+
+ printf("\n");
+ printf("/* ---------------- Misc ---------------- */\n");
+ printf("\n");
+ printf("#define VKI_PTRACE_TRACEME %d\n", PT_TRACE_ME);
+ printf("#define VKI_PTRACE_DETACH %d\n", PT_DETACH);
+ printf("\n");
+
+#if 0
+ printf("#define VKI_ %d\n", );
+ printf("#define VKI_ %d\n", );
+ printf("#define VKI_ %d\n", );
+ printf("#define VKI_ %d\n", );
+
+ printf("#define VKI_ 0x%08x\n", );
+ printf("#define VKI_ 0x%08x\n", );
+ printf("#define VKI_ 0x%08x\n", );
+ printf("#define VKI_ 0x%08x\n", );
+#endif
+ return 0;
+}
Added: trunk/auxprogs/aix5_proc_self_sysent.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/auxprogs/aix5_proc_self_sysent.c (rev 0=
)
+++ trunk/auxprogs/aix5_proc_self_sysent.c 2006-10-17 01:04:15 UTC (rev 6=
245)
@@ -0,0 +1,37 @@
+
+/* A program which prints its own syscall name-to-number bindings.
+ Used to generate the basis of include/vki/vki-scnums-aix5.h and
+ coregrind/m_vkiscnums.c. */
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+
+#include <sys/procfs.h>
+
+#define NN 100000
+char buf[NN];
+int nbuf =3D 0;
+
+int main ( void )
+{
+ int i;
+ char name[50];
+ sprintf(name, "/proc/%d/sysent", getpid());
+ FILE* f =3D fopen(name, "r");
+ assert(f);
+ nbuf =3D fread(buf, 1, NN, f);
+ assert(nbuf > 0 && nbuf <=3D NN);
+
+ prsysent_t* header =3D (prsysent_t*)&buf[0];
+ if (0) printf("Found %u syscalls\n\n", header->pr_nsyscalls);
+
+ for (i =3D 0; i < header->pr_nsyscalls; i++) {
+ printf("%3u %s\n", header->pr_syscall[i].pr_number,
+ &buf[ header->pr_syscall[i].pr_nameoff ]);
+ }
+
+ fclose(f);
+ return 0;
+}
Added: trunk/include/vki/vki-ppc32-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki/vki-ppc32-aix5.h (rev 0)
+++ trunk/include/vki/vki-ppc32-aix5.h 2006-10-17 01:04:15 UTC (rev 6245)
@@ -0,0 +1,457 @@
+
+/*--------------------------------------------------------------------*/
+/*--- 32-bit AIX5-specific kernel interface. vki-ppc32-aix5.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2006 OpenWorks LLP
+ in...@op...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+/* This file defines types and constants for the kernel interface, and t=
o
+ make that clear everything is prefixed VKI_/vki_.
+*/
+
+/* This file was generated by running auxprogs/aix5_VKI_info.c. */
+
+#ifndef __VKI_PPC32_AIX5_H
+#define __VKI_PPC32_AIX5_H
+
+#if !defined(VGP_ppc32_aix5)
+# error This file should be included in 32-bit AIX5 builds only.
+#endif
+
+//--------------------------------------------------------------
+// VERIFIED
+//--------------------------------------------------------------
+
+/* ---------------- Errors ---------------- */
+
+#define VKI_EINVAL 22
+#define VKI_EINTR 4
+#define VKI_ENOSYS 109
+#define VKI_EAGAIN 11
+#define VKI_ENOMEM 12
+#define VKI_EACCES 13
+#define VKI_EEXIST 17
+#define VKI_EPERM 1
+#define VKI_ENOENT 2
+#define VKI_ESRCH 3
+#define VKI_EBADF 9
+#define VKI_EFAULT 14
+#define VKI_EMFILE 24
+#define VKI_ECHILD 10
+#define VKI_EOVERFLOW 127
+#define VKI_ERESTARTSYS 0 /* AIX doesn't have this */
+
+/* ---------------- File I/O ---------------- */
+
+#define VKI_O_WRONLY 0x00000001
+#define VKI_O_RDONLY 0x00000000
+#define VKI_O_APPEND 0x00000008
+#define VKI_O_CREAT 0x00000100
+#define VKI_O_RDWR 0x00000002
+#define VKI_O_EXCL 0x00000400
+#define VKI_O_TRUNC 0x00000200
+
+#define VKI_S_IRUSR 0x00000100
+#define VKI_S_IXUSR 0x00000040
+#define VKI_S_IXGRP 0x00000008
+#define VKI_S_IXOTH 0x00000001
+#define VKI_S_IWUSR 0x00000080
+#define VKI_S_ISUID 0x00000800
+#define VKI_S_ISGID 0x00000400
+#define VKI_S_IFMT 0x0000f000
+#define VKI_S_IFDIR 0x00004000
+#define VKI_S_IFCHR 0x00002000
+#define VKI_S_IFBLK 0x00006000
+
+/* Next 3 are from include/vki/vki-linux.h */
+#define VKI_S_ISDIR(m) (((m) & VKI_S_IFMT) =3D=3D VKI_S_IFDIR)
+#define VKI_S_ISCHR(m) (((m) & VKI_S_IFMT) =3D=3D VKI_S_IFCHR)
+#define VKI_S_ISBLK(m) (((m) & VKI_S_IFMT) =3D=3D VKI_S_IFBLK)
+
+#define VKI_F_DUPFD 0x00000000
+#define VKI_F_SETFD 0x00000002
+#define VKI_FD_CLOEXEC 0x00000001
+
+#define VKI_R_OK 0x00000004
+#define VKI_W_OK 0x00000002
+#define VKI_X_OK 0x00000001
+
+/* Known:
+ sizeof(struct stat) =3D 116
+ st_dev: off 0 sz 4
+ st_ino: off 4 sz 4
+ st_mode: off 8 sz 4
+ st_uid: off 16 sz 4
+ st_gid: off 20 sz 4
+ st_size: off 28 sz 4
+*/
+struct vki_stat {
+ /* 0 */ UInt st_dev;
+ /* 4 */ UInt st_ino;
+ /* 8 */ UInt st_mode;
+ /* 12 */ UInt __off12;
+ /* 16 */ UInt st_uid;
+ /* 20 */ UInt st_gid;
+ /* 24 */ UInt __off24;
+ /* 28 */ UInt st_size;
+ /* 32 */ UChar __off32[116-32];
+};
+
+#define VKI_STX_NORMAL 0
+
+typedef UInt vki_size_t;
+
+#define VKI_SEEK_SET 0
+#define VKI_PATH_MAX 1023
+
+/* Known:
+ sizeof(struct iovec) =3D 8
+ iov_base: off 0 sz 4
+ iov_len: off 4 sz 4
+*/
+struct vki_iovec {
+ /* 0 */ Addr iov_base;
+ /* 4 */ UInt iov_len;
+};
+
+#define _VKI_IOC_NONE 0
+#define _VKI_IOC_READ 1 /* kernel reads, userspace writes */
+#define _VKI_IOC_WRITE 2 /* kernel writes, userspace reads */
+#define _VKI_IOC_DIR(_x) (((_x) >> 30) & 3)
+#define _VKI_IOC_SIZE(_x) (((_x) >> 16) & 0x7F)
+
+/* ---------------- MMappery ---------------- */
+
+#define VKI_PAGE_SIZE 4096 /* this is checked by the launcher */
+
+#define VKI_PROT_NONE 0x00000000
+#define VKI_PROT_READ 0x00000001
+#define VKI_PROT_WRITE 0x00000002
+#define VKI_PROT_EXEC 0x00000004
+
+#define VKI_MAP_FIXED 0x00000100
+#define VKI_MAP_PRIVATE 0x00000002
+#define VKI_MAP_ANONYMOUS 0x00000010
+
+/* ---------------- RLimitery ---------------- */
+
+/* rlimit: these pertain to syscall "appgetrlimit" */
+#define VKI_RLIMIT_DATA 0x00000002
+#define VKI_RLIMIT_NOFILE 0x00000007
+#define VKI_RLIMIT_STACK 0x00000003
+#define VKI_RLIMIT_CORE 0x00000004
+
+/* Known:
+ sizeof(struct rlimit) =3D 8
+ rlim_cur: off 0 sz 4
+ rlim_max: off 4 sz 4
+*/
+struct vki_rlimit {
+ UInt rlim_cur;
+ UInt rlim_max;
+};
+
+/* ---------------- Time ---------------- */
+
+/* Known:
+ sizeof(struct timeval) =3D 8
+ tv_sec: off 0 sz 4
+ tv_usec: off 4 sz 4
+*/
+struct vki_timeval {
+ UInt tv_sec; /* seconds */
+ UInt tv_usec; /* microseconds */
+};
+
+/* Known:
+ sizeof(struct timespec) =3D 8
+ tv_sec: off 0 sz 4
+ tv_nsec: off 4 sz 4
+*/
+struct vki_timespec {
+ UInt tv_sec; /* seconds */
+ UInt tv_nsec; /* nanoseconds */
+};
+
+/* ---------------- Signals ---------------- */
+
+/* This layout verified 27 July 06. */
+#define _VKI_NSIG_BPW 32
+#define _VKI_NSIG 64
+#define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW)
+
+typedef struct {
+ UInt sig[_VKI_NSIG_WORDS];
+} vki_sigset_t;
+
+#define VKI_SIGSEGV 11
+#define VKI_SIGBUS 10
+#define VKI_SIGFPE 8
+#define VKI_SIGHUP 1
+#define VKI_SIGINT 2
+#define VKI_SIGQUIT 3
+#define VKI_SIGABRT 6
+#define VKI_SIGUSR1 30
+#define VKI_SIGUSR2 31
+#define VKI_SIGPIPE 13
+#define VKI_SIGALRM 14
+#define VKI_SIGTERM 15
+/* VKI_SIGSTKFLT does not exist on AIX 5.2 */
+#define VKI_SIGTTIN 21
+#define VKI_SIGTTOU 22
+#define VKI_SIGXCPU 24
+#define VKI_SIGXFSZ 25
+#define VKI_SIGVTALRM 34
+#define VKI_SIGPROF 32
+#define VKI_SIGIO 23
+#define VKI_SIGPWR 29
+/* VKI_SIGUNUSED does not exist on AIX 5.2 */
+#define VKI_SIGRTMIN 50
+#define VKI_SIGRTMAX 57
+#define VKI_SIGTRAP 5
+#define VKI_SIGCONT 19
+#define VKI_SIGCHLD 20
+#define VKI_SIGWINCH 28
+#define VKI_SIGURG 16
+#define VKI_SIGILL 4
+#define VKI_SIGSTOP 17
+#define VKI_SIGKILL 9
+#define VKI_SIGTSTP 18
+#define VKI_SIGSYS 12
+
+/* Known:
+ sizeof(struct sigaction) =3D 16
+ sa_handler: off 0 sz 4
+ sa_mask: off 4 sz 8
+ sa_flags: off 12 sz 4
+ sa_sigaction: off 0 sz 4
+*/
+struct vki_sigaction {
+ void* ksa_handler;
+ vki_sigset_t sa_mask;
+ UInt sa_flags;
+};
+
+#define VKI_SA_ONSTACK 1
+#define VKI_SA_RESTART 8
+#define VKI_SA_RESETHAND 2
+#define VKI_SA_SIGINFO 256
+#define VKI_SA_NODEFER 512
+#define VKI_SA_NOCLDSTOP 4
+#define VKI_SA_NOCLDWAIT 1024
+
+#define VKI_SA_RESTORER 0 /* AIX doesn't have this */
+#define VKI_SA_NOMASK 0 /* AIX doesn't have this */
+#define VKI_SA_ONESHOT 0 /* AIX doesn't have this */
+
+#define VKI_SS_ONSTACK 1
+#define VKI_SS_DISABLE 2
+
+#define VKI_MINSIGSTKSZ 1168
+
+#define VKI_SI_TKILL 0 /* AIX doesn't have this */
+#define VKI_SI_USER 0 /* but it does have this */
+
+#define VKI_SIG_BLOCK 0
+#define VKI_SIG_SETMASK 2
+#define VKI_SIG_UNBLOCK 1
+#define VKI_SIG_IGN (void*)1
+#define VKI_SIG_DFL (void*)0
+
+#define VKI_SEGV_ACCERR 51
+#define VKI_SEGV_MAPERR 50
+
+#define VKI_TRAP_TRACE 61
+#define VKI_BUS_OBJERR 3
+#define VKI_BUS_ADRERR 2
+#define VKI_BUS_ADRALN 1
+#define VKI_FPE_FLTSUB 27
+#define VKI_FPE_FLTINV 26
+#define VKI_FPE_FLTRES 25
+#define VKI_FPE_FLTUND 24
+#define VKI_FPE_FLTOVF 23
+#define VKI_FPE_FLTDIV 22
+#define VKI_FPE_INTOVF 21
+#define VKI_FPE_INTDIV 20
+#define VKI_ILL_BADSTK 37
+#define VKI_ILL_COPROC 36
+#define VKI_ILL_PRVREG 35
+#define VKI_ILL_PRVOPC 34
+#define VKI_ILL_ILLTRP 33
+#define VKI_ILL_ILLADR 32
+#define VKI_ILL_ILLOPN 31
+#define VKI_ILL_ILLOPC 30
+
+/* Known:=20
+ sizeof(siginfo_t) =3D 64
+ si_signo: off 0 sz 4
+ si_code: off 8 sz 4
+ si_pid: off 12 sz 4
+ si_addr: off 20 sz 4
+*/
+typedef struct {
+ UInt si_signo;
+ UInt __off4;
+ UInt si_code;
+ UInt si_pid;
+ UInt __off16;
+ void* si_addr;
+ UInt __off24;
+ UInt __off28;
+ UInt __off32;
+ UInt __off36;
+ UInt __off40;
+ UInt __off44;
+ UInt __off48;
+ UInt __off52;
+ UInt __off56;
+ UInt __off60;
+} vki_siginfo_t;
+
+/* Known:
+ sizeof(stack_t) =3D 28
+ ss_sp: off 0 sz 4
+ ss_size: off 4 sz 4
+ ss_flags: off 8 sz 4
+*/
+typedef struct vki_sigaltstack {
+ /* 0 */ void* ss_sp;
+ /* 4 */ UInt ss_size;
+ /* 8 */ UInt ss_flags;
+ /* 12 */ UInt __off12;
+ /* 16 */ UInt __off16;
+ /* 20 */ UInt __off20;
+ /* 24 */ UInt __off24;
+} vki_stack_t;
+
+/* ---------------- Misc ---------------- */
+
+#define VKI_PTRACE_TRACEME 0 /* nb: is really PT_TRACE_ME */
+#define VKI_PTRACE_DETACH 31 /* nb: is really PT_DETACH */
+
+
+//--------------------------------------------------------------
+// BOGUS
+//--------------------------------------------------------------
+
+struct vki_dirent {
+ int bogus;
+};
+
+struct vki_sockaddr {
+ int bogus;
+};
+
+struct vki_pollfd {
+ int bogus;
+};
+
+/* Structure describing an Internet (IP) socket address. */
+//struct vki_sockaddr_in {
+// int bogus;
+//};
+
+struct vki_ucontext {
+ int bogus;
+};
+
+
+//--------------------------------------------------------------
+// FROM glibc-ports-2.4/sysdeps/unix/sysv/aix/dlldr.h
+//--------------------------------------------------------------
+
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/*
+
+ int __loadx(flag, module, arg1, arg2, arg3)
+
+ The __loadx() is a call to ld_loadutil() kernel function, which
+ does the real work. Note ld_loadutil() is not exported an cannot be
+ called directly from user space.
+
+ void *ld_loadutil() call is a utility function used for loader extensio=
ns
+ supporting run-time linking and dl*() functions.
+
+ void * - will return the modules entry point if it succeds of NULL
+ on failure.
+
+ int flag - the flag field performas a dual role: the top 8 bits specify
+ the work for __loadx() to perform, the bottom 8 bits are
+ used to pass flags to the work routines, all other bits are
+ reserved.
+
+*/
+
+#define VKI_DL_LOAD 0x1000000 /* __loadx(flag,buf, buf_len, filena=
me, libr_path) */
+#define VKI_DL_POSTLOADQ 0x2000000 /* __loadx(flag,buf, buf_len, module=
_handle) */
+#define VKI_DL_EXECQ 0x3000000 /* __loadx(flag,buf, buf_len) */
+#define VKI_DL_EXITQ 0x4000000 /* __loadx(flag,buf, buf_len) */
+#define VKI_DL_PREUNLOADQ 0x5000000 /* __loadx(flag,buf, buf_len, module=
_handle) */
+#define VKI_DL_INIT 0x6000000 /* __loadx(flag,NULL) */
+#define VKI_DL_GETSYM 0x7000000 /* __loadx(flag,symbol, index, modul=
es_data_origin) */
+#define VKI_DL_SETDEPEND 0x8000000 /* __loadx(flag,import_data_org, imp=
ort_index, */
+ /* export_data_org, exp=
ort_index) */
+#define VKI_DL_DELDEPEND 0x9000000 /* __loadx(flag,import_data_org, imp=
ort_index, */
+ /* export_data_org, exp=
ort_index) */
+#define VKI_DL_GLOBALSYM 0xA000000 /* __loadx(flag,symbol_name, ptr_to_=
rec_index, */
+ /* ptr_to_rec=
_data_org) */
+#define VKI_DL_UNIX_SYSCALL 0xB000000 /* __loadx(flag,syscall_symbol_nam=
e) */
+
+#define VKI_DL_FUNCTION_MASK 0xFF000000
+#define VKI_DL_SRCHDEPENDS 0x00100000
+#define VKI_DL_SRCHMODULE 0x00080000
+#define VKI_DL_SRCHLOADLIST 0x00040000
+#define VKI_DL_LOAD_LDX1 0x00040000
+#define VKI_DL_LOAD_RTL 0x00020000
+#define VKI_DL_HASHSTRING 0x00020000
+#define VKI_DL_INFO_OK 0x00010000
+#define VKI_DL_LOAD_DLINFO 0x00010000
+#define VKI_DL_UNLOADED 0x00020000
+
+
+#endif // __VKI_PPC32_AIX5_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Added: trunk/include/vki/vki-ppc64-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki/vki-ppc64-aix5.h (rev 0)
+++ trunk/include/vki/vki-ppc64-aix5.h 2006-10-17 01:04:15 UTC (rev 6245)
@@ -0,0 +1,458 @@
+
+/*--------------------------------------------------------------------*/
+/*--- 64-bit AIX5-specific kernel interface. vki-ppc64-aix5.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2006 OpenWorks LLP
+ in...@op...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+/* This file defines types and constants for the kernel interface, and t=
o
+ make that clear everything is prefixed VKI_/vki_.
+*/
+
+/* This file was generated by running auxprogs/aix5_VKI_info.c. */
+
+#ifndef __VKI_PPC64_AIX5_H
+#define __VKI_PPC64_AIX5_H
+
+#if !defined(VGP_ppc64_aix5)
+# error This file should be included in 64-bit AIX5 builds only.
+#endif
+
+//--------------------------------------------------------------
+// VERIFIED
+//--------------------------------------------------------------
+
+/* ---------------- Errors ---------------- */
+
+#define VKI_EINVAL 22
+#define VKI_EINTR 4
+#define VKI_ENOSYS 109
+#define VKI_EAGAIN 11
+#define VKI_ENOMEM 12
+#define VKI_EACCES 13
+#define VKI_EEXIST 17
+#define VKI_EPERM 1
+#define VKI_ENOENT 2
+#define VKI_ESRCH 3
+#define VKI_EBADF 9
+#define VKI_EFAULT 14
+#define VKI_EMFILE 24
+#define VKI_ECHILD 10
+#define VKI_EOVERFLOW 127
+#define VKI_ERESTARTSYS 0 /* AIX doesn't have this */
+
+/* ---------------- File I/O ---------------- */
+
+#define VKI_O_WRONLY 0x00000001
+#define VKI_O_RDONLY 0x00000000
+#define VKI_O_APPEND 0x00000008
+#define VKI_O_CREAT 0x00000100
+#define VKI_O_RDWR 0x00000002
+#define VKI_O_EXCL 0x00000400
+#define VKI_O_TRUNC 0x00000200
+
+#define VKI_S_IRUSR 0x00000100
+#define VKI_S_IXUSR 0x00000040
+#define VKI_S_IXGRP 0x00000008
+#define VKI_S_IXOTH 0x00000001
+#define VKI_S_IWUSR 0x00000080
+#define VKI_S_ISUID 0x00000800
+#define VKI_S_ISGID 0x00000400
+#define VKI_S_IFMT 0x0000f000
+#define VKI_S_IFDIR 0x00004000
+#define VKI_S_IFCHR 0x00002000
+#define VKI_S_IFBLK 0x00006000
+
+/* Next 3 are from include/vki/vki-linux.h */
+#define VKI_S_ISDIR(m) (((m) & VKI_S_IFMT) =3D=3D VKI_S_IFDIR)
+#define VKI_S_ISCHR(m) (((m) & VKI_S_IFMT) =3D=3D VKI_S_IFCHR)
+#define VKI_S_ISBLK(m) (((m) & VKI_S_IFMT) =3D=3D VKI_S_IFBLK)
+
+#define VKI_F_DUPFD 0x00000000
+#define VKI_F_SETFD 0x00000002
+#define VKI_FD_CLOEXEC 0x00000001
+
+#define VKI_R_OK 0x00000004
+#define VKI_W_OK 0x00000002
+#define VKI_X_OK 0x00000001
+
+/* Known:
+ sizeof(struct stat) =3D 176
+ st_dev: off 0 sz 8
+ st_ino: off 8 sz 8
+ st_mode: off 16 sz 4
+ st_uid: off 24 sz 4
+ st_gid: off 28 sz 4
+ st_size: off 168 sz 8
+*/
+struct vki_stat {
+ /* 0 */ ULong st_dev;
+ /* 8 */ ULong st_ino;
+ /* 16 */ UInt st_mode;
+ /* 20 */ UInt __off20;
+ /* 24 */ UInt st_uid;
+ /* 28 */ UInt st_gid;
+ /* 32 */ UChar __off28[168-32];
+ /* 168 */ ULong st_size;
+};
+
+#define VKI_STX_NORMAL 0
+
+typedef ULong vki_size_t;
+
+#define VKI_SEEK_SET 0
+#define VKI_PATH_MAX 1023
+
+/* Known:
+ sizeof(struct iovec) =3D 16
+ iov_base: off 0 sz 8
+ iov_len: off 8 sz 8
+
+*/
+struct vki_iovec {
+ /* 0 */ Addr iov_base;
+ /* 8 */ ULong iov_len;
+};
+
+#define _VKI_IOC_NONE 0
+#define _VKI_IOC_READ 1 /* kernel reads, userspace writes */
+#define _VKI_IOC_WRITE 2 /* kernel writes, userspace reads */
+#define _VKI_IOC_DIR(_x) (((_x) >> 30) & 3)
+#define _VKI_IOC_SIZE(_x) (((_x) >> 16) & 0x7F)
+
+/* ---------------- MMappery ---------------- */
+
+#define VKI_PAGE_SIZE 4096 /* this is checked by the launcher */
+
+#define VKI_PROT_NONE 0x00000000
+#define VKI_PROT_READ 0x00000001
+#define VKI_PROT_WRITE 0x00000002
+#define VKI_PROT_EXEC 0x00000004
+
+#define VKI_MAP_FIXED 0x00000100
+#define VKI_MAP_PRIVATE 0x00000002
+#define VKI_MAP_ANONYMOUS 0x00000010
+
+/* ---------------- RLimitery ---------------- */
+
+/* rlimit: these pertain to syscall "appgetrlimit" */
+#define VKI_RLIMIT_DATA 0x00000002
+#define VKI_RLIMIT_NOFILE 0x00000007
+#define VKI_RLIMIT_STACK 0x00000003
+#define VKI_RLIMIT_CORE 0x00000004
+
+/* Known:
+ sizeof(struct rlimit) =3D 16
+ rlim_cur: off 0 sz 8
+ rlim_max: off 8 sz 8
+*/
+struct vki_rlimit {
+ /* 0 */ ULong rlim_cur;
+ /* 8 */ ULong rlim_max;
+};
+
+/* ---------------- Time ---------------- */
+
+/* Known:
+ sizeof(struct timeval) =3D 16
+ tv_sec: off 0 sz 8
+ tv_usec: off 8 sz 4
+*/
+struct vki_timeval {
+ /* 0 */ ULong tv_sec; /* seconds */
+ /* 8 */ UInt tv_usec; /* microseconds */
+ /* 12 */ UInt __off12;
+};
+
+/* Known:
+ sizeof(struct timespec) =3D 16
+ tv_sec: off 0 sz 8
+ tv_nsec: off 8 sz 8
+*/
+struct vki_timespec {
+ /* 0 */ ULong tv_sec; /* seconds */
+ /* 8 */ ULong tv_nsec; /* nanoseconds */
+};
+
+/* ---------------- Signals ---------------- */
+
+/* This layout verified 27 July 06. */
+#define _VKI_NSIG_BPW 64
+#define _VKI_NSIG 256
+#define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW)
+
+typedef struct {
+ ULong sig[_VKI_NSIG_WORDS];
+} vki_sigset_t;
+
+#define VKI_SIGSEGV 11
+#define VKI_SIGBUS 10
+#define VKI_SIGFPE 8
+#define VKI_SIGHUP 1
+#define VKI_SIGINT 2
+#define VKI_SIGQUIT 3
+#define VKI_SIGABRT 6
+#define VKI_SIGUSR1 30
+#define VKI_SIGUSR2 31
+#define VKI_SIGPIPE 13
+#define VKI_SIGALRM 14
+#define VKI_SIGTERM 15
+/* VKI_SIGSTKFLT does not exist on AIX 5.2 */
+#define VKI_SIGTTIN 21
+#define VKI_SIGTTOU 22
+#define VKI_SIGXCPU 24
+#define VKI_SIGXFSZ 25
+#define VKI_SIGVTALRM 34
+#define VKI_SIGPROF 32
+#define VKI_SIGIO 23
+#define VKI_SIGPWR 29
+/* VKI_SIGUNUSED does not exist on AIX 5.2 */
+#define VKI_SIGRTMIN 50
+#define VKI_SIGRTMAX 57
+#define VKI_SIGTRAP 5
+#define VKI_SIGCONT 19
+#define VKI_SIGCHLD 20
+#define VKI_SIGWINCH 28
+#define VKI_SIGURG 16
+#define VKI_SIGILL 4
+#define VKI_SIGSTOP 17
+#define VKI_SIGKILL 9
+#define VKI_SIGTSTP 18
+#define VKI_SIGSYS 12
+
+/* Known:
+ sizeof(struct sigaction) =3D 48
+ sa_sigaction: off 0 sz 8
+ sa_handler: off 0 sz 8
+ sa_mask: off 8 sz 32
+ sa_flags: off 40 sz 4
+*/
+struct vki_sigaction {
+ /* 0 */ void* ksa_handler;
+ /* 8 */ vki_sigset_t sa_mask;
+ /* 40 */ UInt sa_flags;
+ /* 44 */ UInt __off44;
+};
+
+#define VKI_SA_ONSTACK 1
+#define VKI_SA_RESTART 8
+#define VKI_SA_RESETHAND 2
+#define VKI_SA_SIGINFO 256
+#define VKI_SA_NODEFER 512
+#define VKI_SA_NOCLDSTOP 4
+#define VKI_SA_NOCLDWAIT 1024
+
+#define VKI_SA_RESTORER 0 /* AIX doesn't have this */
+#define VKI_SA_NOMASK 0 /* AIX doesn't have this */
+#define VKI_SA_ONESHOT 0 /* AIX doesn't have this */
+
+#define VKI_SS_ONSTACK 1
+#define VKI_SS_DISABLE 2
+
+#define VKI_MINSIGSTKSZ 1200
+
+#define VKI_SI_TKILL 0 /* AIX doesn't have this */
+#define VKI_SI_USER 0 /* but it does have this */
+
+#define VKI_SIG_BLOCK 0
+#define VKI_SIG_SETMASK 2
+#define VKI_SIG_UNBLOCK 1
+#define VKI_SIG_IGN (void*)1
+#define VKI_SIG_DFL (void*)0
+
+#define VKI_SEGV_ACCERR 51
+#define VKI_SEGV_MAPERR 50
+
+#define VKI_TRAP_TRACE 61
+#define VKI_BUS_OBJERR 3
+#define VKI_BUS_ADRERR 2
+#define VKI_BUS_ADRALN 1
+#define VKI_FPE_FLTSUB 27
+#define VKI_FPE_FLTINV 26
+#define VKI_FPE_FLTRES 25
+#define VKI_FPE_FLTUND 24
+#define VKI_FPE_FLTOVF 23
+#define VKI_FPE_FLTDIV 22
+#define VKI_FPE_INTOVF 21
+#define VKI_FPE_INTDIV 20
+
+#define VKI_ILL_BADSTK 37
+#define VKI_ILL_COPROC 36
+#define VKI_ILL_PRVREG 35
+#define VKI_ILL_PRVOPC 34
+#define VKI_ILL_ILLTRP 33
+#define VKI_ILL_ILLADR 32
+#define VKI_ILL_ILLOPN 31
+#define VKI_ILL_ILLOPC 30
+
+/* Known:=20
+ sizeof(siginfo_t) =3D 64
+ si_signo: off 0 sz 4
+ si_code: off 8 sz 4
+ si_pid: off 12 sz 4
+ si_addr: off 24 sz 8
+*/
+typedef struct {
+ /* 0 */ UInt si_signo;
+ /* 4 */ UInt __off4;
+ /* 8 */ UInt si_code;
+ /* 12 */ UInt si_pid;
+ /* 16 */ UInt __off16;
+ /* 20 */ UInt __off20;
+ /* 24 */ void* si_addr;
+ /* 32 */ UInt __off32;
+ /* 36 */ UInt __off36;
+ /* 40 */ UInt __off40;
+ /* 44 */ UInt __off44;
+ /* 48 */ UInt __off48;
+ /* 52 */ UInt __off52;
+ /* 56 */ UInt __off56;
+ /* 60 */ UInt __off60;
+} vki_siginfo_t;
+
+/* Known:
+ sizeof(stack_t) =3D 40
+ ss_sp: off 0 sz 8
+ ss_size: off 8 sz 8
+ ss_flags: off 16 sz 4
+*/
+typedef struct vki_sigaltstack {
+ /* 0 */ void* ss_sp;
+ /* 8 */ ULong ss_size;
+ /* 16 */ UInt ss_flags;
+ /* 20 */ UInt __off20;
+ /* 24 */ ULong __off24;
+ /* 32 */ ULong __off32;
+} vki_stack_t;
+
+/* ---------------- Misc ---------------- */
+
+#define VKI_PTRACE_TRACEME 0 /* nb: is really PT_TRACE_ME */
+#define VKI_PTRACE_DETACH 31 /* nb: is really PT_DETACH */
+
+
+//--------------------------------------------------------------
+// BOGUS
+//--------------------------------------------------------------
+
+struct vki_dirent {
+ int bogus;
+};
+
+struct vki_sockaddr {
+ int bogus;
+};
+
+struct vki_pollfd {
+ int bogus;
+};
+
+/* Structure describing an Internet (IP) socket address. */
+//struct vki_sockaddr_in {
+// int bogus;
+//};
+
+struct vki_ucontext {
+ int bogus;
+};
+
+
+//--------------------------------------------------------------
+// FROM glibc-ports-2.4/sysdeps/unix/sysv/aix/dlldr.h
+//--------------------------------------------------------------
+
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/*
+
+ int __loadx(flag, module, arg1, arg2, arg3)
+
+ The __loadx() is a call to ld_loadutil() kernel function, which
+ does the real work. Note ld_loadutil() is not exported an cannot be
+ called directly from user space.
+
+ void *ld_loadutil() call is a utility function used for loader extensio=
ns
+ supporting run-time linking and dl*() functions.
+
+ void * - will return the modules entry point if it succeds of NULL
+ on failure.
+
+ int flag - the flag field performas a dual role: the top 8 bits specify
+ the work for __loadx() to perform, the bottom 8 bits are
+ used to pass flags to the work routines, all other bits are
+ reserved.
+
+*/
+
+#define VKI_DL_LOAD 0x1000000 /* __loadx(flag,buf, buf_len, filena=
me, libr_path) */
+#define VKI_DL_POSTLOADQ 0x2000000 /* __loadx(flag,buf, buf_len, module=
_handle) */
+#define VKI_DL_EXECQ 0x3000000 /* __loadx(flag,buf, buf_len) */
+#define VKI_DL_EXITQ 0x4000000 /* __loadx(flag,buf, buf_len) */
+#define VKI_DL_PREUNLOADQ 0x5000000 /* __loadx(flag,buf, buf_len, module=
_handle) */
+#define VKI_DL_INIT 0x6000000 /* __loadx(flag,NULL) */
+#define VKI_DL_GETSYM 0x7000000 /* __loadx(flag,symbol, index, modul=
es_data_origin) */
+#define VKI_DL_SETDEPEND 0x8000000 /* __loadx(flag,import_data_org, imp=
ort_index, */
+ /* export_data_org, exp=
ort_index) */
+#define VKI_DL_DELDEPEND 0x9000000 /* __loadx(flag,import_data_org, imp=
ort_index, */
+ /* export_data_org, exp=
ort_index) */
+#define VKI_DL_GLOBALSYM 0xA000000 /* __loadx(flag,symbol_name, ptr_to_=
rec_index, */
+ /* ptr_to_rec=
_data_org) */
+#define VKI_DL_UNIX_SYSCALL 0xB000000 /* __loadx(flag,syscall_symbol_nam=
e) */
+
+#define VKI_DL_FUNCTION_MASK 0xFF000000
+#define VKI_DL_SRCHDEPENDS 0x00100000
+#define VKI_DL_SRCHMODULE 0x00080000
+#define VKI_DL_SRCHLOADLIST 0x00040000
+#define VKI_DL_LOAD_LDX1 0x00040000
+#define VKI_DL_LOAD_RTL 0x00020000
+#define VKI_DL_HASHSTRING 0x00020000
+#define VKI_DL_INFO_OK 0x00010000
+#define VKI_DL_LOAD_DLINFO 0x00010000
+#define VKI_DL_UNLOADED 0x00020000
+
+
+#endif // __VKI_PPC64_AIX5_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
Added: trunk/include/vki/vki-scnums-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki/vki-scnums-aix5.h (rev 0)
+++ trunk/include/vki/vki-scnums-aix5.h 2006-10-17 01:04:15 UTC (rev 6245=
)
@@ -0,0 +1,1613 @@
+
+/*--------------------------------------------------------------------*/
+/*--- System call numbers for ppc32-aix5 and ppc64-aix5. ---*/
+/*--- vki-scnums-aix5.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2006-2006 OpenWorks LLP
+ in...@op...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __VKI_SCNUMS_AIX5_H
+#define __VKI_SCNUMS_AIX5_H
+
+#if !defined(VGP_ppc32_aix5) && !defined(VGP_ppc64_aix5)
+# error This file should be included in AIX5 builds only.
+#endif
+
+//--------------------------------------------------------------
+// Syscalls for AIX 5.2 running on ppc32
+//--------------------------------------------------------------
+
+/* Make it possible to include this file in assembly sources. */
+#if !defined(VG_IN_ASSEMBLY_SOURCE)
+
+/* This is the initial value for a syscall number, when we don't
+ know what it is. */
+#define __NR_AIX5_UNKNOWN (-1)
+
+/* Vanilla AIX 5.2 ones */
+
+extern Int VG_(aix5_NR_utrchook_sc);
+#define __NR_AIX5_utrchook_sc VG_(aix5_NR_utrchook_sc)
+
+extern Int VG_(aix5_NR_thread_create);
+#define __NR_AIX5_thread_create VG_(aix5_NR_thread_create)
+
+extern Int VG_(aix5_NR_kfork);
+#define __NR_AIX5_kfork VG_(aix5_NR_kfork)
+
+extern Int VG_(aix5_NR_kra_fork);
+#define __NR_AIX5_kra_fork VG_(aix5_NR_kra_fork)
+
+extern Int VG_(aix5_NR_execve);
+#define __NR_AIX5_execve VG_(aix5_NR_execve)
+
+extern Int VG_(aix5_NR_ra_execve);
+#define __NR_AIX5_ra_execve VG_(aix5_NR_ra_execve)
+
+extern Int VG_(aix5_NR__load);
+#define __NR_AIX5__load VG_(aix5_NR__load)
+
+extern Int VG_(aix5_NR___unload);
+#define __NR_AIX5___unload VG_(aix5_NR___unload)
+
+extern Int VG_(aix5_NR_loadbind);
+#define __NR_AIX5_loadbind VG_(aix5_NR_loadbind)
+
+extern Int VG_(aix5_NR___loadx);
+#define __NR_AIX5___loadx VG_(aix5_NR___loadx)
+
+extern Int VG_(aix5_NR_bindprocessor);
+#define __NR_AIX5_bindprocessor VG_(aix5_NR_bindprocessor)
+
+extern Int VG_(aix5_NR_trcgent);
+#define __NR_AIX5_trcgent VG_(aix5_NR_trcgent)
+
+extern Int VG_(aix5_NR_trcgen);
+#define __NR_AIX5_trcgen VG_(aix5_NR_trcgen)
+
+extern Int VG_(aix5_NR_trchk);
+#define __NR_AIX5_trchk VG_(aix5_NR_trchk)
+
+extern Int VG_(aix5_NR_trchkt);
+#define __NR_AIX5_trchkt VG_(aix5_NR_trchkt)
+
+extern Int VG_(aix5_NR_trchkl);
+#define __NR_AIX5_trchkl VG_(aix5_NR_trchkl)
+
+extern Int VG_(aix5_NR_trchklt);
+#define __NR_AIX5_trchklt VG_(aix5_NR_trchklt)
+
+extern Int VG_(aix5_NR_trchkg);
+#define __NR_AIX5_trchkg VG_(aix5_NR_trchkg)
+
+extern Int VG_(aix5_NR_trchkgt);
+#define __NR_AIX5_trchkgt VG_(aix5_NR_trchkgt)
+
+extern Int VG_(aix5_NR_kill);
+#define __NR_AIX5_kill VG_(aix5_NR_kill)
+
+extern Int VG_(aix5_NR__addcpucosts);
+#define __NR_AIX5__addcpucosts VG_(aix5_NR__addcpucosts)
+
+extern Int VG_(aix5_NR_mycpu);
+#define __NR_AIX5_mycpu VG_(aix5_NR_mycpu)
+
+extern Int VG_(aix5_NR_adjtime);
+#define __NR_AIX5_adjtime VG_(aix5_NR_adjtime)
+
+extern Int VG_(aix5_NR_checkpnt_block);
+#define __NR_AIX5_checkpnt_block VG_(aix5_NR_checkpnt_block)
+
+extern Int VG_(aix5_NR__checkpnt_kill);
+#define __NR_AIX5__checkpnt_kill VG_(aix5_NR__checkpnt_kill)
+
+extern Int VG_(aix5_NR__checkpnt_fail);
+#define __NR_AIX5__checkpnt_fail VG_(aix5_NR__checkpnt_fail)
+
+extern Int VG_(aix5_NR__checkpnt_commit);
+#define __NR_AIX5__checkpnt_commit VG_(aix5_NR__checkpnt_commit)
+
+extern Int VG_(aix5_NR__checkpnt_register);
+#define __NR_AIX5__checkpnt_register VG_(aix5_NR__checkpnt_register)
+
+extern Int VG_(aix5_NR__checkpnt);
+#define __NR_AIX5__checkpnt VG_(aix5_NR__checkpnt)
+
+extern Int VG_(aix5_NR_setcrid);
+#define __NR_AIX5_setcrid VG_(aix5_NR_setcrid)
+
+extern Int VG_(aix5_NR_getcrid);
+#define __NR_AIX5_getcrid VG_(aix5_NR_getcrid)
+
+extern Int VG_(aix5_NR_mkcrid);
+#define __NR_AIX5_mkcrid VG_(aix5_NR_mkcrid)
+
+extern Int VG_(aix5_NR_checkpnt_wait);
+#define __NR_AIX5_checkpnt_wait VG_(aix5_NR_checkpnt_wait)
+
+extern Int VG_(aix5_NR_checkpnt_deliver);
+#define __NR_AIX5_checkpnt_deliver VG_(aix5_NR_checkpnt_deliver)
+
+extern Int VG_(aix5_NR_gencore);
+#define __NR_AIX5_gencore VG_(aix5_NR_gencore)
+
+extern Int VG_(aix5_NR_thread_terminate);
+#define __NR_AIX5_thread_terminate VG_(aix5_NR_thread_terminate)
+
+extern Int VG_(aix5_NR__exit);
+#define __NR_AIX5__exit VG_(aix5_NR__exit)
+
+extern Int VG_(aix5_NR_kwaitpid64);
+#define __NR_AIX5_kwaitpid64 VG_(aix5_NR_kwaitpid64)
+
+extern Int VG_(aix5_NR_kwaitpid);
+#define __NR_AIX5_kwaitpid VG_(aix5_NR_kwaitpid)
+
+extern Int VG_(aix5_NR_yield);
+#define __NR_AIX5_yield VG_(aix5_NR_yield)
+
+extern Int VG_(aix5_NR_getprocs64);
+#define __NR_AIX5_getprocs64 VG_(aix5_NR_getprocs64)
+
+extern Int VG_(aix5_NR_getevars);
+#define __NR_AIX5_getevars VG_(aix5_NR_getevars)
+
+extern Int VG_(aix5_NR_getargs);
+#define __NR_AIX5_getargs VG_(aix5_NR_getargs)
+
+extern Int VG_(aix5_NR_getthrds64);
+#define __NR_AIX5_getthrds64 VG_(aix5_NR_getthrds64)
+
+extern Int VG_(aix5_NR_getthrds);
+#define __NR_AIX5_getthrds VG_(aix5_NR_getthrds)
+
+extern Int VG_(aix5_NR_getprocs);
+#define __NR_AIX5_getprocs VG_(aix5_NR_getprocs)
+
+extern Int VG_(aix5_NR_sigcleanup);
+#define __NR_AIX5_sigcleanup VG_(aix5_NR_sigcleanup)
+
+extern Int VG_(aix5_NR__setpri);
+#define __NR_AIX5__setpri VG_(aix5_NR__setpri)
+
+extern Int VG_(aix5_NR__getpri);
+#define __NR_AIX5__getpri VG_(aix5_NR__getpri)
+
+extern Int VG_(aix5_NR_profil);
+#define __NR_AIX5_profil VG_(aix5_NR_profil)
+
+extern Int VG_(aix5_NR_reboot);
+#define __NR_AIX5_reboot VG_(aix5_NR_reboot)
+
+extern Int VG_(aix5_NR_appgetrlimit);
+#define __NR_AIX5_appgetrlimit VG_(aix5_NR_appgetrlimit)
+
+extern Int VG_(aix5_NR_appsetrlimit);
+#define __NR_AIX5_appsetrlimit VG_(aix5_NR_appsetrlimit)
+
+extern Int VG_(aix5_NR__setpriority);
+#define __NR_AIX5__setpriority VG_(aix5_NR__setpriority)
+
+extern Int VG_(aix5_NR__getpriority);
+#define __NR_AIX5__getpriority VG_(aix5_NR__getpriority)
+
+extern Int VG_(aix5_NR_setrlimit64);
+#define __NR_AIX5_setrlimit64 VG_(aix5_NR_setrlimit64)
+
+extern Int VG_(aix5_NR_getrlimit64);
+#define __NR_AIX5_getrlimit64 VG_(aix5_NR_getrlimit64)
+
+extern Int VG_(aix5_NR_appgetrusage);
+#define __NR_AIX5_appgetrusage VG_(aix5_NR_appgetrusage)
+
+extern Int VG_(aix5_NR_getrusage64);
+#define __NR_AIX5_getrusage64 VG_(aix5_NR_getrusage64)
+
+extern Int VG_(aix5_NR_getvtid);
+#define __NR_AIX5_getvtid VG_(aix5_NR_getvtid)
+
+extern Int VG_(aix5_NR_getrtid);
+#define __NR_AIX5_getrtid VG_(aix5_NR_getrtid)
+
+extern Int VG_(aix5_NR_getrpid);
+#define __NR_AIX5_getrpid VG_(aix5_NR_getrpid)
+
+extern Int VG_(aix5_NR_restart_wait);
+#define __NR_AIX5_restart_wait VG_(aix5_NR_restart_wait)
+
+extern Int VG_(aix5_NR_restart);
+#define __NR_AIX5_restart VG_(aix5_NR_restart)
+
+extern Int VG_(aix5_NR__rmcpucosts);
+#define __NR_AIX5__rmcpucosts VG_(aix5_NR__rmcpucosts)
+
+extern Int VG_(aix5_NR__clock_getcpuclockid);
+#define __NR_AIX5__clock_getcpuclockid VG_(aix5_NR__clock_getcpuclockid)
+
+extern Int VG_(aix5_NR__clock_settime);
+#define __NR_AIX5__clock_settime VG_(aix5_NR__clock_settime)
+
+extern Int VG_(aix5_NR__clock_gettime);
+#define __NR_AIX5__clock_gettime VG_(aix5_NR__clock_gettime)
+
+extern Int VG_(aix5_NR__clock_getres);
+#define __NR_AIX5__clock_getres VG_(aix5_NR__clock_getres)
+
+extern Int VG_(aix5_NR__timer_settime);
+#define __NR_AIX5__timer_settime VG_(aix5_NR__timer_settime)
+
+extern Int VG_(aix5_NR__timer_gettime);
+#define __NR_AIX5__timer_gettime VG_(aix5_NR__timer_gettime)
+
+extern Int VG_(aix5_NR__timer_getoverrun);
+#define __NR_AIX5__timer_getoverrun VG_(aix5_NR__timer_getoverrun)
+
+extern Int VG_(aix5_NR__timer_delete);
+#define __NR_AIX5__timer_delete VG_(aix5_NR__timer_delete)
+
+extern Int VG_(aix5_NR__timer_create);
+#define __NR_AIX5__timer_create VG_(aix5_NR__timer_create)
+
+extern Int VG_(aix5_NR__sigqueue);
+#define __NR_AIX5__sigqueue VG_(aix5_NR__sigqueue)
+
+extern Int VG_(aix5_NR__sigsuspend);
+#define __NR_AIX5__sigsuspend VG_(aix5_NR__sigsuspend)
+
+extern Int VG_(aix5_NR__sigaction);
+#define __NR_AIX5__sigaction VG_(aix5_NR__sigaction)
+
+extern Int VG_(aix5_NR_sigprocmask);
+#define __NR_AIX5_sigprocmask VG_(aix5_NR_sigprocmask)
+
+extern Int VG_(aix5_NR_siglocalmask);
+#define __NR_AIX5_siglocalmask VG_(aix5_NR_siglocalmask)
+
+extern Int VG_(aix5_NR_count_event_waiters);
+#define __NR_AIX5_count_event_waiters VG_(aix5_NR_count_event_waiters)
+
+extern Int VG_(aix5_NR_thread_waitact);
+#define __NR_AIX5_thread_waitact VG_(aix5_NR_thread_waitact)
+
+extern Int VG_(aix5_NR_thread_waitlock_local);
+#define __NR_AIX5_thread_waitlock_local VG_(aix5_NR_thread_waitlock_loca=
l)
+
+extern Int VG_(aix5_NR_thread_waitlock);
+#define __NR_AIX5_thread_waitlock VG_(aix5_NR_thread_waitlock)
+
+extern Int VG_(aix5_NR_thread_wait);
+#define __NR_AIX5_thread_wait VG_(aix5_NR_thread_wait)
+
+extern Int VG_(aix5_NR_thread_unlock);
+#define __NR_AIX5_thread_unlock VG_(aix5_NR_thread_unlock)
+
+extern Int VG_(aix5_NR_thread_twakeup_unlock);
+#define __NR_AIX5_thread_twakeup_unlock VG_(aix5_NR_thread_twakeup_unloc=
k)
+
+extern Int VG_(aix5_NR_thread_twakeup_event);
+#define __NR_AIX5_thread_twakeup_event VG_(aix5_NR_thread_twakeup_event)
+
+extern Int VG_(aix5_NR_thread_twakeup);
+#define __NR_AIX5_thread_twakeup VG_(aix5_NR_thread_twakeup)
+
+extern Int VG_(aix5_NR_thread_tsleep_event);
+#define __NR_AIX5_thread_tsleep_event VG_(aix5_NR_thread_tsleep_event)
+
+extern Int VG_(aix5_NR_thread_tsleep_chkpnt);
+#define __NR_AIX5_thread_tsleep_chkpnt VG_(aix5_NR_thread_tsleep_chkpnt)
+
+extern Int VG_(aix5_NR_thread_tsleep);
+#define __NR_AIX5_thread_tsleep VG_(aix5_NR_thread_tsleep)
+
+extern Int VG_(aix5_NR_thread_post_many);
+#define __NR_AIX5_thread_post_many VG_(aix5_NR_thread_post_many)
+
+extern Int VG_(aix5_NR_thread_post);
+#define __NR_AIX5_thread_post VG_(aix5_NR_thread_post)
+
+extern Int VG_(aix5_NR_ue_proc_unregister);
+#define __NR_AIX5_ue_proc_unregister VG_(aix5_NR_ue_proc_unregister)
+
+extern Int VG_(aix5_NR_ue_proc_register);
+#define __NR_AIX5_ue_proc_register VG_(aix5_NR_ue_proc_register)
+
+extern Int VG_(aix5_NR_kthread_ctl);
+#define __NR_AIX5_kthread_ctl VG_(aix5_NR_kthread_ctl)
+
+extern Int VG_(aix5_NR__thread_setsched);
+#define __NR_AIX5__thread_setsched VG_(aix5_NR__thread_setsched)
+
+extern Int VG_(aix5_NR_threads_runnable);
+#define __NR_AIX5_threads_runnable VG_(aix5_NR_threads_runnable)
+
+extern Int VG_(aix5_NR_thread_getregs);
+#define __NR_AIX5_thread_getregs VG_(aix5_NR_thread_getregs)
+
+extern Int VG_(aix5_NR_thread_terminate_unlock);
+#define __NR_AIX5_thread_terminate_unlock VG_(aix5_NR_thread_terminate_u=
nlock)
+
+extern Int VG_(aix5_NR_thread_terminate_ack);
+#define __NR_AIX5_thread_terminate_ack VG_(aix5_NR_thread_terminate_ack)
+
+extern Int VG_(aix5_NR_thread_setstate_fast);
+#define __NR_AIX5_thread_setstate_fast VG_(aix5_NR_thread_setstate_fast)
+
+extern Int VG_(aix5_NR_thread_setstate);
+#define __NR_AIX5_thread_setstate VG_(aix5_NR_thread_setstate)
+
+extern Int VG_(aix5_NR_thread_setmymask_fast);
+#define __NR_AIX5_thread_setmymask_fast VG_(aix5_NR_thread_setmymask_fas=
t)
+
+extern Int VG_(aix5_NR_thread_setmystate_fast);
+#define __NR_AIX5_thread_setmystate_fast VG_(aix5_NR_thread_setmystate_f=
ast)
+
+extern Int VG_(aix5_NR_thread_setmystate);
+#define __NR_AIX5_thread_setmystate VG_(aix5_NR_thread_setmystate)
+
+extern Int VG_(aix5_NR_thread_init);
+#define __NR_AIX5_thread_init VG_(aix5_NR_thread_init)
+
+extern Int VG_(aix5_NR_times);
+#define __NR_AIX5_times VG_(aix5_NR_times)
+
+extern Int VG_(aix5_NR__nsleep);
+#define __NR_AIX5__nsleep VG_(aix5_NR__nsleep)
+
+extern Int VG_(aix5_NR_reltimerid);
+#define __NR_AIX5_reltimerid VG_(aix5_NR_reltimerid)
+
+extern Int VG_(aix5_NR_appresinc);
+#define __NR_AIX5_appresinc VG_(aix5_NR_appresinc)
+
+extern Int VG_(aix5_NR_apprestimer);
+#define __NR_AIX5_apprestimer VG_(aix5_NR_apprestimer)
+
+extern Int VG_(aix5_NR_appresabs);
+#define __NR_AIX5_appresabs VG_(aix5_NR_appresabs)
+
+extern Int VG_(aix5_NR_appsettimer);
+#define __NR_AIX5_appsettimer VG_(aix5_NR_appsettimer)
+
+extern Int VG_(aix5_NR_appgettimer);
+#define __NR_AIX5_appgettimer VG_(aix5_NR_appgettimer)
+
+extern Int VG_(aix5_NR_gettimerid);
+#define __NR_AIX5_gettimerid VG_(aix5_NR_gettimerid)
+
+extern Int VG_(aix5_NR_incinterval);
+#define __NR_AIX5_incinterval VG_(aix5_NR_incinterval)
+
+extern Int VG_(aix5_NR_absinterval);
+#define __NR_AIX5_absinterval VG_(aix5_NR_absinterval)
+
+extern Int VG_(aix5_NR_getinterval);
+#define __NR_AIX5_getinterval VG_(aix5_NR_getinterval)
+
+extern Int VG_(aix5_NR_upfget);
+#define __NR_AIX5_upfget VG_(aix5_NR_upfget)
+
+extern Int VG_(aix5_NR__wlm_wait);
+#define __NR_AIX5__wlm_wait VG_(aix5_NR__wlm_wait)
+
+extern Int VG_(aix5_NR__wlm_post);
+#define __NR_AIX5__wlm_post VG_(aix5_NR__wlm_post)
+
+extern Int VG_(aix5_NR__wlm_event_init);
+#define __NR_AIX5__wlm_event_init VG_(aix5_NR__wlm_event_init)
+
+extern Int VG_(aix5_NR__wlm_set_tag);
+#define __NR_AIX5__wlm_set_tag VG_(aix5_NR__wlm_set_tag)
+
+extern Int VG_(aix5_NR__wlm_set);
+#define __NR_AIX5__wlm_set VG_(aix5_NR__wlm_set)
+
+extern Int VG_(aix5_NR_ptrace64);
+#define __NR_AIX5_ptrace64 VG_(aix5_NR_ptrace64)
+
+extern Int VG_(aix5_NR_ptracex);
+#define __NR_AIX5_ptracex VG_(aix5_NR_ptracex)
+
+extern Int VG_(aix5_NR_ptrace);
+#define __NR_AIX5_ptrace VG_(aix5_NR_ptrace)
+
+extern Int VG_(aix5_NR_ksetcontext_sigreturn);
+#define __NR_AIX5_ksetcontext_sigreturn VG_(aix5_NR_ksetcontext_sigretur=
n)
+
+extern Int VG_(aix5_NR_ksetcontext);
+#define __NR_AIX5_ksetcontext VG_(aix5_NR_ksetcontext)
+
+extern Int VG_(aix5_NR_kgetcontext);
+#define __NR_AIX5_kgetcontext VG_(aix5_NR_kgetcontext)
+
+extern Int VG_(aix5_NR_sigreturn);
+#define __NR_AIX5_sigreturn VG_(aix5_NR_sigreturn)
+
+extern Int VG_(aix5_NR__wlm_get_bio_stats);
+#define __NR_AIX5__wlm_get_bio_stats VG_(aix5_NR__wlm_get_bio_stats)
+
+extern Int VG_(aix5_NR_splice);
+#define __NR_AIX5_splice VG_(aix5_NR_splice)
+
+extern Int VG_(aix5_NR_rmsock);
+#define __NR_AIX5_rmsock VG_(aix5_NR_rmsock)
+
+extern Int VG_(aix5_NR_nrecvmsg);
+#define __NR_AIX5_nrecvmsg VG_(aix5_NR_nrecvmsg)
+
+extern Int VG_(aix5_NR_socket_aio_dequeue);
+#define __NR_AIX5_socket_aio_dequeue VG_(aix5_NR_socket_aio_dequeue)
+
+extern Int VG_(aix5_NR_getkerninfo);
+#define __NR_AIX5_getkerninfo VG_(aix5_NR_getkerninfo)
+
+extern Int VG_(aix5_NR_getpeereid);
+#define __NR_AIX5_getpeereid VG_(aix5_NR_getpeereid)
+
+extern Int VG_(aix5_NR_getpeername);
+#define __NR_AIX5_getpeername VG_(aix5_NR_getpeername)
+
+extern Int VG_(aix5_NR_ngetpeername);
+#define __NR_AIX5_ngetpeername VG_(aix5_NR_ngetpeername)
+
+extern Int VG_(aix5_NR_getsockname);
+#define __NR_AIX5_getsockname VG_(aix5_NR_getsockname)
+
+extern Int VG_(aix5_NR_ngetsockname);
+#define __NR_AIX5_ngetsockname VG_(aix5_NR_ngetsockname)
+
+extern Int VG_(aix5_NR_getsockopt);
+#define __NR_AIX5_getsockopt VG_(aix5_NR_getsockopt)
+
+extern Int VG_(aix5_NR_setsockopt);
+#define __NR_AIX5_setsockopt VG_(aix5_NR_setsockopt)
+
+extern Int VG_(aix5_NR_shutdown);
+#define __NR_AIX5_shutdown VG_(aix5_NR_shutdown)
+
+extern Int VG_(aix5_NR_recvmsg);
+#define __NR_AIX5_recvmsg VG_(aix5_NR_recvmsg)
+
+extern Int VG_(aix...
[truncated message content] |