Opened 16 years ago
Closed 16 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.
Note:
See TracTickets
for help on using tickets.
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.