This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH,RTEMS] Extending RTEMS stub crt0


Hi,

The patch below adds further stub functions for rtems-thread support in
in GCC/g++ to libc/sys/rtems/crt0.c.

Ralf

2005-12-06  Ralf Corsepius <ralf.corsepius@rtems.org>

	* libc/sys/rtems/crt0.c: Add rtems_gxx_key_create,
	rtems_gxx_key_delete, rtems_gxx_getspecific,
	rtems_gxx_setspecific, rtems_gxx_mutex_trylock, 
	rtems_gxx_recursive_mutex_init, rtems_gxx_recursive_mutex_lock, 
	rtems_gxx_recursive_mutex_trylock, rtems_gxx_recursive_mutex_unlock.


Index: libc/sys/rtems/crt0.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/rtems/crt0.c,v
retrieving revision 1.8
diff -u -r1.8 crt0.c
--- libc/sys/rtems/crt0.c	25 Oct 2004 17:53:19 -0000	1.8
+++ libc/sys/rtems/crt0.c	6 Dec 2005 08:25:56 -0000
@@ -21,10 +21,27 @@
 void free() { ; }
 void abort() { ; }
 int raise() { return -1; }
+
+#if defined(__GNUC__)
+/*
+ * stubs for libstdc++ rtems-threads support functions from gcc/gthr-rtems.h
+ */
+int rtems_gxx_once() { return -1; }
+int rtems_gxx_key_create() { return -1; }
+int rtems_gxx_key_delete() { return -1; }
+void *rtems_gxx_getspecific() { return 0; }
+int rtems_gxx_setspecific() { return -1; }
+
 void rtems_gxx_mutex_init() { }
 int rtems_gxx_mutex_lock() { return -1; }
+int rtems_gxx_mutex_trylock() { return -1; }
 int rtems_gxx_mutex_unlock() { return -1; }
-int rtems_gxx_once() { return -1; }
+
+void rtems_gxx_recursive_mutex_init() { }
+int rtems_gxx_recursive_mutex_lock() { return -1; }
+int rtems_gxx_recursive_mutex_trylock() { return -1; }
+int rtems_gxx_recursive_mutex_unlock() { return -1; }
+#endif
 
 /* stubs for functions from reent.h */
 int _close_r (struct _reent *r, int fd) { return -1; }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]