diff options
| author | Michal Idziorek <m.i@gmx.at> | 2015-05-24 03:32:14 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2015-05-24 03:32:14 +0200 |
| commit | fbbbc75200008e2b603e5b7df8cd2e1a5d17483b (patch) | |
| tree | eb78fa27e182fd840b02f603cef3a1df97a53249 /kernel/syscalls.c | |
| parent | f5d8d7bee20742a7a101665ebca630ff8e05d77b (diff) | |
syscalls and terminal functionality for GAMING mode
Diffstat (limited to 'kernel/syscalls.c')
| -rw-r--r-- | kernel/syscalls.c | 39 |
1 files changed, 39 insertions, 0 deletions
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); |
