From 7ee88c169555d90adca41b6cd74f0097816423c6 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 26 Oct 1999 20:30:20 +0000 Subject: Split console_reserve_resources to separate file to reduce code size. --- c/src/lib/libbsp/m68k/gen68360/console/Makefile.in | 2 +- c/src/lib/libbsp/m68k/gen68360/console/console.c | 8 ++--- .../gen68360/console/consolereserveresources.c | 39 ++++++++++++++++++++++ 3 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 c/src/lib/libbsp/m68k/gen68360/console/consolereserveresources.c (limited to 'c/src/lib/libbsp') diff --git a/c/src/lib/libbsp/m68k/gen68360/console/Makefile.in b/c/src/lib/libbsp/m68k/gen68360/console/Makefile.in index ed5f5a649c..88a7b7b174 100644 --- a/c/src/lib/libbsp/m68k/gen68360/console/Makefile.in +++ b/c/src/lib/libbsp/m68k/gen68360/console/Makefile.in @@ -16,7 +16,7 @@ VPATH = @srcdir@ PGM = ${ARCH}/console.rel # C source names, if any, go here -- minus the .c -C_PIECES = console +C_PIECES = console consolereserveresources C_FILES = $(C_PIECES:%=%.c) C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/gen68360/console/console.c b/c/src/lib/libbsp/m68k/gen68360/console/console.c index f31936144a..7b6fe1ded9 100644 --- a/c/src/lib/libbsp/m68k/gen68360/console/console.c +++ b/c/src/lib/libbsp/m68k/gen68360/console/console.c @@ -279,13 +279,9 @@ smc1PollWrite (int minor, const char *buf, int len) /* * Reserve resources consumed by this driver + * + * NOTE: This is in another file to reduce dependencies on the minimum size. */ -void console_reserve_resources( - rtems_configuration_table *configuration -) -{ - rtems_termios_reserve_resources (configuration, 1); -} /* * Initialize and register the device diff --git a/c/src/lib/libbsp/m68k/gen68360/console/consolereserveresources.c b/c/src/lib/libbsp/m68k/gen68360/console/consolereserveresources.c new file mode 100644 index 0000000000..1e720b29ce --- /dev/null +++ b/c/src/lib/libbsp/m68k/gen68360/console/consolereserveresources.c @@ -0,0 +1,39 @@ +/* + * Reserve resources for console driver. + * + * This is in a separate file to minimize the amount of baggage + * pulled in when not using the console device driver. + * + * Author: + * W. Eric Norum + * Saskatchewan Accelerator Laboratory + * University of Saskatchewan + * Saskatoon, Saskatchewan, CANADA + * eric@skatter.usask.ca + * + * COPYRIGHT (c) 1989-1998. + * On-Line Applications Research Corporation (OAR). + * Copyright assigned to U.S. Government, 1994. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + +#include +#include +#include +#include "m68360.h" + +/* + * Reserve resources consumed by this driver + */ +void console_reserve_resources( + rtems_configuration_table *configuration +) +{ + rtems_termios_reserve_resources (configuration, 1); +} -- cgit v1.2.3