diff options
Diffstat (limited to 'cpukit/rtems')
-rw-r--r-- | cpukit/rtems/src/barrier.c | 68 | ||||
-rw-r--r-- | cpukit/rtems/src/barriercreate.c | 33 | ||||
-rw-r--r-- | cpukit/rtems/src/dpmem.c | 68 | ||||
-rw-r--r-- | cpukit/rtems/src/dpmemcreate.c | 15 | ||||
-rw-r--r-- | cpukit/rtems/src/msg.c | 83 | ||||
-rw-r--r-- | cpukit/rtems/src/msgqcreate.c | 35 | ||||
-rw-r--r-- | cpukit/rtems/src/part.c | 79 | ||||
-rw-r--r-- | cpukit/rtems/src/partcreate.c | 43 | ||||
-rw-r--r-- | cpukit/rtems/src/ratemon.c | 67 | ||||
-rw-r--r-- | cpukit/rtems/src/ratemoncreate.c | 31 | ||||
-rw-r--r-- | cpukit/rtems/src/region.c | 76 | ||||
-rw-r--r-- | cpukit/rtems/src/regioncreate.c | 32 | ||||
-rw-r--r-- | cpukit/rtems/src/rtemstimer.c | 69 | ||||
-rw-r--r-- | cpukit/rtems/src/sem.c | 76 | ||||
-rw-r--r-- | cpukit/rtems/src/semcreate.c | 19 | ||||
-rw-r--r-- | cpukit/rtems/src/taskcreate.c | 62 | ||||
-rw-r--r-- | cpukit/rtems/src/tasks.c | 86 | ||||
-rw-r--r-- | cpukit/rtems/src/timercreate.c | 14 |
18 files changed, 466 insertions, 490 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 ); diff --git a/cpukit/rtems/src/barriercreate.c b/cpukit/rtems/src/barriercreate.c index 12a917fe60..5e0f883106 100644 --- a/cpukit/rtems/src/barriercreate.c +++ b/cpukit/rtems/src/barriercreate.c @@ -18,30 +18,12 @@ #include "config.h" #endif -#include <rtems/system.h> +#include <rtems/rtems/barrierimpl.h> #include <rtems/rtems/status.h> #include <rtems/rtems/support.h> #include <rtems/rtems/attrimpl.h> #include <rtems/score/isr.h> -#include <rtems/rtems/barrierimpl.h> - -/* - * rtems_barrier_create - * - * This directive creates a barrier. A barrier id is returned. - * - * Input parameters: - * name - user defined barrier name - * attribute_set - barrier attributes - * maximum_waiters - number of threads before automatic release - * priority_ceiling - barrier's ceiling priority - * id - pointer to barrier id - * - * Output parameters: - * id - barrier id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ +#include <rtems/sysinit.h> rtems_status_code rtems_barrier_create( rtems_name name, @@ -90,3 +72,14 @@ rtems_status_code rtems_barrier_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Barrier_Manager_initialization( void ) +{ + _Objects_Initialize_information( &_Barrier_Information ); +} + +RTEMS_SYSINIT_ITEM( + _Barrier_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_BARRIER, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/dpmem.c b/cpukit/rtems/src/dpmem.c index ccecdfd6cc..79f0fb2e69 100644 --- a/cpukit/rtems/src/dpmem.c +++ b/cpukit/rtems/src/dpmem.c @@ -1,49 +1,47 @@ /** - * @file + * @file * - * @brief Dual Ported Memory Manager Initialization - * @ingroup ClassicDPMEM + * @ingroup ClassicDPMEM + * + * @brief Classic Dual Ported Memory Information with Zero Objects */ /* - * COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2018 embedded brains GmbH + * + * 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. * - * 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 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/dpmemimpl.h> - -Objects_Information _Dual_ported_memory_Information; - -static void _Dual_ported_memory_Manager_initialization(void) -{ - _Objects_Initialize_information( - &_Dual_ported_memory_Information, /* object information table */ - OBJECTS_CLASSIC_API, /* object API */ - OBJECTS_RTEMS_PORTS, /* object class */ - Configuration_RTEMS_API.maximum_ports, - /* maximum objects of this class */ - sizeof( Dual_ported_memory_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/dpmemdata.h> -RTEMS_SYSINIT_ITEM( - _Dual_ported_memory_Manager_initialization, - RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY, - RTEMS_SYSINIT_ORDER_MIDDLE +OBJECTS_INFORMATION_DEFINE_ZERO( + _Dual_ported_memory, + OBJECTS_CLASSIC_API, + OBJECTS_RTEMS_PORTS, + OBJECTS_NO_STRING_NAME ); diff --git a/cpukit/rtems/src/dpmemcreate.c b/cpukit/rtems/src/dpmemcreate.c index 206a199c00..1dc096d084 100644 --- a/cpukit/rtems/src/dpmemcreate.c +++ b/cpukit/rtems/src/dpmemcreate.c @@ -18,12 +18,12 @@ #include "config.h" #endif -#include <rtems/system.h> +#include <rtems/rtems/dpmemimpl.h> #include <rtems/rtems/status.h> #include <rtems/rtems/support.h> #include <rtems/score/address.h> -#include <rtems/rtems/dpmemimpl.h> #include <rtems/score/thread.h> +#include <rtems/sysinit.h> rtems_status_code rtems_port_create( rtems_name name, @@ -66,3 +66,14 @@ rtems_status_code rtems_port_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Dual_ported_memory_Manager_initialization( void ) +{ + _Objects_Initialize_information( &_Dual_ported_memory_Information ); +} + +RTEMS_SYSINIT_ITEM( + _Dual_ported_memory_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_DUAL_PORTED_MEMORY, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c index 8060735beb..1156db4485 100644 --- a/cpukit/rtems/src/msg.c +++ b/cpukit/rtems/src/msg.c @@ -1,64 +1,47 @@ /** - * @file + * @file * - * @brief Message Queue Manager Initialization - * @ingroup ClassicMessageQueue + * @ingroup ClassicMessageQueue + * + * @brief Classic Message Queue Information with Zero Objects */ /* - * COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2018 embedded brains GmbH + * + * 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. * - * 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 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/attrimpl.h> -#include <rtems/rtems/messageimpl.h> -#include <rtems/rtems/options.h> -#include <rtems/rtems/support.h> - -Objects_Information _Message_queue_Information; - -static void _Message_queue_Manager_initialization(void) -{ - _Objects_Initialize_information( - &_Message_queue_Information, /* object information table */ - OBJECTS_CLASSIC_API, /* object API */ - OBJECTS_RTEMS_MESSAGE_QUEUES, /* object class */ - Configuration_RTEMS_API.maximum_message_queues, - /* maximum objects of this class */ - sizeof( Message_queue_Control ), - /* size of this object's control block */ - OBJECTS_NO_STRING_NAME, /* maximum length of an object name */ - _Message_queue_MP_Send_extract_proxy - /* Proxy extraction support callout */ - ); - - /* - * Register the MP Process Packet routine. - */ - -#if defined(RTEMS_MULTIPROCESSING) - _MPCI_Register_packet_processor( - MP_PACKET_MESSAGE_QUEUE, - _Message_queue_MP_Process_packet - ); -#endif - -} +#include <rtems/rtems/messagedata.h> -RTEMS_SYSINIT_ITEM( - _Message_queue_Manager_initialization, - RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE, - RTEMS_SYSINIT_ORDER_MIDDLE +OBJECTS_INFORMATION_DEFINE_ZERO( + _Message_queue, + OBJECTS_CLASSIC_API, + OBJECTS_RTEMS_MESSAGE_QUEUES, + OBJECTS_NO_STRING_NAME ); diff --git a/cpukit/rtems/src/msgqcreate.c b/cpukit/rtems/src/msgqcreate.c index 8a16819f80..2925d244a7 100644 --- a/cpukit/rtems/src/msgqcreate.c +++ b/cpukit/rtems/src/msgqcreate.c @@ -18,18 +18,18 @@ #include "config.h" #endif -#include <rtems/system.h> +#include <rtems/rtems/messageimpl.h> +#include <rtems/rtems/status.h> +#include <rtems/rtems/attrimpl.h> +#include <rtems/rtems/options.h> +#include <rtems/rtems/support.h> #include <rtems/score/sysstate.h> #include <rtems/score/chain.h> #include <rtems/score/isr.h> #include <rtems/score/coremsgimpl.h> #include <rtems/score/thread.h> #include <rtems/score/wkspace.h> -#include <rtems/rtems/status.h> -#include <rtems/rtems/attrimpl.h> -#include <rtems/rtems/messageimpl.h> -#include <rtems/rtems/options.h> -#include <rtems/rtems/support.h> +#include <rtems/sysinit.h> rtems_status_code rtems_message_queue_create( rtems_name name, @@ -143,3 +143,26 @@ rtems_status_code rtems_message_queue_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Message_queue_Manager_initialization(void) +{ + _Objects_Initialize_information( &_Message_queue_Information); + + /* + * Register the MP Process Packet routine. + */ + +#if defined(RTEMS_MULTIPROCESSING) + _MPCI_Register_packet_processor( + MP_PACKET_MESSAGE_QUEUE, + _Message_queue_MP_Process_packet + ); +#endif + +} + +RTEMS_SYSINIT_ITEM( + _Message_queue_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/part.c b/cpukit/rtems/src/part.c index d395f34342..cb47921556 100644 --- a/cpukit/rtems/src/part.c +++ b/cpukit/rtems/src/part.c @@ -1,60 +1,47 @@ /** - * @file + * @file * - * @brief Partition Manager Initialization - * @ingroup ClassicPart + * @ingroup ClassicPart + * + * @brief Classic Partition Information with Zero Objects */ /* - * COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2018 embedded brains GmbH + * + * 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. * - * 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 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/partimpl.h> - -Objects_Information _Partition_Information; - -static void _Partition_Manager_initialization(void) -{ - _Objects_Initialize_information( - &_Partition_Information, /* object information table */ - OBJECTS_CLASSIC_API, /* object API */ - OBJECTS_RTEMS_PARTITIONS, /* object class */ - Configuration_RTEMS_API.maximum_partitions, - /* maximum objects of this class */ - sizeof( Partition_Control ), /* size of this object's control block */ - OBJECTS_NO_STRING_NAME, /* maximum length of an object name */ - _Partition_MP_Send_extract_proxy /* Proxy extraction support callout */ - ); - - /* - * Register the MP Process Packet routine. - */ - -#if defined(RTEMS_MULTIPROCESSING) - _MPCI_Register_packet_processor( - MP_PACKET_PARTITION, - _Partition_MP_Process_packet - ); -#endif - -} +#include <rtems/rtems/partdata.h> -RTEMS_SYSINIT_ITEM( - _Partition_Manager_initialization, - RTEMS_SYSINIT_CLASSIC_PARTITION, - RTEMS_SYSINIT_ORDER_MIDDLE +OBJECTS_INFORMATION_DEFINE_ZERO( + _Partition, + OBJECTS_CLASSIC_API, + OBJECTS_RTEMS_PARTITIONS, + OBJECTS_NO_STRING_NAME ); diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c index 1a7304efa3..99d0d59b37 100644 --- a/cpukit/rtems/src/partcreate.c +++ b/cpukit/rtems/src/partcreate.c @@ -23,26 +23,8 @@ #include <rtems/rtems/support.h> #include <rtems/score/threaddispatch.h> #include <rtems/score/sysstate.h> +#include <rtems/sysinit.h> -/* - * rtems_partition_create - * - * This directive creates a partiton of fixed sized buffers from the - * given contiguous memory area. - * - * Input parameters: - * name - user defined partition name - * starting_address - physical start address of partition - * length - physical length in bytes - * buffer_size - size of buffers in bytes - * attribute_set - partition attributes - * id - pointer to partition id - * - * Output parameters: - * id - partition id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ rtems_status_code rtems_partition_create( rtems_name name, @@ -133,3 +115,26 @@ rtems_status_code rtems_partition_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Partition_Manager_initialization(void) +{ + _Objects_Initialize_information( &_Partition_Information ); + + /* + * Register the MP Process Packet routine. + */ + +#if defined(RTEMS_MULTIPROCESSING) + _MPCI_Register_packet_processor( + MP_PACKET_PARTITION, + _Partition_MP_Process_packet + ); +#endif + +} + +RTEMS_SYSINIT_ITEM( + _Partition_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_PARTITION, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/ratemon.c b/cpukit/rtems/src/ratemon.c index a8681dda44..dc54169a96 100644 --- a/cpukit/rtems/src/ratemon.c +++ b/cpukit/rtems/src/ratemon.c @@ -1,48 +1,47 @@ /** - * @file + * @file * - * @brief Rate Monotonic Manager Initialization - * @ingroup ClassicRateMon + * @ingroup ClassicRateMon + * + * @brief Classic Rate Monotonic Information with Zero Objects */ /* - * COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2018 embedded brains GmbH + * + * 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. * - * 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 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/ratemonimpl.h> - -Objects_Information _Rate_monotonic_Information; - -static void _Rate_monotonic_Manager_initialization(void) -{ - _Objects_Initialize_information( - &_Rate_monotonic_Information, /* object information table */ - OBJECTS_CLASSIC_API, /* object API */ - OBJECTS_RTEMS_PERIODS, /* object class */ - Configuration_RTEMS_API.maximum_periods, - /* maximum objects of this class */ - sizeof( Rate_monotonic_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/ratemondata.h> -RTEMS_SYSINIT_ITEM( - _Rate_monotonic_Manager_initialization, - RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC, - RTEMS_SYSINIT_ORDER_MIDDLE +OBJECTS_INFORMATION_DEFINE_ZERO( + _Rate_monotonic, + OBJECTS_CLASSIC_API, + OBJECTS_RTEMS_PERIODS, + OBJECTS_NO_STRING_NAME ); diff --git a/cpukit/rtems/src/ratemoncreate.c b/cpukit/rtems/src/ratemoncreate.c index 12327295ac..8dd43bb9fc 100644 --- a/cpukit/rtems/src/ratemoncreate.c +++ b/cpukit/rtems/src/ratemoncreate.c @@ -18,29 +18,13 @@ #include "config.h" #endif -#include <rtems/system.h> +#include <rtems/rtems/ratemonimpl.h> #include <rtems/rtems/status.h> #include <rtems/rtems/support.h> #include <rtems/score/isr.h> -#include <rtems/rtems/ratemonimpl.h> #include <rtems/score/thread.h> #include <rtems/score/watchdogimpl.h> - -/* - * rtems_rate_monotonic_create - * - * This directive creates a rate monotonic timer and performs - * some initialization. - * - * Input parameters: - * name - name of period - * id - pointer to rate monotonic id - * - * Output parameters: - * id - rate monotonic id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ +#include <rtems/sysinit.h> rtems_status_code rtems_rate_monotonic_create( rtems_name name, @@ -84,3 +68,14 @@ rtems_status_code rtems_rate_monotonic_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Rate_monotonic_Manager_initialization( void ) +{ + _Objects_Initialize_information( &_Rate_monotonic_Information ); +} + +RTEMS_SYSINIT_ITEM( + _Rate_monotonic_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/region.c b/cpukit/rtems/src/region.c index 4fbce63160..f7ed857832 100644 --- a/cpukit/rtems/src/region.c +++ b/cpukit/rtems/src/region.c @@ -1,59 +1,47 @@ /** * @file * - * @brief _Region_Manager_initialization - * @ingroup ClassicRegion Regions + * @ingroup ClassicRegion + * + * @brief Classic Region Information with Zero Objects */ /* - * COPYRIGHT (c) 1989-2013. - * On-Line Applications Research Corporation (OAR). + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2018 embedded brains GmbH + * + * 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. * - * 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 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/options.h> -#include <rtems/rtems/regionimpl.h> - -Objects_Information _Region_Information; - -/* - * _Region_Manager_initialization - * - * This routine initializes all region manager related data structures. - * - * Input parameters: NONE - * - * Output parameters: NONE - */ - -static void _Region_Manager_initialization(void) -{ - _Objects_Initialize_information( - &_Region_Information, /* object information table */ - OBJECTS_CLASSIC_API, /* object API */ - OBJECTS_RTEMS_REGIONS, /* object class */ - Configuration_RTEMS_API.maximum_regions, - /* maximum objects of this class */ - sizeof( Region_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/regiondata.h> -RTEMS_SYSINIT_ITEM( - _Region_Manager_initialization, - RTEMS_SYSINIT_CLASSIC_REGION, - RTEMS_SYSINIT_ORDER_MIDDLE +OBJECTS_INFORMATION_DEFINE_ZERO( + _Region, + OBJECTS_CLASSIC_API, + OBJECTS_RTEMS_REGIONS, + OBJECTS_NO_STRING_NAME ); diff --git a/cpukit/rtems/src/regioncreate.c b/cpukit/rtems/src/regioncreate.c index 05df1dec5a..3d6215cdb1 100644 --- a/cpukit/rtems/src/regioncreate.c +++ b/cpukit/rtems/src/regioncreate.c @@ -23,26 +23,7 @@ #include <rtems/rtems/support.h> #include <rtems/score/apimutex.h> #include <rtems/score/threadqimpl.h> - -/* - * rtems_region_create - * - * This directive creates a region of physical contiguous memory area - * from which variable sized segments can be allocated. - * - * Input parameters: - * name - user defined region name - * starting_address - physical start address of region - * length - physical length in bytes - * page_size - page size in bytes - * attribute_set - region attributes - * id - address of region id to set - * - * Output parameters: - * id - region id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ +#include <rtems/sysinit.h> rtems_status_code rtems_region_create( rtems_name name, @@ -104,3 +85,14 @@ rtems_status_code rtems_region_create( return return_status; } + +static void _Region_Manager_initialization( void ) +{ + _Objects_Initialize_information( &_Region_Information ); +} + +RTEMS_SYSINIT_ITEM( + _Region_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_REGION, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/rtemstimer.c b/cpukit/rtems/src/rtemstimer.c index f0a8c672fa..be6592216f 100644 --- a/cpukit/rtems/src/rtemstimer.c +++ b/cpukit/rtems/src/rtemstimer.c @@ -1,50 +1,47 @@ /** - * @file + * @file * - * @brief Timer Manager Initialization - * @ingroup ClassicTimer + * @ingroup ClassicTimer + * + * @brief Classic Timer Information with Zero Objects */ /* - * COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2018 embedded brains GmbH + * + * 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. * - * 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 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/timerimpl.h> - -Timer_server_Control *volatile _Timer_server; - -Objects_Information _Timer_Information; - -static void _Timer_Manager_initialization(void) -{ - _Objects_Initialize_information( - &_Timer_Information, /* object information table */ - OBJECTS_CLASSIC_API, /* object API */ - OBJECTS_RTEMS_TIMERS, /* object class */ - Configuration_RTEMS_API.maximum_timers , - /* maximum objects of this class */ - sizeof( Timer_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/timerdata.h> -RTEMS_SYSINIT_ITEM( - _Timer_Manager_initialization, - RTEMS_SYSINIT_CLASSIC_TIMER, - RTEMS_SYSINIT_ORDER_MIDDLE +OBJECTS_INFORMATION_DEFINE_ZERO( + _Timer, + OBJECTS_CLASSIC_API, + OBJECTS_RTEMS_TIMERS, + OBJECTS_NO_STRING_NAME ); diff --git a/cpukit/rtems/src/sem.c b/cpukit/rtems/src/sem.c index e91e2d14bf..51733b4997 100644 --- a/cpukit/rtems/src/sem.c +++ b/cpukit/rtems/src/sem.c @@ -1,57 +1,47 @@ /** - * @file + * @file * - * @brief Semaphore Manager Initialization - * @ingroup ClassicSem + * @ingroup ClassicSem + * + * @brief Classic Semaphore Information with Zero Objects */ /* - * COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2018 embedded brains GmbH + * + * 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. * - * 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 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/config.h> -#include <rtems/sysinit.h> -#include <rtems/rtems/semimpl.h> - -Objects_Information _Semaphore_Information; - -static void _Semaphore_Manager_initialization(void) -{ - _Objects_Initialize_information( - &_Semaphore_Information, /* object information table */ - OBJECTS_CLASSIC_API, /* object API */ - OBJECTS_RTEMS_SEMAPHORES, /* object class */ - Configuration_RTEMS_API.maximum_semaphores, - /* maximum objects of this class */ - sizeof( Semaphore_Control ), /* size of this object's control block */ - OBJECTS_NO_STRING_NAME, /* maximum length of an object name */ - _Semaphore_MP_Send_extract_proxy /* Proxy extraction support callout */ - ); - - /* - * Register the MP Process Packet routine. - */ - -#if defined(RTEMS_MULTIPROCESSING) - _MPCI_Register_packet_processor( - MP_PACKET_SEMAPHORE, - _Semaphore_MP_Process_packet - ); -#endif - -} +#include <rtems/rtems/semdata.h> -RTEMS_SYSINIT_ITEM( - _Semaphore_Manager_initialization, - RTEMS_SYSINIT_CLASSIC_SEMAPHORE, - RTEMS_SYSINIT_ORDER_MIDDLE +OBJECTS_INFORMATION_DEFINE_ZERO( + _Semaphore, + OBJECTS_CLASSIC_API, + OBJECTS_RTEMS_SEMAPHORES, + OBJECTS_NO_STRING_NAME ); diff --git a/cpukit/rtems/src/semcreate.c b/cpukit/rtems/src/semcreate.c index fd266f8cd5..dc4e02cd97 100644 --- a/cpukit/rtems/src/semcreate.c +++ b/cpukit/rtems/src/semcreate.c @@ -25,6 +25,7 @@ #include <rtems/rtems/tasksimpl.h> #include <rtems/score/schedulerimpl.h> #include <rtems/score/sysstate.h> +#include <rtems/sysinit.h> #define SEMAPHORE_KIND_MASK ( RTEMS_SEMAPHORE_CLASS | RTEMS_INHERIT_PRIORITY \ | RTEMS_PRIORITY_CEILING | RTEMS_MULTIPROCESSOR_RESOURCE_SHARING ) @@ -254,3 +255,21 @@ rtems_status_code rtems_semaphore_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Semaphore_Manager_initialization(void) +{ + _Objects_Initialize_information( &_Semaphore_Information ); + +#if defined(RTEMS_MULTIPROCESSING) + _MPCI_Register_packet_processor( + MP_PACKET_SEMAPHORE, + _Semaphore_MP_Process_packet + ); +#endif +} + +RTEMS_SYSINIT_ITEM( + _Semaphore_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_SEMAPHORE, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/taskcreate.c b/cpukit/rtems/src/taskcreate.c index 26953828e9..4055e1eb50 100644 --- a/cpukit/rtems/src/taskcreate.c +++ b/cpukit/rtems/src/taskcreate.c @@ -20,12 +20,15 @@ #include <rtems/rtems/tasksimpl.h> #include <rtems/rtems/attrimpl.h> +#include <rtems/rtems/eventimpl.h> #include <rtems/rtems/modesimpl.h> #include <rtems/rtems/support.h> #include <rtems/score/apimutex.h> #include <rtems/score/schedulerimpl.h> #include <rtems/score/sysstate.h> #include <rtems/score/threadimpl.h> +#include <rtems/score/userextimpl.h> +#include <rtems/sysinit.h> rtems_status_code rtems_task_create( rtems_name name, @@ -198,3 +201,62 @@ rtems_status_code rtems_task_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _RTEMS_tasks_Start_extension( + Thread_Control *executing, + Thread_Control *started +) +{ + RTEMS_API_Control *api; + + api = started->API_Extensions[ THREAD_API_RTEMS ]; + + _Event_Initialize( &api->Event ); + _Event_Initialize( &api->System_event ); +} + +#if defined(RTEMS_MULTIPROCESSING) +static void _RTEMS_tasks_Terminate_extension( Thread_Control *executing ) +{ + if ( executing->is_global ) { + _Objects_MP_Close( + &_RTEMS_tasks_Information.Objects, + executing->Object.id + ); + _RTEMS_tasks_MP_Send_process_packet( + RTEMS_TASKS_MP_ANNOUNCE_DELETE, + executing->Object.id, + 0 /* Not used */ + ); + } +} +#endif + +static User_extensions_Control _RTEMS_tasks_User_extensions = { + .Callouts = { +#if defined(RTEMS_MULTIPROCESSING) + .thread_terminate = _RTEMS_tasks_Terminate_extension, +#endif + .thread_start = _RTEMS_tasks_Start_extension, + .thread_restart = _RTEMS_tasks_Start_extension + } +}; + +static void _RTEMS_tasks_Manager_initialization(void) +{ + _Thread_Initialize_information( &_RTEMS_tasks_Information ); + _User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions ); + +#if defined(RTEMS_MULTIPROCESSING) + _MPCI_Register_packet_processor( + MP_PACKET_TASKS, + _RTEMS_tasks_MP_Process_packet + ); +#endif +} + +RTEMS_SYSINIT_ITEM( + _RTEMS_tasks_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_TASKS, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c index 55dd1dc334..f0297b175b 100644 --- a/cpukit/rtems/src/tasks.c +++ b/cpukit/rtems/src/tasks.c @@ -18,86 +18,10 @@ #include "config.h" #endif -#include <rtems/config.h> -#include <rtems/sysinit.h> -#include <rtems/rtems/eventimpl.h> -#include <rtems/rtems/tasksimpl.h> -#include <rtems/score/threadimpl.h> -#include <rtems/score/userextimpl.h> +#include <rtems/rtems/tasksdata.h> -Thread_Information _RTEMS_tasks_Information; - -static void _RTEMS_tasks_Start_extension( - Thread_Control *executing, - Thread_Control *started -) -{ - RTEMS_API_Control *api; - - api = started->API_Extensions[ THREAD_API_RTEMS ]; - - _Event_Initialize( &api->Event ); - _Event_Initialize( &api->System_event ); -} - -#if defined(RTEMS_MULTIPROCESSING) -static void _RTEMS_tasks_Terminate_extension( Thread_Control *executing ) -{ - if ( executing->is_global ) { - _Objects_MP_Close( - &_RTEMS_tasks_Information.Objects, - executing->Object.id - ); - _RTEMS_tasks_MP_Send_process_packet( - RTEMS_TASKS_MP_ANNOUNCE_DELETE, - executing->Object.id, - 0 /* Not used */ - ); - } -} -#endif - -User_extensions_Control _RTEMS_tasks_User_extensions = { - .Callouts = { -#if defined(RTEMS_MULTIPROCESSING) - .thread_terminate = _RTEMS_tasks_Terminate_extension, -#endif - .thread_start = _RTEMS_tasks_Start_extension, - .thread_restart = _RTEMS_tasks_Start_extension - } -}; - -static void _RTEMS_tasks_Manager_initialization(void) -{ - _Thread_Initialize_information( - &_RTEMS_tasks_Information, /* object information table */ - OBJECTS_CLASSIC_API, /* object API */ - OBJECTS_RTEMS_TASKS, /* object class */ - Configuration_RTEMS_API.maximum_tasks - /* maximum objects of this class */ - ); - - /* - * Add all the extensions for this API - */ - - _User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions ); - - /* - * Register the MP Process Packet routine. - */ - -#if defined(RTEMS_MULTIPROCESSING) - _MPCI_Register_packet_processor( - MP_PACKET_TASKS, - _RTEMS_tasks_MP_Process_packet - ); -#endif - -} - -RTEMS_SYSINIT_ITEM( - _RTEMS_tasks_Manager_initialization, - RTEMS_SYSINIT_CLASSIC_TASKS, - RTEMS_SYSINIT_ORDER_MIDDLE +THREAD_INFORMATION_DEFINE_ZERO( + _RTEMS_tasks, + OBJECTS_CLASSIC_API, + OBJECTS_RTEMS_TASKS ); diff --git a/cpukit/rtems/src/timercreate.c b/cpukit/rtems/src/timercreate.c index 0fff3d54cf..ad47ce505a 100644 --- a/cpukit/rtems/src/timercreate.c +++ b/cpukit/rtems/src/timercreate.c @@ -27,12 +27,15 @@ #include <rtems/score/thread.h> #include <rtems/score/todimpl.h> #include <rtems/score/watchdogimpl.h> +#include <rtems/sysinit.h> RTEMS_STATIC_ASSERT( PER_CPU_WATCHDOG_REALTIME == TIMER_CLASS_BIT_TIME_OF_DAY, TIMER_CLASS_BIT_TIME_OF_DAY ); +Timer_server_Control *volatile _Timer_server; + void _Timer_Routine_adaptor( Watchdog_Control *the_watchdog ) { Timer_Control *the_timer; @@ -212,3 +215,14 @@ rtems_status_code rtems_timer_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Timer_Manager_initialization( void ) +{ + _Objects_Initialize_information( &_Timer_Information ); +} + +RTEMS_SYSINIT_ITEM( + _Timer_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_TIMER, + RTEMS_SYSINIT_ORDER_MIDDLE +); |