summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/i386/force386/clock/ckinit.c16
-rw-r--r--c/src/lib/libbsp/i386/force386/startup/bspstart.c11
-rw-r--r--c/src/lib/libbsp/i386/go32/clock/ckinit.c16
-rw-r--r--c/src/lib/libbsp/i386/go32/startup/bspstart.c11
4 files changed, 22 insertions, 32 deletions
diff --git a/c/src/lib/libbsp/i386/force386/clock/ckinit.c b/c/src/lib/libbsp/i386/force386/clock/ckinit.c
index 45a64f6f14..9bfad8991a 100644
--- a/c/src/lib/libbsp/i386/force386/clock/ckinit.c
+++ b/c/src/lib/libbsp/i386/force386/clock/ckinit.c
@@ -75,17 +75,6 @@ void Install_clock(
atexit( Clock_exit );
}
-void ReInstall_clock(
- rtems_isr_entry clock_isr
-)
-{
- rtems_unsigned32 isrlevel = 0;
-
- rtems_interrupt_disable( isrlevel );
- (void) set_vector( clock_isr, CLOCK_VECTOR, 1 );
- rtems_interrupt_enable( isrlevel );
-}
-
void Clock_exit( void )
{
if ( BSP_Configuration.ticks_per_timeslice ) {
@@ -119,6 +108,7 @@ rtems_device_driver Clock_control(
void *pargp
)
{
+ rtems_unsigned32 isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
if (args == 0)
@@ -135,7 +125,9 @@ rtems_device_driver Clock_control(
}
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
{
- ReInstall_clock(args->buffer);
+ rtems_interrupt_disable( isrlevel );
+ (void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
+ rtems_interrupt_enable( isrlevel );
}
done:
diff --git a/c/src/lib/libbsp/i386/force386/startup/bspstart.c b/c/src/lib/libbsp/i386/force386/startup/bspstart.c
index 1433e5e02a..3f001fb109 100644
--- a/c/src/lib/libbsp/i386/force386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/force386/startup/bspstart.c
@@ -122,18 +122,21 @@ void
bsp_postdriver_hook(void)
{
int stdin_fd, stdout_fd, stderr_fd;
+ int error_code;
+
+ error_code = 'S' << 24 | 'T' << 16;
if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1)
- rtems_fatal_error_occurred('STD0');
+ rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
- rtems_fatal_error_occurred('STD1');
+ rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
- rtems_fatal_error_occurred('STD2');
+ rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
- rtems_fatal_error_occurred('STIO');
+ rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
}
int main(
diff --git a/c/src/lib/libbsp/i386/go32/clock/ckinit.c b/c/src/lib/libbsp/i386/go32/clock/ckinit.c
index fa6a8bf057..70c564fabc 100644
--- a/c/src/lib/libbsp/i386/go32/clock/ckinit.c
+++ b/c/src/lib/libbsp/i386/go32/clock/ckinit.c
@@ -108,17 +108,6 @@ void Install_clock(
atexit( Clock_exit );
}
-void ReInstall_clock(
- rtems_isr_entry clock_isr
-)
-{
- rtems_unsigned32 isrlevel = 0;
-
- rtems_interrupt_disable( isrlevel );
- (void) set_vector( clock_isr, CLOCK_VECTOR, 1 );
- rtems_interrupt_enable( isrlevel );
-}
-
void Clock_exit( void )
{
if ( BSP_Configuration.ticks_per_timeslice ) {
@@ -161,6 +150,7 @@ rtems_device_driver Clock_control(
void *pargp
)
{
+ rtems_unsigned32 isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
if (args == 0)
@@ -177,7 +167,9 @@ rtems_device_driver Clock_control(
}
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
{
- ReInstall_clock(args->buffer);
+ rtems_interrupt_disable( isrlevel );
+ (void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
+ rtems_interrupt_enable( isrlevel );
}
done:
diff --git a/c/src/lib/libbsp/i386/go32/startup/bspstart.c b/c/src/lib/libbsp/i386/go32/startup/bspstart.c
index 17a10b4193..602b7bdfd6 100644
--- a/c/src/lib/libbsp/i386/go32/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/go32/startup/bspstart.c
@@ -129,18 +129,21 @@ void
bsp_postdriver_hook(void)
{
int stdin_fd, stdout_fd, stderr_fd;
+ int error_code;
+
+ error_code = 'S' << 24 | 'T' << 16;
if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1)
- rtems_fatal_error_occurred('STD0');
+ rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
- rtems_fatal_error_occurred('STD1');
+ rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
- rtems_fatal_error_occurred('STD2');
+ rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
- rtems_fatal_error_occurred('STIO');
+ rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
}
/* This is the original command line passed from DOS */