summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/posix/posixapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/posix/posixapi.h')
-rw-r--r--cpukit/include/rtems/posix/posixapi.h48
1 files changed, 34 insertions, 14 deletions
diff --git a/cpukit/include/rtems/posix/posixapi.h b/cpukit/include/rtems/posix/posixapi.h
index 122dd644e6..5d78573ef7 100644
--- a/cpukit/include/rtems/posix/posixapi.h
+++ b/cpukit/include/rtems/posix/posixapi.h
@@ -1,19 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
- * @brief POSIX API Implementation
+ * @ingroup POSIXAPI
*
- * This include file defines the top level interface to the POSIX API
- * implementation in RTEMS.
+ * @brief This header file provides interfaces used by the POSIX API
+ * implementation.
*/
/*
* COPYRIGHT (c) 1989-2011.
* 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.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _RTEMS_POSIX_POSIXAPI_H
@@ -28,18 +47,19 @@
#include <pthread.h>
/**
- * @defgroup POSIXAPI RTEMS POSIX API
+ * @defgroup POSIXAPI POSIX API
*
* @ingroup RTEMSImpl
*
- * RTEMS POSIX API definitions and modules.
+ * @brief This group contains definitions and modules which are used to
+ * implement the POSIX APIs supported by RTEMS.
*
+ * @{
*/
-/**@{**/
extern const int _POSIX_Get_by_name_error_table[ 3 ];
-RTEMS_INLINE_ROUTINE int _POSIX_Get_by_name_error(
+static inline int _POSIX_Get_by_name_error(
Objects_Get_by_name_error error
)
{
@@ -47,19 +67,19 @@ RTEMS_INLINE_ROUTINE int _POSIX_Get_by_name_error(
return _POSIX_Get_by_name_error_table[ error ];
}
-RTEMS_INLINE_ROUTINE int _POSIX_Get_error( Status_Control status )
+static inline int _POSIX_Get_error( Status_Control status )
{
return STATUS_GET_POSIX( status );
}
-RTEMS_INLINE_ROUTINE int _POSIX_Get_error_after_wait(
+static inline int _POSIX_Get_error_after_wait(
const Thread_Control *executing
)
{
return _POSIX_Get_error( _Thread_Wait_get_status( executing ) );
}
-RTEMS_INLINE_ROUTINE int _POSIX_Zero_or_minus_one_plus_errno(
+static inline int _POSIX_Zero_or_minus_one_plus_errno(
Status_Control status
)
{
@@ -77,7 +97,7 @@ RTEMS_INLINE_ROUTINE int _POSIX_Zero_or_minus_one_plus_errno(
*
* http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_09_09
*/
-RTEMS_INLINE_ROUTINE bool _POSIX_Is_valid_pshared( int pshared )
+static inline bool _POSIX_Is_valid_pshared( int pshared )
{
return pshared == PTHREAD_PROCESS_PRIVATE ||
pshared == PTHREAD_PROCESS_SHARED;