subr_prf.c: Port to RTEMS

This commit is contained in:
Sebastian Huber
2016-05-04 13:04:42 +02:00
parent d4402ddbc8
commit 54a577d44f
10 changed files with 334 additions and 194 deletions

View File

@@ -44,6 +44,8 @@
#include <sys/queue.h>
#include <sys/kernel.h>
#include <stdarg.h>
#include <rtems.h>
#ifdef __cplusplus
@@ -191,6 +193,27 @@ int rtems_bsd_bus_root_resume(void);
*/
int rtems_bsd_bus_root_detach(void);
/**
* @brief Sets the output back-end for logging functions.
*
* @param new_vprintf_handler The new output back-end for logging functions.
*
* @see rtems_bsd_vprintf().
*/
void rtems_bsd_set_vprintf_handler(int (*new_vprintf_handler)
(int, const char *, va_list));
/**
* @brief Output back-end for logging functions.
*
* Used by kernel space printf(), vprintf(), log() and vlog(). Used by user
* space syslog() and vsyslog().
*
* The default uses putchar() and uses a mutex to serialize the output. It may
* be customized via rtems_bsd_set_vprintf_handler().
*/
int rtems_bsd_vprintf(int level, const char *fmt, va_list ap);
/** @} */
#ifdef __cplusplus