1132718Skan/* Threads compatibility routines for libgcc2. */ 2132718Skan/* Compile this one with gcc. */ 3169689Skan/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. 4132718Skan 5132718SkanThis file is part of GCC. 6132718Skan 7132718SkanGCC is free software; you can redistribute it and/or modify it under 8132718Skanthe terms of the GNU General Public License as published by the Free 9132718SkanSoftware Foundation; either version 2, or (at your option) any later 10132718Skanversion. 11132718SkanGCC is distributed in the hope that it will be useful, but WITHOUT ANY 12132718SkanWARRANTY; without even the implied warranty of MERCHANTABILITY or 13132718SkanFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14132718Skanfor more details. 15132718Skan 16132718SkanYou should have received a copy of the GNU General Public License 17132718Skanalong with GCC; see the file COPYING. If not, write to the Free 18169689SkanSoftware Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 19169689Skan02110-1301, USA. */ 20132718Skan 21132718Skan/* As a special exception, if you link this library with other files, 22132718Skan some of which are compiled with GCC, to produce an executable, 23132718Skan this library does not by itself cause the resulting executable 24132718Skan to be covered by the GNU General Public License. 25132718Skan This exception does not however invalidate any other reasons why 26132718Skan the executable file might be covered by the GNU General Public License. */ 27132718Skan 28132718Skan#ifndef GCC_GTHR_GNAT_H 29132718Skan#define GCC_GTHR_GNAT_H 30132718Skan 31169689Skan#ifndef HIDE_EXPORTS 32169689Skan#pragma GCC visibility push(default) 33169689Skan#endif 34169689Skan 35132718Skan/* Just provide compatibility for mutex handling. */ 36132718Skan 37132718Skantypedef int __gthread_mutex_t; 38132718Skan 39132718Skan#define __GTHREAD_MUTEX_INIT 0 40132718Skan 41132718Skanextern void __gnat_install_locks (void (*lock) (void), void (*unlock) (void)); 42132718Skanextern int __gthread_active_p (void); 43132718Skanextern int __gthread_mutex_lock (__gthread_mutex_t *); 44132718Skanextern int __gthread_mutex_unlock (__gthread_mutex_t *); 45132718Skan 46169689Skan#ifndef HIDE_EXPORTS 47169689Skan#pragma GCC visibility pop 48169689Skan#endif 49169689Skan 50132718Skan#endif /* ! GCC_GTHR_GNAT_H */ 51132718Skan 52