hal_syscall.c File Reference


Detailed Description

System call funtions.

Author:
msalter,ysato
Date:
2000-11-5

Definition in file hal_syscall.c.

Go to the source code of this file.

Functions

CYG_ADDRWORD __do_syscall (CYG_ADDRWORD func, CYG_ADDRWORD arg1, CYG_ADDRWORD arg2, CYG_ADDRWORD arg3, CYG_ADDRWORD arg4, CYG_ADDRWORD *retval)
int hal_syscall_handler (void)
 HAL syscall handler.


Function Documentation

CYG_ADDRWORD __do_syscall CYG_ADDRWORD  func,
CYG_ADDRWORD  arg1,
CYG_ADDRWORD  arg2,
CYG_ADDRWORD  arg3,
CYG_ADDRWORD  arg4,
CYG_ADDRWORD *  retval
 

Referenced by hal_syscall_handler().

int hal_syscall_handler void   ) 
 

HAL syscall handler.

Definition at line 97 of file hal_syscall.c.

References __do_syscall(), ER0, ER1, ER2, ER3, get_register(), and put_register().

00098 {
00099     CYG_ADDRWORD func, arg1, arg2, arg3, arg4;
00100     CYG_ADDRWORD err;
00101 
00102     func = get_register(ER0);
00103     arg1 = get_register(ER1);
00104     arg2 = get_register(ER2);
00105     arg3 = get_register(ER3);
00106     arg4 = 0;
00107  
00108     if (func == SYS_interrupt) {
00109     //  A console interrupt landed us here.
00110     //  Invoke the debug agent so as to cause a SIGINT.
00111         return SIGINT;
00112     }
00113 
00114     if (__do_syscall(func, arg1, arg2, arg3, arg4, &err)) {
00115         put_register(D0, err);
00116     return 0;
00117     }
00118 
00119     return SIGTRAP;
00120 }

Here is the call graph for this function:


Generated on Tue Feb 17 09:06:17 2004 for eCos EDOSK-2674 HAL by doxygen 1.3.5