Changeset e8ece0b in rtems


Ignore:
Timestamp:
Jan 14, 2005, 5:03:32 AM (15 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Children:
0a7bcfd
Parents:
410c6f8
Message:

2005-01-14 Ralf Corsepius <ralf.corsepius@…>

  • src/gxx_wrappers.c: Backport from trunk. Add support for GCC-4.0.
Location:
cpukit/libcsupport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/ChangeLog

    r410c6f8 re8ece0b  
     12005-01-14      Ralf Corsepius <ralf.corsepius@rtems.org>
     2
     3        * src/gxx_wrappers.c: Backport from trunk. Add support for GCC-4.0.
     4
    152004-01-12      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    26
  • cpukit/libcsupport/src/gxx_wrappers.c

    r410c6f8 re8ece0b  
    1414 * module implementation.
    1515 *
    16  *
    17  */
     16 * $Id$
     17 */
     18
     19/*
     20 * This file is only used if using gcc
     21 */
     22#if defined(__GNUC__)
    1823
    1924#if HAVE_CONFIG_H
     
    3338#include <rtems/rtems/tasks.h>
    3439
    35 /* 
     40/*
    3641 * These typedefs should match with the ones defined in the file
    3742 * gcc/gthr-rtems.h in the gcc distribution.
     
    4045typedef int   __gthread_once_t;
    4146typedef void *__gthread_mutex_t;
    42 
     47typedef void *__gthread_recursive_mutex_t;
    4348
    4449/* uncomment this if you need to debug this interface */
     
    5257static rtems_id get_tid( void )
    5358{
    54    rtems_id id = 0; 
     59   rtems_id id = 0;
    5560   rtems_task_ident( RTEMS_SELF, 0, &id );
    5661   return id;
     
    8388  /* Ok, this can be a bit tricky. We are going to return a "key" as a
    8489   * pointer to the buffer that will hold the value of the key itself.
    85    * We have to to this, becuase the others functions on this interface
     90   * We have to to this, because the others functions on this interface
    8691   * deal with the value of the key, as used with the POSIX API.
    8792   */
     
    196201  printk( "gxx_wrappers: lock mutex=%X\n", *mutex );
    197202#endif
    198   return ( rtems_semaphore_obtain( (rtems_id)*mutex, 
     203  return ( rtems_semaphore_obtain( (rtems_id)*mutex,
    199204            RTEMS_WAIT, RTEMS_NO_TIMEOUT ) ==  RTEMS_SUCCESSFUL) ? 0 : -1;
    200205}
     
    205210  printk( "gxx_wrappers: trylock mutex=%X\n", *mutex );
    206211#endif
    207   return (rtems_semaphore_obtain ((rtems_id)*mutex, 
     212  return (rtems_semaphore_obtain ((rtems_id)*mutex,
    208213               RTEMS_NO_WAIT, 0) == RTEMS_SUCCESSFUL) ? 0 : -1;
    209214}
     
    217222}
    218223
     224void rtems_gxx_recursive_mutex_init_function(__gthread_recursive_mutex_t *mutex)
     225{
     226  rtems_gxx_mutex_init(mutex);
     227}
     228
     229int rtems_gxx_recursive_mutex_lock(__gthread_recursive_mutex_t *mutex)
     230{
     231  return rtems_gxx_mutex_lock(mutex);
     232}
     233
     234int rtems_gxx_recursive_mutex_trylock(__gthread_recursive_mutex_t *mutex)
     235{
     236  return rtems_gxx_mutex_trylock(mutex);
     237}
     238
     239int rtems_gxx_recursive_mutex_unlock(__gthread_recursive_mutex_t *mutex)
     240{
     241  return rtems_gxx_mutex_unlock(mutex);
     242}
     243
     244#endif /* __GNUC__ */
Note: See TracChangeset for help on using the changeset viewer.