This module contains all methods and support related to providing the user with an interface to the kernel level print support.
◆ rtems_print_printer
typedef int(* rtems_print_printer) (void *, const char *format, va_list ap) |
Type definition for function which can be plugged in to certain reporting routines to redirect the output.
Use the RTEMS Print interface to call these functions. Do not directly use them.
If the user provides their own printer, then they may redirect those reports as they see fit.
◆ rtems_print_printer_fprintf()
void rtems_print_printer_fprintf |
( |
rtems_printer * |
printer, |
|
|
FILE * |
file |
|
) |
| |
Initializes the printer to print via fprintf() using the specified file stream.
- Parameters
-
[in] | printer | Pointer to the printer structure. |
◆ rtems_print_printer_fprintf_putc()
Initializes the printer to print via fprintf() using an unbuffered FILE stream with output through rtems_putc().
- Parameters
-
[in] | printer | Pointer to the printer structure. |
◆ rtems_print_printer_printf()
Initializes the printer to print via printf().
- Parameters
-
[in] | printer | Pointer to the printer structure. |
◆ rtems_print_printer_printk()
Initializes the printer to print via printk().
- Parameters
-
[in] | printer | Pointer to the printer structure. |
◆ rtems_print_printer_task()
Creates a printer task.
Print requests via rtems_printf() or rtems_vprintf() using a printer task printer are output to a buffer and then placed on a work queue in FIFO order. The work queue is emptied by the printer task. The printer task writes the buffer content to the file descriptor specified by the context. Buffers are allocated from a pool of buffers as specified by the context.
- Parameters
-
[in] | printer | Pointer to the printer structure. |
[in] | context | The initialized printer task context. |
- Return values
-
0 | Successful operation. |
EINVAL | Invalid context parameters. |
ENOMEM | Not enough resources. |
◆ rtems_printer_task_drain()
Drains the work queue of the printer task.
Waits until all output buffers in the work queue at the time of this function call are written to the file descriptor and an fsync() completed.
The printer task must be successfully started via rtems_print_printer_task() before this function can be used. Otherwise, the behaviour is undefined.
- Parameters
-
[in] | context | The printer task context of a successfully started printer task. |