diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-06-22 08:39:29 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-12-09 08:23:34 +0100 |
commit | 6183edfc65340182d414f25dd52f19d7fab8db44 (patch) | |
tree | ccc9f5a1c7328cc22e91a40875e34a8e80cb9328 | |
parent | dea7476568f94634bfbb0c3a27175f24476dab40 (diff) |
rtems: Generate <rtems/rtems/barrier.h>
Change license to BSD-2-Clause according to file histories and
documentation re-licensing agreement.
Update #3899.
Update #3993.
-rw-r--r-- | cpukit/include/rtems/rtems/barrier.h | 195 |
1 files changed, 110 insertions, 85 deletions
diff --git a/cpukit/include/rtems/rtems/barrier.h b/cpukit/include/rtems/rtems/barrier.h index f6362f9237..c240dee6d0 100644 --- a/cpukit/include/rtems/rtems/barrier.h +++ b/cpukit/include/rtems/rtems/barrier.h @@ -1,22 +1,56 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * - * @ingroup ClassicBarrier - * - * @brief Classic Barrier Manager API + * @brief This header file defines the Barrier Manager API. + */ + +/* + * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) + * Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR) + * + * 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. */ -/* COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). +/* + * This file is part of the RTEMS quality process and was automatically + * generated. If you find something that needs to be fixed or + * worded better please post a report or patch to an RTEMS mailing list + * or raise a bug report: * - * 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. + * https://docs.rtems.org/branches/master/user/support/bugs.html + * + * For information on updating and regenerating please refer to: + * + * https://docs.rtems.org/branches/master/eng/req/howto.html */ +/* Generated from spec:/rtems/barrier/if/header */ + #ifndef _RTEMS_RTEMS_BARRIER_H #define _RTEMS_RTEMS_BARRIER_H +#include <stdint.h> #include <rtems/rtems/attr.h> #include <rtems/rtems/status.h> #include <rtems/rtems/types.h> @@ -25,123 +59,114 @@ extern "C" { #endif +/* Generated from spec:/rtems/barrier/if/group */ + /** - * @defgroup ClassicBarrier Barriers + * @defgroup RTEMSAPIClassicBarrier Barrier Manager * * @ingroup RTEMSAPIClassic * - * This encapsulates functionality which implements the Classic API - * Barrier Manager. + * @brief The Barrier Manager provides a unique synchronization capability + * which can be used to have a set of tasks block and be unblocked as a set. */ -/**@{*/ + +/* Generated from spec:/rtems/barrier/if/create */ /** - * @brief RTEMS Create Barrier + * @ingroup RTEMSAPIClassicBarrier + * + * @brief % * - * Barrier Manager -- Create a Barrier Instance + * @param name % * - * This routine implements the rtems_barrier_create directive. The - * barrier will have the name name. The starting count for - * the barrier is count. The attribute_set determines if - * the barrier is global or local and the thread queue - * discipline. It returns the id of the created barrier in ID. + * @param attribute_set % * - * @param[in] name is the name of this barrier instance. - * @param[in] attribute_set specifies the attributes of this barrier instance. - * @param[in] maximum_waiters is the maximum number of threads which will - * be allowed to concurrently wait at the barrier. - * @param[out] id will contain the id of this barrier. + * @param maximum_waiters % * - * @retval a status code indicating success or the reason for failure. + * @param id % */ rtems_status_code rtems_barrier_create( - rtems_name name, - rtems_attribute attribute_set, - uint32_t maximum_waiters, - rtems_id *id + rtems_name name, + rtems_attribute attribute_set, + uint32_t maximum_waiters, + rtems_id *id ); +/* Generated from spec:/rtems/barrier/if/delete */ + /** - * @brief RTEMS Barrier name to Id - * - * This routine implements the rtems_barrier_ident directive. - * This directive returns the barrier ID associated with name. - * If more than one barrier is named name, then the barrier - * to which the ID belongs is arbitrary. node indicates the - * extent of the search for the ID of the barrier named name. - * The search can be limited to a particular node or allowed to - * encompass all nodes. + * @ingroup RTEMSAPIClassicBarrier * - * @param[in] name is the name of this barrier instance. - * @param[out] id will contain the id of this barrier. + * @brief % * - * @retval a status code indicating success or the reason for failure. + * @param id % */ -rtems_status_code rtems_barrier_ident( - rtems_name name, - rtems_id *id -); +rtems_status_code rtems_barrier_delete( rtems_id id ); + +/* Generated from spec:/rtems/barrier/if/ident */ /** - * @brief RTEMS Delete Barrier + * @ingroup RTEMSAPIClassicBarrier + * + * @brief Identifies a barrier object by the specified object name. * - * This routine implements the rtems_barrier_delete directive. The - * barrier indicated by @a id is deleted. The barrier is freed back to the - * inactive barrier chain. + * This directive obtains the barrier identifier associated with the barrier + * name specified in ``name``. * + * If the barrier name is not unique, then the barrier identifier will match + * the first barrier with that name in the search order. However, this barrier + * identifier is not guaranteed to correspond to the desired barrier. The + * barrier identifier is used with other barrier related directives to access + * the barrier. * - * @param[in] id indicates the barrier to delete + * The objects are searched from lowest to the highest index. Only the local + * node is searched. * - * @retval a status code indicating success or the reason for failure. + * @param name is the object name to look up. + * + * @param[out] id is the pointer to an object identifier variable. The object + * identifier of an object with the specified name will be stored in this + * variable, in case of a successful operation. + * + * @retval ::RTEMS_SUCCESSFUL The requested operation was successful. + * + * @retval ::RTEMS_INVALID_ADDRESS The ``id`` parameter was NULL. + * + * @retval ::RTEMS_INVALID_NAME The ``name`` parameter was 0. + * + * @retval ::RTEMS_INVALID_NAME There was no object with the specified name on + * the local node. */ -rtems_status_code rtems_barrier_delete( - rtems_id id -); +rtems_status_code rtems_barrier_ident( rtems_name name, rtems_id *id ); + +/* Generated from spec:/rtems/barrier/if/release */ /** - * @brief RTEMS Barrier Wait + * @ingroup RTEMSAPIClassicBarrier * - * This routine implements the rtems_barrier_wait directive. It - * attempts to wait at the barrier associated with @a id. The calling task - * may block waiting for the barrier with an optional timeout of @a timeout - * clock ticks. + * @brief % * - * @param[in] id indicates the barrier to wait at. - * @param[in] timeout is the maximum length of time in ticks the calling - * thread is willing to block. + * @param id % * - * @retval a status code indicating success or the reason for failure. + * @param released % */ -rtems_status_code rtems_barrier_wait( - rtems_id id, - rtems_interval timeout -); +rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ); + +/* Generated from spec:/rtems/barrier/if/wait */ /** - * @brief RTEMS Barrier Release - * - * Barrier Manager -- Release Tasks Waitng at a Barrier - * - * This routine implements the rtems_barrier_release directive. It - * unblocks all of the threads waiting on the barrier associated with - * @a id. The number of threads unblocked is returned in @a released. + * @ingroup RTEMSAPIClassicBarrier * + * @brief % * - * @param[in] id indicates the barrier to wait at. - * @param[out] released will contain the number of threads unblocked. + * @param id % * - * @retval a status code indicating success or the reason for failure. + * @param timeout % */ -rtems_status_code rtems_barrier_release( - rtems_id id, - uint32_t *released -); - -/**@}*/ +rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ); #ifdef __cplusplus } #endif -#endif -/* end of include file */ +#endif /* _RTEMS_RTEMS_BARRIER_H */ |