From: | Allan Odgaard |
Date: | 06 Dec 99 at 09:33:15 |
Subject: | Re: Process/Task confusion |
From: Allan Odgaard <Duff@DIKU.DK>
On 06-Dec-99, David Arbuthnot wrote:
> [...] If you want to use dos functions from a librart or
> device here's how I would do it (someone please tell me if there's an easier
> way)
A library is just a set of functions, which is executed in the using programs
context, so it's most likely executed as a process. I'd just use normal DOS
functions, and maybe make a note about it in the autodoc, if it isn't obvious,
and there's a chance my library will be called by a task... (which isn't very
likely - on my system the only tasks running are lowlevel device drivers)
One exception though is input.device - this is a task, so you mustn't do any
DOS i/o when called by input.device, this (as unlogical as it may seem)
includes using the clipboard.device (as I recently learned) even though it
will in most situations...
Regards Allan