Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:13:31

0001 
0002 /*--------------------------------------------------------------------*/
0003 /*--- The thread state.                     pub_tool_threadstate.h ---*/
0004 /*--------------------------------------------------------------------*/
0005 
0006 /*
0007    This file is part of Valgrind, a dynamic binary instrumentation
0008    framework.
0009 
0010    Copyright (C) 2000-2017 Julian Seward
0011       jseward@acm.org
0012 
0013    This program is free software; you can redistribute it and/or
0014    modify it under the terms of the GNU General Public License as
0015    published by the Free Software Foundation; either version 2 of the
0016    License, or (at your option) any later version.
0017 
0018    This program is distributed in the hope that it will be useful, but
0019    WITHOUT ANY WARRANTY; without even the implied warranty of
0020    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0021    General Public License for more details.
0022 
0023    You should have received a copy of the GNU General Public License
0024    along with this program; if not, see <http://www.gnu.org/licenses/>.
0025 
0026    The GNU General Public License is contained in the file COPYING.
0027 */
0028 
0029 #ifndef __PUB_TOOL_THREADSTATE_H
0030 #define __PUB_TOOL_THREADSTATE_H
0031 
0032 #include "pub_tool_basics.h"   // ThreadID
0033 
0034 /* The maximum number of pthreads that we support. */
0035 extern UInt VG_N_THREADS;
0036 
0037 /* Special magic value for an invalid ThreadId.  It corresponds to
0038    LinuxThreads using zero as the initial value for
0039    pthread_mutex_t.__m_owner and pthread_cond_t.__c_waiting. */
0040 #define VG_INVALID_THREADID ((ThreadId)(0))
0041 
0042 /* Get the TID of the thread which currently has the CPU. */
0043 extern ThreadId VG_(get_running_tid) ( void );
0044 
0045 #endif   // __PUB_TOOL_THREADSTATE_H
0046 
0047 /*--------------------------------------------------------------------*/
0048 /*--- end                                                          ---*/
0049 /*--------------------------------------------------------------------*/