On Fri, 26 Nov 2004 14:12:46 +0100, Wolfgang Lenerz <[EMAIL PROTECTED]> wrote:
On 26 Nov 2004 at 11:46, Joachim Van der Auwera wrote:
As the thing will be called in supervisor mode itself, it could just keep track of some "ready for use" channels which are then passed to the device driver when needed. Then the problem is fully solved. The thing itself checks whether there are still enough "waiting devices" and allocates new devices in user mode which are queued for use by the device (in supervisor mode).
There's something I don't understand. When will the thing allocate devices in
user mode?
Perhaps we can agree that a thing never does any...thing by itself. The only
time something is achieved with a thing is when a JOB calls the thing's use
routine. Then that thing use routine is executed as if it was part of the
job's code.
To allocate new devices in user mode a job would have to call the thing in
user mode, and we're back to the beginning (at least I think we are).
Wolfgang
Perhaps the best solution (?) would be for the FILTER THING to maintain a user defineable number of open channels (say 5?) - it would open them all at initialisation. Then when a filter program is launched to deal with the data contained within one of the open channels, it could tell the FILTER THING (in user mode) to open another one ready...
Rich, you get my drift, but lack some knowledge. Wolfgang has the knowledge but doesn't get my drift. Grrrmbl.
You cannot call user mode from supervisor (well in theory you could, but it would probably kill the OS).
A normal "thing" is a resident extension. It is a "thing" to allow anybody to find the code (thing system is basically a code registry, similar to the possibility to extends SBasic with new keywords).
The resident extension when loaded registers itself as a thing. There is no problem to also create a background job at that time. The backgound job can do the user mode maintenance (create new channels when the spare list is running low).
So yes, at startup you create some channels to be used when needed. This will indeed not take up much space and allow for all the other tricks.
Joachim
_______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
