X-Git-Url: http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu%2Fglibc.git;a=blobdiff_plain;f=mach%2Fmutex-solid.c;h=5f223e533559ab1b28c11e2a3f10a8432b21f1bc;hp=b13a425cfefc5013753f7f1a173191f55b4888d6;hb=fcb39030cc930bbbcaaa302612b782ade4a49000;hpb=be05f7e934ac558cce320d685986e72f6c2fffc2 diff --git a/mach/mutex-solid.c b/mach/mutex-solid.c index b13a425cfe..5f223e5335 100644 --- a/mach/mutex-solid.c +++ b/mach/mutex-solid.c @@ -1,42 +1,37 @@ -/* Copyright (C) 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Stub versions of mutex_lock_solid/mutex_unlock_solid for no -lthreads. + Copyright (C) 1995, 1997 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 Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 -Library General Public License for more details. + 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 + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include #include -/* If cthreads is linked in, it will define these variables with values - that point to its mutex functions. */ -void (*_cthread_mutex_lock_routine) (struct mutex *); -void (*_cthread_mutex_unlock_routine) (struct mutex *); +/* If cthreads is linked in, it will define these functions itself to do + real cthreads mutex locks. This file will only be linked in when + cthreads is not used, and `mutexes' are in fact just spin locks (and + some unused storage). */ void __mutex_lock_solid (void *lock) { - if (_cthread_mutex_lock_routine) - (*_cthread_mutex_lock_routine) (lock); - else - __spin_lock_solid (lock); + __spin_lock_solid (lock); } void __mutex_unlock_solid (void *lock) { - if (_cthread_mutex_unlock_routine) - (*_cthread_mutex_unlock_routine) (lock); } -