summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/gthr-vxworks.h
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2007-05-19 01:19:51 +0000
committerkan <kan@FreeBSD.org>2007-05-19 01:19:51 +0000
commit1f9ea4d0a40cca64d60cf4dab152349da7b9dddf (patch)
tree0cb530c9c38af219e6dda2994c078b6b2b9ad853 /contrib/gcc/gthr-vxworks.h
parent4895159b2b4f648051c1f139faa7b6dc50c2bfcb (diff)
downloadFreeBSD-src-1f9ea4d0a40cca64d60cf4dab152349da7b9dddf.zip
FreeBSD-src-1f9ea4d0a40cca64d60cf4dab152349da7b9dddf.tar.gz
GCC 4.2.0 release.
Diffstat (limited to 'contrib/gcc/gthr-vxworks.h')
-rw-r--r--contrib/gcc/gthr-vxworks.h31
1 files changed, 29 insertions, 2 deletions
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 <semLib.h>
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. */
OpenPOWER on IntegriCloud