5 /* This file defines the backend interface */
6 /* of the kernel c-library. */
8 #ifndef __LIBC_BACKEND_H__
9 #define __LIBC_BACKEND_H__
17 * The text output backend.
19 * This function must be provided to the c-library for
20 * text output. It must simply send len characters of s
21 * to an output device.
23 * @param s the string to send (not zero terminated).
24 * @param len the number of characters.
25 * @return 1 on success, 0 else.
27 int __libc_backend_outs( const char *s, size_t len );
31 * The text input backend.
33 * This function must be provided to the c-library for
34 * text input. It has to block til len characters are
35 * read or a newline is reached. The retrurn value gives
36 * the number of characters virtually read.
38 * @param s a poiznter to the buffer for the read text.
39 * @param len the size of the buffer.
40 * @return the number of characters virtually read.
42 int __libc_backend_ins( char *s, size_t len );
44 unsigned long __libc_backend_printf_lock(void);
45 void __libc_backend_printf_unlock(unsigned long);
50 #endif //__LIBC_BACKEND_H__