-/* */
-
-
-
-/* This file defines the backend interface */
-/* of the kernel c-library. */
+/* This file defines the back-end interface */
+/* of the kernel C-library. */
#ifndef __LIBC_BACKEND_H__
#define __LIBC_BACKEND_H__
__BEGIN_DECLS
-/**
- * The text output backend.
- *
- * This function must be provided to the c-library for
+/**
+ * The text output back-end.
+ *
+ * This function must be provided to the C-library for
* text output. It must simply send len characters of s
* to an output device.
*
- * @param s the string to send (not zero terminated).
- * @param len the number of characters.
+ * @param s Buffer to send.
+ * @param len The number of bytes.
* @return 1 on success, 0 else.
*/
-int __libc_backend_outs( const char *s, size_t len );
-
+int __libc_backend_outs(const char *s, size_t len);
/**
- * The text input backend.
+ * The text input back-end.
*
- * This function must be provided to the c-library for
- * text input. It has to block til len characters are
- * read or a newline is reached. The retrurn value gives
+ * This function must be provided to the C-library for
+ * text input. It has to block until len characters are
+ * read or a newline is reached. The return value gives
* the number of characters virtually read.
*
- * @param s a poiznter to the buffer for the read text.
- * @param len the size of the buffer.
+ * @param s A pointer to the buffer for the read text.
+ * @param len The size of the buffer.
* @return the number of characters virtually read.
*/
-int __libc_backend_ins( char *s, size_t len );
+int __libc_backend_ins(char *s, size_t len);
-unsigned long __libc_backend_printf_lock(void);
-void __libc_backend_printf_unlock(unsigned long);
+typedef unsigned long __libc_backend_printf_lock_t;
-__END_DECLS
+__libc_backend_printf_lock_t __libc_backend_printf_lock(void);
+void __libc_backend_printf_unlock(__libc_backend_printf_lock_t);
+
+__END_DECLS
#endif //__LIBC_BACKEND_H__