mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2005-01-14 Ralf Corsepius <ralf.corsepius@rtems.org>
* src/gxx_wrappers.c: Backport from trunk. Add support for GCC-4.0.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2005-01-14 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
* src/gxx_wrappers.c: Backport from trunk. Add support for GCC-4.0.
|
||||||
|
|
||||||
2004-01-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2004-01-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
PR 548/rtems
|
PR 548/rtems
|
||||||
|
|||||||
@@ -13,9 +13,14 @@
|
|||||||
* Eric sent some e-mail in the rtems-list as a start point for this
|
* Eric sent some e-mail in the rtems-list as a start point for this
|
||||||
* module implementation.
|
* module implementation.
|
||||||
*
|
*
|
||||||
*
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is only used if using gcc
|
||||||
|
*/
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
#if HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -39,7 +44,7 @@
|
|||||||
typedef void *__gthread_key_t;
|
typedef void *__gthread_key_t;
|
||||||
typedef int __gthread_once_t;
|
typedef int __gthread_once_t;
|
||||||
typedef void *__gthread_mutex_t;
|
typedef void *__gthread_mutex_t;
|
||||||
|
typedef void *__gthread_recursive_mutex_t;
|
||||||
|
|
||||||
/* uncomment this if you need to debug this interface */
|
/* uncomment this if you need to debug this interface */
|
||||||
|
|
||||||
@@ -82,7 +87,7 @@ int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
|
|||||||
{
|
{
|
||||||
/* Ok, this can be a bit tricky. We are going to return a "key" as a
|
/* Ok, this can be a bit tricky. We are going to return a "key" as a
|
||||||
* pointer to the buffer that will hold the value of the key itself.
|
* pointer to the buffer that will hold the value of the key itself.
|
||||||
* We have to to this, becuase the others functions on this interface
|
* We have to to this, because the others functions on this interface
|
||||||
* deal with the value of the key, as used with the POSIX API.
|
* deal with the value of the key, as used with the POSIX API.
|
||||||
*/
|
*/
|
||||||
/* Do not pull your hair, trust me this works. :-) */
|
/* Do not pull your hair, trust me this works. :-) */
|
||||||
@@ -216,3 +221,24 @@ int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex)
|
|||||||
return (rtems_semaphore_release( (rtems_id)*mutex ) == RTEMS_SUCCESSFUL) ? 0 :-1;
|
return (rtems_semaphore_release( (rtems_id)*mutex ) == RTEMS_SUCCESSFUL) ? 0 :-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rtems_gxx_recursive_mutex_init_function(__gthread_recursive_mutex_t *mutex)
|
||||||
|
{
|
||||||
|
rtems_gxx_mutex_init(mutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
int rtems_gxx_recursive_mutex_lock(__gthread_recursive_mutex_t *mutex)
|
||||||
|
{
|
||||||
|
return rtems_gxx_mutex_lock(mutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
int rtems_gxx_recursive_mutex_trylock(__gthread_recursive_mutex_t *mutex)
|
||||||
|
{
|
||||||
|
return rtems_gxx_mutex_trylock(mutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
int rtems_gxx_recursive_mutex_unlock(__gthread_recursive_mutex_t *mutex)
|
||||||
|
{
|
||||||
|
return rtems_gxx_mutex_unlock(mutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* __GNUC__ */
|
||||||
|
|||||||
Reference in New Issue
Block a user