#include <xexception_l.h>
#include <xtime_l.h>
extern void *do_syscall_asm(int syscall_num, void *param2, void *param3, void *param4, void *param5, void *param6);

void *do_syscall(int syscall_num, void *param2, void *param3, void *param4, void *param5, void *param6) {
  void *retval;
  // disable interrupts before accessing the system call data
  XTime_TSRClearStatusBits(XREG_TSR_PIT_INTERRUPT_STATUS);
  XTime_PITDisableInterrupt();	
  retval = do_syscall_asm(syscall_num, param2, param3, param4, param5, param6);
  XTime_TSRClearStatusBits(XREG_TSR_PIT_INTERRUPT_STATUS);
  XTime_PITEnableInterrupt();	
  return retval;
}


