From fbbbc75200008e2b603e5b7df8cd2e1a5d17483b Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Sun, 24 May 2015 03:32:14 +0200 Subject: syscalls and terminal functionality for GAMING mode --- kernel/syscalls.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'kernel/syscalls.c') diff --git a/kernel/syscalls.c b/kernel/syscalls.c index f5169e7..c935ecd 100644 --- a/kernel/syscalls.c +++ b/kernel/syscalls.c @@ -87,6 +87,45 @@ int syscall_readdir(const char *name,fs_dirent *dirs,int max) return fs_readdir(name,dirs,max); } +// for non blocking io? +int syscall_has_data_waiting(int file) +{ + + #ifdef LOG_SYSCALLS + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"has data waiting?"); + #endif + + return fifo_has(&get_fool()->std_in); +} + +int syscall_tune(int v1,int v2, int v3) +{ + + + #ifdef LOG_SYSCALLS + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"tuning request"); + #endif + + + if(v1==0) // regular tty mode + { + get_fool()->tty->set_buff=true; + get_fool()->tty->set_echo=true; + } + if(v1==1) // gaming tty mode + { + get_fool()->tty->set_buff=false; + get_fool()->tty->set_echo=false; + } + + + return 0; +} + + + + + int copy_args(char **in, char **out) { log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"copy_args(0x%08x, 0x%08X)",in,out); -- cgit v1.2.3