mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
Remove obsolete rtems_gxx_*() implementation
GCC versions prior to 6.1 used a RTEMS thread model based on rtems_gxx_*() functions. GCC version 6.1 or later uses the self-contained synchronization objects of Newlib <sys/lock.h> for the RTEMS thread model. Remove the obsolete implementation. Close #3143.
This commit is contained in:
1 parent
e3f70b379b
commit
2145e0c7bf
18 files changed
+2
-812
No files matched your search
@@ -1,80 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* RTEMS threads compatibility routines for libgcc2.
|
||||
*/
|
||||
|
||||
/*
|
||||
* by: Rosimildo da Silva (rdasilva@connecttel.com)
|
||||
*
|
||||
* Used ideas from:
|
||||
* W. Eric Norum
|
||||
* Canadian Light Source
|
||||
* University of Saskatchewan
|
||||
* Saskatoon, Saskatchewan, CANADA
|
||||
* eric@cls.usask.ca
|
||||
*
|
||||
* Eric sent some e-mail in the rtems-list as a start point for this
|
||||
* module implementation.
|
||||
*/
|
||||
|
||||
#ifndef __GCC_WRAPPERS_h
|
||||
#define __GCC_WRAPPERS_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* @defgroup GxxWrappersSupport Gxx Wrappers Support
|
||||
*
|
||||
* @ingroup libcsupport
|
||||
*
|
||||
* @brief RTEMS Threads Compatibility Routines for Libgcc2
|
||||
*/
|
||||
|
||||
/*
|
||||
* These typedefs should match with the ones defined in the file
|
||||
* gcc/gthr-rtems.h in the gcc distribution.
|
||||
*/
|
||||
typedef void *__gthread_key_t;
|
||||
typedef int __gthread_once_t;
|
||||
typedef void *__gthread_mutex_t;
|
||||
typedef void *__gthread_recursive_mutex_t;
|
||||
|
||||
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_delete (__gthread_key_t key);
|
||||
|
||||
void *rtems_gxx_getspecific(__gthread_key_t key);
|
||||
|
||||
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr);
|
||||
|
||||
/*
|
||||
* MUTEX support
|
||||
*/
|
||||
void rtems_gxx_mutex_init (__gthread_mutex_t *mutex);
|
||||
|
||||
int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex);
|
||||
|
||||
int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex);
|
||||
|
||||
int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex);
|
||||
|
||||
int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex);
|
||||
|
||||
void rtems_gxx_recursive_mutex_init(__gthread_recursive_mutex_t *mutex);
|
||||
|
||||
int rtems_gxx_recursive_mutex_lock(__gthread_recursive_mutex_t *mutex);
|
||||
|
||||
int rtems_gxx_recursive_mutex_trylock(__gthread_recursive_mutex_t *mutex);
|
||||
|
||||
int rtems_gxx_recursive_mutex_unlock(__gthread_recursive_mutex_t *mutex);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __GCC_WRAPPERS_h */
|
||||
@@ -188,8 +188,8 @@ typedef enum {
|
||||
/* INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_FROM_BAD_STATE = 18, */
|
||||
/* INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0 = 19, */
|
||||
/* INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP = 20, */
|
||||
INTERNAL_ERROR_GXX_KEY_ADD_FAILED = 21,
|
||||
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED = 22,
|
||||
/* INTERNAL_ERROR_GXX_KEY_ADD_FAILED = 21, */
|
||||
/* INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED = 22, */
|
||||
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP = 23,
|
||||
INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR = 24,
|
||||
INTERNAL_ERROR_RESOURCE_IN_USE = 25,
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -108,7 +108,6 @@ install:
|
||||
- cpukit/include/rtems/framebuffer.h
|
||||
- cpukit/include/rtems/fs.h
|
||||
- cpukit/include/rtems/fsmount.h
|
||||
- cpukit/include/rtems/gxx_wrappers.h
|
||||
- cpukit/include/rtems/ide_part_table.h
|
||||
- cpukit/include/rtems/imfs.h
|
||||
- cpukit/include/rtems/init.h
|
||||
@@ -658,7 +657,6 @@ source:
|
||||
- cpukit/libcsupport/src/getreentglobal.c
|
||||
- cpukit/libcsupport/src/getrusage.c
|
||||
- cpukit/libcsupport/src/getuid.c
|
||||
- cpukit/libcsupport/src/gxx_wrappers.c
|
||||
- cpukit/libcsupport/src/ioctl.c
|
||||
- cpukit/libcsupport/src/isatty_r.c
|
||||
- cpukit/libcsupport/src/issetugid.c
|
||||
|
||||
@@ -141,8 +141,6 @@ links:
|
||||
uid: gettimeofday
|
||||
- role: build-dependency
|
||||
uid: getuid
|
||||
- role: build-dependency
|
||||
uid: gxx01
|
||||
- role: build-dependency
|
||||
uid: heapwalk
|
||||
- role: build-dependency
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
build-type: test-program
|
||||
cflags: []
|
||||
copyrights:
|
||||
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
|
||||
cppflags: []
|
||||
cxxflags: []
|
||||
enabled-by: true
|
||||
features: c cprogram
|
||||
includes: []
|
||||
ldflags: []
|
||||
links: []
|
||||
source:
|
||||
- testsuites/libtests/gxx01/init.c
|
||||
stlib: []
|
||||
target: testsuites/libtests/gxx01.exe
|
||||
type: build
|
||||
use-after: []
|
||||
use-before: []
|
||||
@@ -237,10 +237,6 @@ links:
|
||||
uid: spfatal14
|
||||
- role: build-dependency
|
||||
uid: spfatal15
|
||||
- role: build-dependency
|
||||
uid: spfatal24
|
||||
- role: build-dependency
|
||||
uid: spfatal25
|
||||
- role: build-dependency
|
||||
uid: spfatal26
|
||||
- role: build-dependency
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
build-type: test-program
|
||||
cflags: []
|
||||
copyrights:
|
||||
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
|
||||
cppflags: []
|
||||
cxxflags: []
|
||||
enabled-by: true
|
||||
features: c cprogram
|
||||
includes: []
|
||||
ldflags: []
|
||||
links: []
|
||||
source:
|
||||
- testsuites/sptests/spfatal24/init.c
|
||||
stlib: []
|
||||
target: testsuites/sptests/spfatal24.exe
|
||||
type: build
|
||||
use-after: []
|
||||
use-before: []
|
||||
@@ -1,19 +0,0 @@
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
build-type: test-program
|
||||
cflags: []
|
||||
copyrights:
|
||||
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
|
||||
cppflags: []
|
||||
cxxflags: []
|
||||
enabled-by: true
|
||||
features: c cprogram
|
||||
includes: []
|
||||
ldflags: []
|
||||
links: []
|
||||
source:
|
||||
- testsuites/sptests/spfatal25/init.c
|
||||
stlib: []
|
||||
target: testsuites/sptests/spfatal25.exe
|
||||
type: build
|
||||
use-after: []
|
||||
use-before: []
|
||||
@@ -1,33 +0,0 @@
|
||||
# COPYRIGHT (c) 1989-2010.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.org/license/LICENSE.
|
||||
#
|
||||
|
||||
This file describes the directives and concepts tested by this test set.
|
||||
|
||||
test set name: gxx01
|
||||
|
||||
directives:
|
||||
|
||||
rtems_gxx_once
|
||||
rtems_gxx_key_create
|
||||
rtems_gxx_key_delete
|
||||
rtems_gxx_getspecific
|
||||
rtems_gxx_setspecific
|
||||
rtems_gxx_mutex_init
|
||||
rtems_gxx_mutex_lock
|
||||
rtems_gxx_mutex_destroy
|
||||
rtems_gxx_mutex_trylock
|
||||
rtems_gxx_mutex_unlock
|
||||
rtems_gxx_recursive_mutex_init
|
||||
rtems_gxx_recursive_mutex_lock
|
||||
rtems_gxx_recursive_mutex_trylock
|
||||
rtems_gxx_recursive_mutex_unlock
|
||||
|
||||
concepts:
|
||||
|
||||
+ Fully exercise wrappers provided by RTEMS for GCC's C++ library's
|
||||
mutual exclusion implementation.
|
||||
@@ -1,35 +0,0 @@
|
||||
*** TEST GXX 01 ***
|
||||
rtems_gxx_mutex_init() - OK
|
||||
rtems_gxx_mutex_trylock() - OK
|
||||
rtems_gxx_mutex_unlock() - OK
|
||||
rtems_gxx_mutex_lock() - OK
|
||||
rtems_gxx_mutex_unlock() - OK
|
||||
|
||||
rtems_gxx_recursive_mutex_init() - OK
|
||||
rtems_gxx_recursive_mutex_trylock() - OK
|
||||
rtems_gxx_recursive_mutex_trylock() - Nest
|
||||
rtems_gxx_recursive_mutex_unlock() - Unnest
|
||||
rtems_gxx_recursive_mutex_unlock() - OK
|
||||
rtems_gxx_recursive_mutex_lock() - OK
|
||||
rtems_gxx_recursive_mutex_unlock() - OK
|
||||
rtems_gxx_mutex_destroy(mutex) - OK
|
||||
rtems_gxx_mutex_destroy(mutex) - NOT OK
|
||||
|
||||
Call once method the first time
|
||||
Running once method
|
||||
Call once method the second time
|
||||
|
||||
rtems_gxx_key_create(&key, NULL) - OK
|
||||
rtems_gxx_key_delete(key) - OK
|
||||
rtems_gxx_key_create(&key, key_dtor) - OK
|
||||
rtems_gxx_getspecific(key) not set - OK
|
||||
rtems_gxx_setspecific(key, 0x1234) - OK
|
||||
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) - NOT OK
|
||||
rtems_gxx_setspecific(NULL, 0x1234) - NOT OK
|
||||
rtems_gxx_getspecific(NULL) - OK
|
||||
rtems_gxx_key_delete(NULL) - NOT OK
|
||||
|
||||
*** END OF TEST GXX 01 ***
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,31 +0,0 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../spfatal_support/spfatal.h"
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <rtems/gxx_wrappers.h>
|
||||
#include <rtems/malloc.h>
|
||||
|
||||
#define FATAL_ERROR_TEST_NAME "GXX KEY ADD FAILURE"
|
||||
#define FATAL_ERROR_DESCRIPTION "GXX KEY ADD FAILURE"
|
||||
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
|
||||
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_GXX_KEY_ADD_FAILED
|
||||
|
||||
static void force_error(void)
|
||||
{
|
||||
pthread_key_t key = -1;
|
||||
|
||||
rtems_gxx_setspecific( &key, NULL );
|
||||
}
|
||||
|
||||
#include "../spfatal_support/spfatalimpl.h"
|
||||
@@ -1,19 +0,0 @@
|
||||
# COPYRIGHT (c) 1989-2010.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.org/license/LICENSE.
|
||||
#
|
||||
|
||||
This file describes the directives and concepts tested by this test set.
|
||||
|
||||
test set name: spfatal24
|
||||
|
||||
directives:
|
||||
|
||||
rtems_gxx_setspecific();
|
||||
|
||||
concepts:
|
||||
|
||||
+ Trigger fatal error.
|
||||
@@ -1,3 +0,0 @@
|
||||
*** TEST FATAL GXX KEY ADD FAILURE ***
|
||||
Fatal error (GXX KEY ADD FAILURE) hit
|
||||
*** END OF TEST FATAL GXX KEY ADD FAILURE ***
|
||||
@@ -1,33 +0,0 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../spfatal_support/spfatal.h"
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <rtems/gxx_wrappers.h>
|
||||
|
||||
#define FATAL_ERROR_TEST_NAME "GXX MUTEX INIT FAILED"
|
||||
#define FATAL_ERROR_DESCRIPTION "GXX MUTEX INIT FAILED"
|
||||
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
|
||||
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED
|
||||
|
||||
static void force_error(void)
|
||||
{
|
||||
__gthread_mutex_t mutex;
|
||||
|
||||
while ( true ) {
|
||||
rtems_gxx_mutex_init( &mutex );
|
||||
rtems_test_assert( mutex != 0 );
|
||||
}
|
||||
}
|
||||
|
||||
#include "../spfatal_support/spfatalimpl.h"
|
||||
@@ -1,19 +0,0 @@
|
||||
# COPYRIGHT (c) 1989-2010.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
#
|
||||
# The license and distribution terms for this file may be
|
||||
# found in the file LICENSE in this distribution or at
|
||||
# http://www.rtems.org/license/LICENSE.
|
||||
#
|
||||
|
||||
This file describes the directives and concepts tested by this test set.
|
||||
|
||||
test set name: spfatal24
|
||||
|
||||
directives:
|
||||
|
||||
rtems_gxx_getspecific();
|
||||
|
||||
concepts:
|
||||
|
||||
+ Trigger fatal error.
|
||||
@@ -1,3 +0,0 @@
|
||||
*** TEST FATAL GXX MUTEX INIT FAILED ***
|
||||
Fatal error (GXX MUTEX INIT FAILED) hit
|
||||
*** END OF TEST FATAL GXX MUTEX INIT FAILED ***
|
||||
Reference in new issue
Block a user