From 1f9ea4d0a40cca64d60cf4dab152349da7b9dddf Mon Sep 17 00:00:00 2001 From: kan Date: Sat, 19 May 2007 01:19:51 +0000 Subject: GCC 4.2.0 release. --- contrib/gcc/gthr-vxworks.h | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'contrib/gcc/gthr-vxworks.h') diff --git a/contrib/gcc/gthr-vxworks.h b/contrib/gcc/gthr-vxworks.h index 4fb3b09..5ff5234 100644 --- a/contrib/gcc/gthr-vxworks.h +++ b/contrib/gcc/gthr-vxworks.h @@ -17,8 +17,8 @@ for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ +Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. */ /* As a special exception, if you link this library with other files, some of which are compiled with GCC, to produce an executable, @@ -45,7 +45,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include typedef SEM_ID __gthread_mutex_t; +/* All VxWorks mutexes are recursive. */ +typedef SEM_ID __gthread_recursive_mutex_t; #define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function +#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function static inline void __gthread_mutex_init_function (__gthread_mutex_t *mutex) @@ -71,6 +74,30 @@ __gthread_mutex_unlock (__gthread_mutex_t *mutex) return semGive (*mutex); } +static inline void +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex) +{ + __gthread_mutex_init_function (mutex); +} + +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex) +{ + return __gthread_mutex_lock (mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex) +{ + return __gthread_mutex_trylock (mutex); +} + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex) +{ + return __gthread_mutex_unlock (mutex); +} + /* pthread_once is complicated enough that it's implemented out-of-line. See config/vxlib.c. */ -- cgit v1.1