[rtems-libbsd commit] Delete rtems_bsd_initialize_with_interrupt_server
Sebastian Huber
sebh at rtems.org
Fri Dec 20 14:29:29 UTC 2013
Module: rtems-libbsd
Branch: master
Commit: e51bc974be8dda9098762cc7e866673ca4c35558
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=e51bc974be8dda9098762cc7e866673ca4c35558
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Dec 20 13:26:03 2013 +0100
Delete rtems_bsd_initialize_with_interrupt_server
Move interrupt server initialization to nexus_probe().
---
Makefile | 1 -
freebsd-to-rtems.py | 1 -
rtemsbsd/include/rtems/bsd/bsd.h | 2 -
rtemsbsd/rtems/rtems-bsd-init-with-irq.c | 64 --------------------
rtemsbsd/rtems/rtems-bsd-nexus.c | 11 ++++
testsuite/include/rtems/bsd/test/default-init.h | 2 +-
.../include/rtems/bsd/test/default-network-init.h | 2 +-
testsuite/usb01/init.c | 2 +-
8 files changed, 14 insertions(+), 71 deletions(-)
diff --git a/Makefile b/Makefile
index dbe487b..3d29c19 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,6 @@ LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-conf.c
LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-delay.c
LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-get-file.c
LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-init.c
-LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-init-with-irq.c
LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-jail.c
LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-kern_synch.c
LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-lock.c
diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
index ae2ed09..c58d583 100755
--- a/freebsd-to-rtems.py
+++ b/freebsd-to-rtems.py
@@ -652,7 +652,6 @@ rtems.addRTEMSSourceFiles(
'rtems/rtems-bsd-delay.c',
'rtems/rtems-bsd-get-file.c',
'rtems/rtems-bsd-init.c',
- 'rtems/rtems-bsd-init-with-irq.c',
'rtems/rtems-bsd-jail.c',
'rtems/rtems-bsd-kern_synch.c',
'rtems/rtems-bsd-lock.c',
diff --git a/rtemsbsd/include/rtems/bsd/bsd.h b/rtemsbsd/include/rtems/bsd/bsd.h
index 5e84711..7156545 100644
--- a/rtemsbsd/include/rtems/bsd/bsd.h
+++ b/rtemsbsd/include/rtems/bsd/bsd.h
@@ -70,8 +70,6 @@ extern const size_t rtems_bsd_nexus_device_count;
rtems_status_code rtems_bsd_initialize(void);
-rtems_status_code rtems_bsd_initialize_with_interrupt_server(void);
-
void rtems_bsd_shell_initialize(void);
#ifdef __cplusplus
diff --git a/rtemsbsd/rtems/rtems-bsd-init-with-irq.c b/rtemsbsd/rtems/rtems-bsd-init-with-irq.c
deleted file mode 100644
index 0f47252..0000000
--- a/rtemsbsd/rtems/rtems-bsd-init-with-irq.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * @file
- *
- * @ingroup rtems_bsd_rtems
- *
- * @brief TODO.
- */
-
-/*
- * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems at embedded-brains.de>
- *
- * 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 AUTHOR 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 AUTHOR 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.
- */
-
-#include <machine/rtems-bsd-kernel-space.h>
-#include <machine/rtems-bsd-thread.h>
-
-#include <rtems/irq-extension.h>
-
-#include <rtems/bsd/bsd.h>
-
-rtems_status_code
-rtems_bsd_initialize_with_interrupt_server(void)
-{
- rtems_status_code sc = RTEMS_SUCCESSFUL;
-
- sc = rtems_interrupt_server_initialize(
- BSD_TASK_PRIORITY_INTERRUPT,
- BSD_MINIMUM_TASK_STACK_SIZE,
- RTEMS_DEFAULT_MODES,
- RTEMS_DEFAULT_ATTRIBUTES,
- NULL
- );
- if (sc != RTEMS_SUCCESSFUL) {
- return RTEMS_UNSATISFIED;
- }
-
- return rtems_bsd_initialize();
-}
diff --git a/rtemsbsd/rtems/rtems-bsd-nexus.c b/rtemsbsd/rtems/rtems-bsd-nexus.c
index 12c5f36..1c41fa5 100644
--- a/rtemsbsd/rtems/rtems-bsd-nexus.c
+++ b/rtemsbsd/rtems/rtems-bsd-nexus.c
@@ -38,6 +38,7 @@
*/
#include <machine/rtems-bsd-kernel-space.h>
+#include <machine/rtems-bsd-thread.h>
#include <rtems/bsd/sys/param.h>
#include <rtems/bsd/sys/types.h>
@@ -62,11 +63,21 @@ static struct rman irq_rman;
static int
nexus_probe(device_t dev)
{
+ rtems_status_code status;
int err;
size_t i;
device_set_desc(dev, "RTEMS Nexus device");
+ status = rtems_interrupt_server_initialize(
+ BSD_TASK_PRIORITY_INTERRUPT,
+ BSD_MINIMUM_TASK_STACK_SIZE,
+ RTEMS_DEFAULT_MODES,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ NULL
+ );
+ BSD_ASSERT(status == RTEMS_SUCCESSFUL);
+
mem_rman.rm_start = 0;
mem_rman.rm_end = ~0UL;
mem_rman.rm_type = RMAN_ARRAY;
diff --git a/testsuite/include/rtems/bsd/test/default-init.h b/testsuite/include/rtems/bsd/test/default-init.h
index 8af4477..6734a45 100644
--- a/testsuite/include/rtems/bsd/test/default-init.h
+++ b/testsuite/include/rtems/bsd/test/default-init.h
@@ -51,7 +51,7 @@ rtems_task Init(
/* Let other tasks run to complete background work */
default_set_self_prio( RTEMS_MAXIMUM_PRIORITY - 1 );
- rtems_bsd_initialize_with_interrupt_server();
+ rtems_bsd_initialize();
/* Let the callout timer allocate its resources */
sc = rtems_task_wake_after( 2 );
diff --git a/testsuite/include/rtems/bsd/test/default-network-init.h b/testsuite/include/rtems/bsd/test/default-network-init.h
index a937d90..0b851df 100644
--- a/testsuite/include/rtems/bsd/test/default-network-init.h
+++ b/testsuite/include/rtems/bsd/test/default-network-init.h
@@ -151,7 +151,7 @@ Init(rtems_task_argument arg)
/* Let other tasks run to complete background work */
default_network_set_self_prio(RTEMS_MAXIMUM_PRIORITY - 1);
- rtems_bsd_initialize_with_interrupt_server();
+ rtems_bsd_initialize();
/* Let the callout timer allocate its resources */
sc = rtems_task_wake_after(2);
diff --git a/testsuite/usb01/init.c b/testsuite/usb01/init.c
index fb054ce..8451135 100644
--- a/testsuite/usb01/init.c
+++ b/testsuite/usb01/init.c
@@ -259,7 +259,7 @@ static void Init(rtems_task_argument arg)
sc = rtems_media_server_initialize(200, 32 * 1024, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES);
ASSERT_SC(sc);
- sc = rtems_bsd_initialize_with_interrupt_server();
+ sc = rtems_bsd_initialize();
ASSERT_SC(sc);
rtems_bsd_shell_initialize();
More information about the vc
mailing list