Opened 16 years ago
Closed 16 years ago
#88 closed defect (fixed)
cons_get_event() should be rewritten using e.g. condition variables
Reported by: | Jakub Jermář | Owned by: | Jakub Jermář |
---|---|---|---|
Priority: | major | Milestone: | 0.4.1 |
Component: | helenos/srv/console | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
In cons_get_event() we are introducing another level of asynchronous processing in the form of the pending fibril. With the fibril synchronization primitives, this should not be necessary and e.g. a mere condition variable should do.
Change History (5)
follow-up: 2 comment:1 by , 16 years ago
comment:2 by , 16 years ago
What I meant is that you have the async framework, fibrils and fibril synchronization primitives on one side and the pending mechanism on the other. Given sufficient number of fibrils, it should be possible to block the connection fibril directly until the resource is ready instead of enqueuing the request for the pending fibril. I realize that if there is only one fibril handling the devfs→console connection, then there is a problem with this suggestion.
comment:3 by , 16 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Ok, DEVFS opens a separate connection to console for each /dev/vc*. This allows to block the connection fibril which needs to wait for input. I have the fix in my workspace and will commit it later today.
There is most likely going to be a problem when we add support for background tasks that use console (i.e. the background task will not be able to use the console while the foreground task waits for input). Nevertheless, the problem will occur with the old pending mechanism too.
comment:4 by , 16 years ago
Status: | assigned → accepted |
---|
I don't understand the phrase "another level of asynchronous processing". The pending operation pattern is a common way how to deal with deferred operations.
However, it is true that the console server should be rewritten once again to make use of the new async framework possibilities.