[PATCH 2/3] libcsupport: Remove unused gxx-wrapper function.

Christian Mauderer christian.mauderer at embedded-brains.de
Fri Mar 21 11:07:28 UTC 2014


From: Christian Mauderer <Christian.Mauderer at embedded-brains.de>

The rtems_gxx_key_dtor function is not longer used by gcc.
---
 cpukit/libcsupport/include/rtems/gxx_wrappers.h |  2 --
 cpukit/libcsupport/src/gxx_wrappers.c           | 10 ----------
 testsuites/libtests/gxx01/gxx01.doc             |  1 -
 testsuites/libtests/gxx01/gxx01.scn             |  1 -
 testsuites/libtests/gxx01/init.c                |  7 -------
 5 files changed, 21 deletions(-)

diff --git a/cpukit/libcsupport/include/rtems/gxx_wrappers.h b/cpukit/libcsupport/include/rtems/gxx_wrappers.h
index 33b1630..801223e 100644
--- a/cpukit/libcsupport/include/rtems/gxx_wrappers.h
+++ b/cpukit/libcsupport/include/rtems/gxx_wrappers.h
@@ -52,8 +52,6 @@ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void));
 
 int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *));
 
-int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr);
-
 int rtems_gxx_key_delete (__gthread_key_t key);
 
 void *rtems_gxx_getspecific(__gthread_key_t key);
diff --git a/cpukit/libcsupport/src/gxx_wrappers.c b/cpukit/libcsupport/src/gxx_wrappers.c
index 711daa4..0b9cad6 100644
--- a/cpukit/libcsupport/src/gxx_wrappers.c
+++ b/cpukit/libcsupport/src/gxx_wrappers.c
@@ -77,16 +77,6 @@ int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
   return -1;
 }
 
-int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr)
-{
-  #ifdef DEBUG_GXX_WRAPPERS
-    printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
-  #endif
-
-  key->val  = 0;
-  return 0;
-}
-
 int rtems_gxx_key_delete (__gthread_key_t key)
 {
   rtems_status_code status;
diff --git a/testsuites/libtests/gxx01/gxx01.doc b/testsuites/libtests/gxx01/gxx01.doc
index ea6d928..8200f25 100644
--- a/testsuites/libtests/gxx01/gxx01.doc
+++ b/testsuites/libtests/gxx01/gxx01.doc
@@ -14,7 +14,6 @@ directives:
 
   rtems_gxx_once
   rtems_gxx_key_create 
-  rtems_gxx_key_dtor 
   rtems_gxx_key_delete 
   rtems_gxx_getspecific
   rtems_gxx_setspecific
diff --git a/testsuites/libtests/gxx01/gxx01.scn b/testsuites/libtests/gxx01/gxx01.scn
index 5ffd498..cb9f6b5 100644
--- a/testsuites/libtests/gxx01/gxx01.scn
+++ b/testsuites/libtests/gxx01/gxx01.scn
@@ -27,6 +27,5 @@ rtems_gxx_getspecific(key) already existing - OK
 rtems_gxx_key_delete(key) - OK
 rtems_gxx_getspecific(key) non-existent - OK
 rtems_gxx_key_delete(key) - OK
-rtems_gxx_key_dtor(&key_obj) - OK
 
 *** END OF TEST GXX 01 ***
diff --git a/testsuites/libtests/gxx01/init.c b/testsuites/libtests/gxx01/init.c
index eb46725..cc704ef 100644
--- a/testsuites/libtests/gxx01/init.c
+++ b/testsuites/libtests/gxx01/init.c
@@ -127,7 +127,6 @@ void test_key(void)
   int              sc;
   __gthread_key_t  key;
   void            *p;
-  __gthread_key    key_obj;
 
   puts( "rtems_gxx_key_create(&key, NULL) - OK" );
   sc = rtems_gxx_key_create(&key, NULL);
@@ -164,12 +163,6 @@ void test_key(void)
   puts( "rtems_gxx_key_delete(key) - OK" );
   sc = rtems_gxx_key_delete( key );
   rtems_test_assert( sc == 0 );
-
-  memset( &key_obj, 0xff, sizeof( key_obj ) );
-  puts( "rtems_gxx_key_dtor(&key_obj) - OK" );
-  sc = rtems_gxx_key_dtor( &key_obj, key_dtor );
-  rtems_test_assert( sc == 0 );
-  rtems_test_assert( key_obj.val == 0 );
 }
 
 rtems_task Init(
-- 
1.8.4.5




More information about the devel mailing list