X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fos.h;h=54874f5e0e88c6dbb10a6e7d0e07cf39efaea5b6;hb=a29491ade0adf3dbb9dc51be8b45530edde1f1df;hp=10e198cf503e978be0bab4adc44502d3bfdd4c30;hpb=880dbc5f808b65f62b47c78939e12d32c1701ed6;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/os.h b/include/os.h index 10e198c..54874f5 100644 --- a/include/os.h +++ b/include/os.h @@ -17,6 +17,13 @@ struct rtc_time; struct sandbox_state; /** + * os_printf() - print directly to OS console + * + * @format: format string + */ +int os_printf(const char *format, ...); + +/** * Access to the OS read() system call * * @fd: File descriptor as returned by os_open() @@ -102,6 +109,23 @@ int os_unlink(const char *pathname); void os_exit(int exit_code) __attribute__((noreturn)); /** + * os_alarm() - access to the OS alarm() system call + */ +unsigned int os_alarm(unsigned int seconds); + +/** + * os_set_alarm_handler() - set handler for SIGALRM + * + * @handler: The handler function. Pass NULL for SIG_DFL. + */ +void os_set_alarm_handler(void (*handler)(int)); + +/** + * os_raise_sigalrm() - do raise(SIGALRM) + */ +void os_raise_sigalrm(void); + +/** * os_tty_raw() - put tty into raw mode to mimic serial console better * * @fd: File descriptor of stdin (normally 0) @@ -289,6 +313,14 @@ void os_putc(int ch); void os_puts(const char *str); /** + * os_flush() - flush controlling OS terminal + * + * This bypasses the U-Boot console support and flushes directly the OS + * stdout file descriptor. + */ +void os_flush(void); + +/** * os_write_ram_buf() - write the sandbox RAM buffer to a existing file * * @fname: filename to write memory to (simple binary format)