Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 10 years ago

Closed 10 years ago

#87 closed defect (invalid)

cons_read() should be rewritten using e.g. condition variables

Reported by: Jakub Jermář Owned by:
Priority: major Milestone: 0.4.1
Component: helenos/srv/console Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

Currently, cons_read() contains a while loop which actively reads the keybuffer. A more elegant and also efficient version of the same can be achieved using e.g. condition variables.

Change History (2)

comment:1 Changed 10 years ago by Martin Decky

I don't understand how a version using condition variables could be anyhow more efficient. The loop just reads any data from the input buffer if it is present (and if it has been pushed into the buffer already). This is just to speed up the read operation if sufficient data is already present in the buffer.

If more data is expected to be read, the operation is deferred as a pending operation for later processing.

comment:2 Changed 10 years ago by Jakub Jermář

Resolution: invalid
Status: newclosed

Submitter can not read C.

Note: See TracTickets for help on using tickets.