summaryrefslogtreecommitdiff
path: root/ecos/packages/hal
diff options
context:
space:
mode:
Diffstat (limited to 'ecos/packages/hal')
-rw-r--r--ecos/packages/hal/maximus/arch/current/src/maximus_entry.c6
-rw-r--r--ecos/packages/hal/synth/arch/current/src/synth_entry.c6
-rw-r--r--ecos/packages/hal/synth/arch/current/src/synth_intr.c32
3 files changed, 22 insertions, 22 deletions
diff --git a/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c b/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c
index 3d63b2d3dc..350d554b8a 100644
--- a/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c
+++ b/ecos/packages/hal/maximus/arch/current/src/maximus_entry.c
@@ -89,7 +89,7 @@ void _linux_entry( void )
new_top = (void*) (CYGMEM_REGION_ram + CYGMEM_REGION_ram_SIZE);
if (new_top != cyg_hal_sys_brk(new_top)) {
CYG_FAIL("Failed to initialize memory");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
// "Enable the cache". Effectively the Maximus target has no cache,
@@ -128,7 +128,7 @@ void _linux_entry( void )
// "Drop into an infinite loop". Not a good idea for the Maximus
// target. Instead, exit.
- cyg_hal_sys_exit(0);
+ HAL_PLATFORM_EXIT(0);
}
// ----------------------------------------------------------------------------
@@ -182,7 +182,7 @@ __stack_chk_fail(void)
{
CYG_FAIL("Stack smashing detected, aborting");
diag_printf("Application error: stack smashing detected.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
for (;;);
}
diff --git a/ecos/packages/hal/synth/arch/current/src/synth_entry.c b/ecos/packages/hal/synth/arch/current/src/synth_entry.c
index af0cad237a..4121413603 100644
--- a/ecos/packages/hal/synth/arch/current/src/synth_entry.c
+++ b/ecos/packages/hal/synth/arch/current/src/synth_entry.c
@@ -123,7 +123,7 @@ void _linux_entry( void )
new_top = (void*) (CYGMEM_REGION_ram + CYGMEM_REGION_ram_SIZE);
if (new_top != cyg_hal_sys_brk(new_top)) {
CYG_FAIL("Failed to initialize memory");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
// Again a no-op for the synthetic target. All memory is readily
@@ -166,7 +166,7 @@ void _linux_entry( void )
// "Drop into an infinite loop". Not a good idea for the synthetic
// target. Instead, exit.
- cyg_hal_sys_exit(0);
+ HAL_PLATFORM_EXIT(0);
}
// ----------------------------------------------------------------------------
@@ -220,7 +220,7 @@ __stack_chk_fail(void)
{
CYG_FAIL("Stack smashing detected, aborting");
diag_printf("Application error: stack smashing detected.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
for (;;);
}
diff --git a/ecos/packages/hal/synth/arch/current/src/synth_intr.c b/ecos/packages/hal/synth/arch/current/src/synth_intr.c
index 655c33dfc4..1387534e0c 100644
--- a/ecos/packages/hal/synth/arch/current/src/synth_intr.c
+++ b/ecos/packages/hal/synth/arch/current/src/synth_intr.c
@@ -584,7 +584,7 @@ hal_clock_read(void)
static void
synth_io_handle_shutdown_request_from_auxiliary(void)
{
- cyg_hal_sys_exit(0);
+ HAL_PLATFORM_EXIT(0);
}
static void
@@ -815,7 +815,7 @@ synth_start_auxiliary(void)
if (!found) {
diag_printf("Error: unable to find the I/O auxiliary program on the current search PATH\n");
diag_printf(" : please install the appropriate host-side tools.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
// An apparently valid executable exists (or at the very least it existed...),
@@ -823,14 +823,14 @@ synth_start_auxiliary(void)
if ((0 != cyg_hal_sys_pipe(to_aux_pipe)) ||
(0 != cyg_hal_sys_pipe(from_aux_pipe))) {
diag_printf("Error: unable to set up pipes for communicating with the I/O auxiliary.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
// Time to fork().
child = cyg_hal_sys_fork();
if (child < 0) {
diag_printf("Error: failed to fork() process for the I/O auxiliary.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
} else if (child == 0) {
cyg_bool found_dotdot;
// There should not be any problems rearranging the file descriptors as desired...
@@ -853,7 +853,7 @@ synth_start_auxiliary(void)
if (3 == from_aux_pipe[1]) {
// Because to_aux_pipe[] was set up first it should have received file descriptors 3 and 4.
diag_printf("Internal error: file descriptors have been allocated in an unusual order.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
} else {
unexpected_error |= (3 != cyg_hal_sys_dup2(to_aux_pipe[0], 3));
unexpected_error |= (0 != cyg_hal_sys_close(to_aux_pipe[0]));
@@ -865,7 +865,7 @@ synth_start_auxiliary(void)
}
if (unexpected_error) {
diag_printf("Error: internal error in auxiliary process, failed to manipulate pipes.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
// The arguments passed to the auxiliary are mostly those for
// the synthetic target application, except for argv[0] which
@@ -914,7 +914,7 @@ synth_start_auxiliary(void)
// any data, and it will assume that a suitable diagnostic will have
// been displayed already.
diag_printf("Error: failed to execute the I/O auxiliary.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
} else {
int rc;
char buf[1];
@@ -926,7 +926,7 @@ synth_start_auxiliary(void)
if ((0 != cyg_hal_sys_close(to_aux_pipe[0])) ||
(0 != cyg_hal_sys_close(from_aux_pipe[1]))) {
diag_printf("Error: internal error in main process, failed to manipulate pipes.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
// It is now a good idea to block until the auxiliary is
@@ -944,7 +944,7 @@ synth_start_auxiliary(void)
// The auxiliary has not started up successfully, so exit
// immediately. It should have generated appropriate
// diagnostics.
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
}
@@ -966,7 +966,7 @@ synth_start_auxiliary(void)
" Expected version %d, actual version %d\n"
" Installed binary is %s\n",
SYNTH_AUXILIARY_PROTOCOL_VERSION, aux_version, filename);
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
}
@@ -1051,7 +1051,7 @@ synth_auxiliary_xchgmsg(int devid, int reqcode, int arg1, int arg2,
} else if (rc < 0) {
diag_printf("Internal error: unexpected result %d when sending buffer to auxiliary.\n", rc);
diag_printf(" : this application is exiting immediately.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
} else {
sent += rc;
}
@@ -1072,7 +1072,7 @@ synth_auxiliary_xchgmsg(int devid, int reqcode, int arg1, int arg2,
diag_printf("Internal error: EOF detected on pipe from auxiliary.\n");
}
diag_printf(" : this application is exiting immediately.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
CYG_ASSERT(SYNTH_REPLY_LENGTH == rc, "The correct amount of data should have been read");
@@ -1172,7 +1172,7 @@ synth_auxiliary_instantiate(const char* pkg, const char* version, const char* de
} else {
diag_printf("Internal error: buffer overflow constructing instantiate request for auxiliary.\n");
diag_printf(" : this application is exiting immediately.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
if (synth_auxiliary_running) {
@@ -1203,7 +1203,7 @@ synth_pipe_sighandler(int sig)
synth_auxiliary_running = false;
diag_printf("Internal error: communication with the I/O auxiliary has been lost.\n");
diag_printf(" : this application is exiting immediately.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
}
@@ -1226,7 +1226,7 @@ synth_chld_sighandler(int sig)
synth_auxiliary_running = false;
diag_printf("Internal error: the I/O auxiliary has terminated unexpectedly.\n");
diag_printf(" : this application is exiting immediately.\n");
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
}
@@ -1397,7 +1397,7 @@ synth_hardware_init2(void)
&result,
(unsigned char*) 0, (int*) 0, 0);
if ( !result ) {
- cyg_hal_sys_exit(1);
+ HAL_PLATFORM_EXIT(1);
}
}
}