Inconsistencies around TERMIOS_TASK_DRIVEN and deviceOutputUsesInterrupts

R. Diez rdiezmail-rtems at yahoo.de
Thu Aug 1 10:51:33 UTC 2013


Hallo all:

File cpukit/libcsupport/include/rtems/termiostypes.h defines the following constants:

  /*
   * FIXME: this should move to libio.h!
   * values for rtems_termios_callbacks.outputUsesInterrupts
   */
  #define TERMIOS_POLLED      0
  #define TERMIOS_IRQ_DRIVEN  1
  #define TERMIOS_TASK_DRIVEN 2

However, some modules initialise rtems_termios_callbacks structures with fixed values like this:
    .outputUsesInterrupts = 1,
Others use one of the constants above.

I noticed because some drivers initialise a similar field in structure console_fns with true/false, while others use the same constants as above. Routine console_open() in c/src/lib/libbsp/shared/console.c copies this flag as follows:

  Callbacks.outputUsesInterrupts = cptr->pDeviceFns->deviceOutputUsesInterrupts;

That is copying information from structure console_fns to structure rtems_termios_callbacks, but cptr->pDeviceFns->deviceOutputUsesInterrupts is of type bool, whereas Callbacks.outputUsesInterrupts is an int.

What does TERMIOS_TASK_DRIVEN mean anyway? I didn't manage to find any documentation about it.

Thanks,
  rdiez




More information about the devel mailing list