forked from Imagelibrary/rtems
Changed initial settings of first time.
This commit is contained in:
@@ -119,13 +119,15 @@ static rtems_id ttyMutex;
|
||||
/*
|
||||
* Reserve enough resources to open every physical device once.
|
||||
*/
|
||||
|
||||
static int first_time; /* assumed to be zeroed by BSS initialization */
|
||||
|
||||
void
|
||||
rtems_termios_reserve_resources (
|
||||
rtems_configuration_table *configuration,
|
||||
rtems_unsigned32 number_of_devices
|
||||
)
|
||||
{
|
||||
static int first_time = 1;
|
||||
rtems_api_configuration_table *rtems_config;
|
||||
|
||||
if (!configuration)
|
||||
@@ -133,9 +135,9 @@ rtems_termios_reserve_resources (
|
||||
rtems_config = configuration->RTEMS_api_configuration;
|
||||
if (!rtems_config)
|
||||
rtems_fatal_error_occurred (0xFFF0F002);
|
||||
if (first_time)
|
||||
if (!first_time)
|
||||
rtems_config->maximum_semaphores += 1;
|
||||
first_time = 0;
|
||||
first_time = 1;
|
||||
rtems_config->maximum_semaphores += (4 * number_of_devices);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user