[PATCH 02/12] posix: Delete unused _POSIX_Fatal_error()
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Dec 1 08:10:03 UTC 2020
---
cpukit/Makefile.am | 1 -
cpukit/include/rtems/posix/posixapi.h | 18 ---
cpukit/sapi/src/posixapi.c | 179 --------------------------
spec/build/cpukit/librtemscpu.yml | 1 -
4 files changed, 199 deletions(-)
delete mode 100644 cpukit/sapi/src/posixapi.c
diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 1e711a90da..c1e1984a2c 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -1077,7 +1077,6 @@ librtemscpu_a_SOURCES += sapi/src/ioregisterdriver.c
librtemscpu_a_SOURCES += sapi/src/iounregisterdriver.c
librtemscpu_a_SOURCES += sapi/src/iowrite.c
librtemscpu_a_SOURCES += sapi/src/panic.c
-librtemscpu_a_SOURCES += sapi/src/posixapi.c
librtemscpu_a_SOURCES += sapi/src/profilingiterate.c
librtemscpu_a_SOURCES += sapi/src/profilingreportxml.c
librtemscpu_a_SOURCES += sapi/src/rbheap.c
diff --git a/cpukit/include/rtems/posix/posixapi.h b/cpukit/include/rtems/posix/posixapi.h
index fc669afb45..122dd644e6 100644
--- a/cpukit/include/rtems/posix/posixapi.h
+++ b/cpukit/include/rtems/posix/posixapi.h
@@ -37,24 +37,6 @@
*/
/**@{**/
-/**
- * @brief POSIX API Fatal domains.
- */
-typedef enum {
- POSIX_FD_PTHREAD, /**< A pthread thread error. */
- POSIX_FD_PTHREAD_ONCE /**< A pthread once error. */
-} POSIX_Fatal_domain;
-
-/**
- * @brief POSIX API Fatal error.
- *
- * A common method of rasing a POSIX API fatal error.
- *
- * @param[in] domain The POSIX error domain.
- * @param[in] eno The error number as defined in errno.h.
- */
-void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno );
-
extern const int _POSIX_Get_by_name_error_table[ 3 ];
RTEMS_INLINE_ROUTINE int _POSIX_Get_by_name_error(
diff --git a/cpukit/sapi/src/posixapi.c b/cpukit/sapi/src/posixapi.c
deleted file mode 100644
index 2cd771c56b..0000000000
--- a/cpukit/sapi/src/posixapi.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * @file
- *
- * @brief Initialize POSIX API
- *
- * @ingroup ClassicRTEMS
- */
-
-/*
- * COPYRIGHT (c) 1989-2014.
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/posix/posixapi.h>
-#include <rtems/posix/barrierimpl.h>
-#include <rtems/posix/condimpl.h>
-#include <rtems/posix/muteximpl.h>
-#include <rtems/posix/rwlockimpl.h>
-#include <rtems/posix/semaphoreimpl.h>
-#include <rtems/score/heap.h>
-
-#ifdef HEAP_PROTECTION
-RTEMS_STATIC_ASSERT(
- POSIX_SEMAPHORE_MAGIC != HEAP_BEGIN_PROTECTOR_0,
- POSIX_SEMAPHORE_MAGIC_0
-);
-RTEMS_STATIC_ASSERT(
- POSIX_SEMAPHORE_MAGIC != HEAP_BEGIN_PROTECTOR_1,
- POSIX_SEMAPHORE_MAGIC_1
-);
-RTEMS_STATIC_ASSERT(
- POSIX_SEMAPHORE_MAGIC != HEAP_END_PROTECTOR_0,
- POSIX_SEMAPHORE_MAGIC_2
-);
-RTEMS_STATIC_ASSERT(
- POSIX_SEMAPHORE_MAGIC != HEAP_END_PROTECTOR_1,
- POSIX_SEMAPHORE_MAGIC_3
-);
-RTEMS_STATIC_ASSERT(
- POSIX_SEMAPHORE_MAGIC != HEAP_FREE_PATTERN,
- POSIX_SEMAPHORE_MAGIC_4
-);
-RTEMS_STATIC_ASSERT(
- POSIX_BARRIER_MAGIC != HEAP_BEGIN_PROTECTOR_0,
- POSIX_BARRIER_MAGIC_0
-);
-RTEMS_STATIC_ASSERT(
- POSIX_BARRIER_MAGIC != HEAP_BEGIN_PROTECTOR_1,
- POSIX_BARRIER_MAGIC_1
-);
-RTEMS_STATIC_ASSERT(
- POSIX_BARRIER_MAGIC != HEAP_END_PROTECTOR_0,
- POSIX_BARRIER_MAGIC_2
-);
-RTEMS_STATIC_ASSERT(
- POSIX_BARRIER_MAGIC != HEAP_END_PROTECTOR_1,
- POSIX_BARRIER_MAGIC_3
-);
-RTEMS_STATIC_ASSERT(
- POSIX_BARRIER_MAGIC != HEAP_FREE_PATTERN,
- POSIX_BARRIER_MAGIC_4
-);
-RTEMS_STATIC_ASSERT(
- POSIX_RWLOCK_MAGIC != HEAP_BEGIN_PROTECTOR_0,
- POSIX_RWLOCK_MAGIC_0
-);
-RTEMS_STATIC_ASSERT(
- POSIX_RWLOCK_MAGIC != HEAP_BEGIN_PROTECTOR_1,
- POSIX_RWLOCK_MAGIC_1
-);
-RTEMS_STATIC_ASSERT(
- POSIX_RWLOCK_MAGIC != HEAP_END_PROTECTOR_0,
- POSIX_RWLOCK_MAGIC_2
-);
-RTEMS_STATIC_ASSERT(
- POSIX_RWLOCK_MAGIC != HEAP_END_PROTECTOR_1,
- POSIX_RWLOCK_MAGIC_3
-);
-RTEMS_STATIC_ASSERT(
- POSIX_RWLOCK_MAGIC != HEAP_FREE_PATTERN,
- POSIX_RWLOCK_MAGIC_4
-);
-RTEMS_STATIC_ASSERT(
- POSIX_CONDITION_VARIABLES_MAGIC != HEAP_BEGIN_PROTECTOR_0,
- POSIX_CONDITION_VARIABLES_MAGIC_0
-);
-RTEMS_STATIC_ASSERT(
- POSIX_CONDITION_VARIABLES_MAGIC != HEAP_BEGIN_PROTECTOR_1,
- POSIX_CONDITION_VARIABLES_MAGIC_1
-);
-RTEMS_STATIC_ASSERT(
- POSIX_CONDITION_VARIABLES_MAGIC != HEAP_END_PROTECTOR_0,
- POSIX_CONDITION_VARIABLES_MAGIC_2
-);
-RTEMS_STATIC_ASSERT(
- POSIX_CONDITION_VARIABLES_MAGIC != HEAP_END_PROTECTOR_1,
- POSIX_CONDITION_VARIABLES_MAGIC_3
-);
-RTEMS_STATIC_ASSERT(
- POSIX_CONDITION_VARIABLES_MAGIC != HEAP_FREE_PATTERN,
- POSIX_CONDITION_VARIABLES_MAGIC_4
-);
-RTEMS_STATIC_ASSERT(
- POSIX_MUTEX_MAGIC != HEAP_BEGIN_PROTECTOR_0,
- POSIX_MUTEX_MAGIC_0
-);
-RTEMS_STATIC_ASSERT(
- POSIX_MUTEX_MAGIC != HEAP_BEGIN_PROTECTOR_1,
- POSIX_MUTEX_MAGIC_1
-);
-RTEMS_STATIC_ASSERT(
- POSIX_MUTEX_MAGIC != HEAP_END_PROTECTOR_0,
- POSIX_MUTEX_MAGIC_2
-);
-RTEMS_STATIC_ASSERT(
- POSIX_MUTEX_MAGIC != HEAP_END_PROTECTOR_1,
- POSIX_MUTEX_MAGIC_3
-);
-RTEMS_STATIC_ASSERT(
- POSIX_MUTEX_MAGIC != HEAP_FREE_PATTERN,
- POSIX_MUTEX_MAGIC_4
-);
-#endif
-
-RTEMS_STATIC_ASSERT(
- POSIX_SEMAPHORE_MAGIC != POSIX_BARRIER_MAGIC,
- POSIX_SEMAPHORE_MAGIC_5
-);
-RTEMS_STATIC_ASSERT(
- POSIX_SEMAPHORE_MAGIC != POSIX_RWLOCK_MAGIC,
- POSIX_SEMAPHORE_MAGIC_6
-);
-RTEMS_STATIC_ASSERT(
- POSIX_SEMAPHORE_MAGIC != POSIX_CONDITION_VARIABLES_MAGIC,
- POSIX_SEMAPHORE_MAGIC_7
-);
-RTEMS_STATIC_ASSERT(
- POSIX_SEMAPHORE_MAGIC != POSIX_MUTEX_MAGIC,
- POSIX_SEMAPHORE_MAGIC_8
-);
-RTEMS_STATIC_ASSERT(
- POSIX_BARRIER_MAGIC != POSIX_RWLOCK_MAGIC,
- POSIX_BARRIER_MAGIC_5
-);
-RTEMS_STATIC_ASSERT(
- POSIX_BARRIER_MAGIC != POSIX_CONDITION_VARIABLES_MAGIC,
- POSIX_BARRIER_MAGIC_6
-);
-RTEMS_STATIC_ASSERT(
- POSIX_BARRIER_MAGIC != POSIX_MUTEX_MAGIC,
- POSIX_BARRIER_MAGIC_7
-);
-RTEMS_STATIC_ASSERT(
- POSIX_RWLOCK_MAGIC != POSIX_CONDITION_VARIABLES_MAGIC,
- POSIX_RWLOCK_MAGIC_5
-);
-RTEMS_STATIC_ASSERT(
- POSIX_RWLOCK_MAGIC != POSIX_MUTEX_MAGIC,
- POSIX_RWLOCK_MAGIC_6
-);
-RTEMS_STATIC_ASSERT(
- POSIX_CONDITION_VARIABLES_MAGIC != POSIX_MUTEX_MAGIC,
- POSIX_CONDITION_VARIABLES_MAGIC_5
-);
-
-void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno )
-{
- uint32_t code = ( domain << 8 ) | ( ( uint32_t ) eno & 0xffU );
-
- _Terminate( INTERNAL_ERROR_POSIX_API, code );
-}
diff --git a/spec/build/cpukit/librtemscpu.yml b/spec/build/cpukit/librtemscpu.yml
index a31ead1fdb..d2f8703928 100644
--- a/spec/build/cpukit/librtemscpu.yml
+++ b/spec/build/cpukit/librtemscpu.yml
@@ -1352,7 +1352,6 @@ source:
- cpukit/sapi/src/iounregisterdriver.c
- cpukit/sapi/src/iowrite.c
- cpukit/sapi/src/panic.c
-- cpukit/sapi/src/posixapi.c
- cpukit/sapi/src/profilingiterate.c
- cpukit/sapi/src/profilingreportxml.c
- cpukit/sapi/src/rbheap.c
--
2.26.2
More information about the devel
mailing list