Adrian Hey wrote:
Oh yes, so you did. Sorry. What alternative would you propose?
Something like Keeans thread talking to the rest of the
world by channels?
When Keean suggested this I objected that there was still
no way to prevent accidental forking of multiple copies
of this supposedly unique res
On Wednesday 01 Dec 2004 4:22 pm, Lennart Augustsson wrote:
> Adrian Hey wrote:
> >>I agree with you that at some level there has to be a unique
> >>resource (for that computer), but it's not something I'd keep
> >>in a global variable.
> >
> > How would you implement this "global variable". In C?
Adrian Hey wrote:
I agree with you that at some level there has to be a unique
resource (for that computer), but it's not something I'd keep
in a global variable.
How would you implement this "global variable". In C?
I said I would NOT keep it in a global variable. :)
Because I don't like them.
Actually I now think that not only are top level TWIs okay, I can
get extra contexts by rewriting the MVar module. Here I can
create a TWI in the new MVar module called context, and all
mvar writes and reads would be parameterised by context. In
this way I can change the context then call oneShot
Adrian wrote (snipped):
> But if top level MVars are all that's on offer I'd settle for that :-)
> I can still implement my "oneShot" examples just by passing the top
> level MVar as an argument to oneShot rather than having it create its
> own.
I am not sure which the oneShot examples are, but I s
On Wednesday 01 Dec 2004 12:07 pm, Lennart Augustsson wrote:
> Adrian Hey wrote:
> It's not a language issue. It's a design issue. And in the case
> of device drivers you do want to pass the buck up to the layer
> that handles device drivers. Having each driver keep it's own
> global state is ju
Adrian Hey wrote:
On Tuesday 30 Nov 2004 3:02 pm, Lennart Augustsson wrote:
I reiterate: not even device drivers written in C use TWIs.
(Well, at least not quality drivers. :))
A finite pool of N devices is still a unique resource.
Ultimately you have to contain the problem locally with a modular
On Tuesday 30 Nov 2004 3:02 pm, Lennart Augustsson wrote:
> I reiterate: not even device drivers written in C use TWIs.
> (Well, at least not quality drivers. :))
A finite pool of N devices is still a unique resource.
Ultimately you have to contain the problem locally with a modular
solution, or
--- Begin Message ---
Adrian Hey wrote:
Keean and Lennart are just hiding the problem in a hypothetical
"operating system" which is simply assumed to be correct (it just
doesn't do any of the dangerous things that might otherwise be done).
Well, if think I'm not reading your postings then I think
Adrian Hey wrote:
The issue is *modularity*. Without top level TWIs there are certain
safety guarantees that I cannot make from within my module. Instead
I have to "beg" for safe use from outside my module. Begging a
hypothetical "operating system" doesn't really help much.
And I am arguing that
On Tuesday 30 Nov 2004 12:53 pm, George Russell wrote:
> Adrian Hey wrote (snipped):
> > They are for use in situations where you need to represent
> > state associated with a genuinely unique resource (eg top level
> > stateful C library or hardware IO device).
>
> In my experience this is only
Adrian Hey wrote (snipped):
> I've been looking at your global variables library.
Thanks.
In particular, the purpose of top level <- bindings IMO is *not* to
provide "global variables" (though they could be abused this way).
If you consider the example..
userInit <- oneShot realInit
..the top leve
12 matches
Mail list logo