Files
ftmemsim-valgrind/coregrind/pub_core_syscalls.h
Nicholas Nethercote 7a6ee2fc93 Improved structure of LDT-related code:
- one declarations from core.h removed, one moved to within m_syscalls.
- all the x86 LDT stuff made local to m_syscalls.  x86-linux/ldt.c removed
  as a result.  x86/state.c slimmed down, too.  x86/x86_private.h removed
  too.
- all the AMD64 LDT stuff was deleted, since it was all commented out.  It
  can be added back in later in the appropriate places if necessary.
  Thus amd64-linux/ldt.c and amd64/amd64_private.h were removed.
- other minor naming changes

I hope I didn't break AMD64 compilation.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3726
2005-05-15 20:52:04 +00:00

73 lines
2.7 KiB
C

/*--------------------------------------------------------------------*/
/*--- System call wrappers, etc. pub_core_syscalls.h ---*/
/*--------------------------------------------------------------------*/
/*
This file is part of Valgrind, a dynamic binary instrumentation
framework.
Copyright (C) 2000-2005 Julian Seward
jseward@acm.org
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 __PUB_CORE_SYSCALLS_H
#define __PUB_CORE_SYSCALLS_H
//--------------------------------------------------------------------
// PURPOSE: This module contains all the syscall junk: mostly wrappers,
// but also the code that executes them, and related stuff.
//--------------------------------------------------------------------
extern HChar* VG_(resolve_filename_nodup)(Int fd);
extern HChar* VG_(resolve_filename)(Int fd);
extern void VG_(client_syscall) ( ThreadId tid );
extern void VG_(post_syscall) ( ThreadId tid );
// Fix up the thread's state because a syscall may have been
// interrupted with a signal. Returns True if the syscall completed
// (either interrupted or finished normally), or False if it was
// restarted (or the signal didn't actually interrupt a syscall).
extern void VGP_(interrupted_syscall)(ThreadId tid,
struct vki_ucontext *uc,
Bool restart);
// Release resources held by this thread
extern void VGP_(cleanup_thread) ( ThreadArchState* );
extern Bool VG_(is_kerror) ( Word res );
/* Internal atfork handlers */
typedef void (*vg_atfork_t)(ThreadId);
extern void VG_(atfork)(vg_atfork_t pre, vg_atfork_t parent, vg_atfork_t child);
/* fd leakage calls. */
extern void VG_(init_preopened_fds) ( void );
extern void VG_(show_open_fds) ( void );
#endif // __PUB_CORE_SYSCALLS_H
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/