diff options
Diffstat (limited to 'cpukit/rtems/src/barrier.c')
-rw-r--r-- | cpukit/rtems/src/barrier.c | 68 |
1 files changed, 32 insertions, 36 deletions
diff --git a/cpukit/rtems/src/barrier.c b/cpukit/rtems/src/barrier.c index 59b0a5d142..c0d167b0db 100644 --- a/cpukit/rtems/src/barrier.c +++ b/cpukit/rtems/src/barrier.c @@ -1,51 +1,47 @@ /** * @file * - * @brief RTEMS Barrier Manager Initialization - * @ingroup ClassicBarrier Barriers + * @ingroup ClassicBarrier + * + * @brief Classic Barrier Information with Zero Objects */ /* - * COPYRIGHT (c) 1989-2015. - * On-Line Applications Research Corporation (OAR). + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2018 embedded brains GmbH * - * 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. */ #if HAVE_CONFIG_H #include "config.h" #endif -#include <rtems/system.h> -#include <rtems/config.h> -#include <rtems/sysinit.h> -#include <rtems/rtems/status.h> -#include <rtems/rtems/support.h> -#include <rtems/rtems/barrierimpl.h> - -Objects_Information _Barrier_Information; - -/** - * @brief _Barrier_Manager_initialization - */ -static void _Barrier_Manager_initialization(void) -{ - _Objects_Initialize_information( - &_Barrier_Information, /* object information table */ - OBJECTS_CLASSIC_API, /* object API */ - OBJECTS_RTEMS_BARRIERS, /* object class */ - Configuration_RTEMS_API.maximum_barriers, - /* maximum objects of this class */ - sizeof( Barrier_Control ), /* size of this object's control block */ - OBJECTS_NO_STRING_NAME, /* maximum length of an object name */ - NULL /* Proxy extraction support callout */ - ); -} +#include <rtems/rtems/barrierdata.h> -RTEMS_SYSINIT_ITEM( - _Barrier_Manager_initialization, - RTEMS_SYSINIT_CLASSIC_BARRIER, - RTEMS_SYSINIT_ORDER_MIDDLE +OBJECTS_INFORMATION_DEFINE_ZERO( + _Barrier, + OBJECTS_CLASSIC_API, + OBJECTS_RTEMS_BARRIERS, + OBJECTS_NO_STRING_NAME ); |