Changeset e8ece0b in rtems
- Timestamp:
- 01/14/05 05:03:32 (19 years ago)
- Children:
- 0a7bcfd
- Parents:
- 410c6f8
- Location:
- cpukit/libcsupport
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libcsupport/ChangeLog
r410c6f8 re8ece0b 1 2005-01-14 Ralf Corsepius <ralf.corsepius@rtems.org> 2 3 * src/gxx_wrappers.c: Backport from trunk. Add support for GCC-4.0. 4 1 5 2004-01-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 6 -
cpukit/libcsupport/src/gxx_wrappers.c
r410c6f8 re8ece0b 14 14 * module implementation. 15 15 * 16 * 17 */ 16 * $Id$ 17 */ 18 19 /* 20 * This file is only used if using gcc 21 */ 22 #if defined(__GNUC__) 18 23 19 24 #if HAVE_CONFIG_H … … 33 38 #include <rtems/rtems/tasks.h> 34 39 35 /* 40 /* 36 41 * These typedefs should match with the ones defined in the file 37 42 * gcc/gthr-rtems.h in the gcc distribution. … … 40 45 typedef int __gthread_once_t; 41 46 typedef void *__gthread_mutex_t; 42 47 typedef void *__gthread_recursive_mutex_t; 43 48 44 49 /* uncomment this if you need to debug this interface */ … … 52 57 static rtems_id get_tid( void ) 53 58 { 54 rtems_id id = 0; 59 rtems_id id = 0; 55 60 rtems_task_ident( RTEMS_SELF, 0, &id ); 56 61 return id; … … 83 88 /* Ok, this can be a bit tricky. We are going to return a "key" as a 84 89 * pointer to the buffer that will hold the value of the key itself. 85 * We have to to this, bec uase the others functions on this interface90 * We have to to this, because the others functions on this interface 86 91 * deal with the value of the key, as used with the POSIX API. 87 92 */ … … 196 201 printk( "gxx_wrappers: lock mutex=%X\n", *mutex ); 197 202 #endif 198 return ( rtems_semaphore_obtain( (rtems_id)*mutex, 203 return ( rtems_semaphore_obtain( (rtems_id)*mutex, 199 204 RTEMS_WAIT, RTEMS_NO_TIMEOUT ) == RTEMS_SUCCESSFUL) ? 0 : -1; 200 205 } … … 205 210 printk( "gxx_wrappers: trylock mutex=%X\n", *mutex ); 206 211 #endif 207 return (rtems_semaphore_obtain ((rtems_id)*mutex, 212 return (rtems_semaphore_obtain ((rtems_id)*mutex, 208 213 RTEMS_NO_WAIT, 0) == RTEMS_SUCCESSFUL) ? 0 : -1; 209 214 } … … 217 222 } 218 223 224 void rtems_gxx_recursive_mutex_init_function(__gthread_recursive_mutex_t *mutex) 225 { 226 rtems_gxx_mutex_init(mutex); 227 } 228 229 int rtems_gxx_recursive_mutex_lock(__gthread_recursive_mutex_t *mutex) 230 { 231 return rtems_gxx_mutex_lock(mutex); 232 } 233 234 int rtems_gxx_recursive_mutex_trylock(__gthread_recursive_mutex_t *mutex) 235 { 236 return rtems_gxx_mutex_trylock(mutex); 237 } 238 239 int 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.