source: rtems/c/src/lib/libc/termiosreserveresources.c @ 5a23ca84

4.104.114.84.95
Last change on this file since 5a23ca84 was 5adf355a, checked in by Joel Sherrill <joel.sherrill@…>, on 05/27/99 at 16:11:52

Split initialization and reserve resources from termios to reduce
size of mininum application.

  • Property mode set to 100644
File size: 775 bytes
Line 
1/*
2 *  Reserve enough resources to open every physical device once.
3 *
4 * $Id$
5 */
6
7#include <rtems.h>
8
9static int first_time;   /* assumed to be zeroed by BSS initialization */
10
11void rtems_termios_reserve_resources (
12  rtems_configuration_table *configuration,
13  rtems_unsigned32           number_of_devices
14)
15{
16        rtems_api_configuration_table *rtems_config;
17
18        if (!configuration)
19                rtems_fatal_error_occurred (0xFFF0F001);
20        rtems_config = configuration->RTEMS_api_configuration;
21        if (!rtems_config)
22                rtems_fatal_error_occurred (0xFFF0F002);
23        if (!first_time)
24                rtems_config->maximum_semaphores += 1;
25        first_time = 1;
26        rtems_config->maximum_semaphores += (4 * number_of_devices);
27}
28
Note: See TracBrowser for help on using the repository browser.