Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #21409

Re: Difficulty with Brad Rodriguez' screenful

From Andrew Haley <andrew29@littlepinkcloud.invalid>
Subject Re: Difficulty with Brad Rodriguez' screenful
Newsgroups comp.lang.forth
References (6 earlier) <2013Apr3.135744@mips.complang.tuwien.ac.at> <4-ednRv0asts1MHMnZ2dnUVZ_sadnZ2d@supernews.com> <2013Apr3.184544@mips.complang.tuwien.ac.at> <L56dndFVlLOnEMHMnZ2dnUVZ_rWdnZ2d@supernews.com> <2013Apr4.172925@mips.complang.tuwien.ac.at>
Message-ID <bqqdnTyoQe7gRsPMnZ2dnUVZ_t6dnZ2d@supernews.com> (permalink)
Date 2013-04-05 09:11 -0500

Show all headers | View raw


Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
> Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>>> And if you want to patch the threaded code, you need to ensure that
>>> there is always a pointer to the next instruction available, which
>>> also has a cost, and I actually don't know how to do it.
>>
>>I don't understand what you mean.
> 
> I thought you were talking about patching the next instruction.
> However, just redirecting the instriction pointer to the throw code is
> probably enough, if you can do that from the signal handler.  Two
> disadvantages:
> 
> 1) In Gforth we cannot do that without extra costs: ip is in a local
> variable of the engine, and there is no portable way to access that.

Mmm, yes.  This is the sort of restriction that I mean when talking
about the limitations of a Forth coded in C.

> 2) We would lose the information about in which primitive the signal
> occured; ok, for asynchronous signals that's usually not so important,
> but still.
> 
>>  It all depends on what the asychronous interrupt means:
>>the interrupt is not semantically related to the computation in
>>progress, so how can a programmer determine what should be done?
> 
> For the usual use, i.e., cleanup, that's easy: clean up!

That's easy if all you're doing is cleaning up local state.  If you're
cleaning up shared state, you're going to have to do it in a way that
allows everyone else currently accessing that shared state to
continue.  This is *not* easy.  (Unless you use transactional memory,
and then it's trivial because the engine does all the cleanup.
There's a lot to be said for it.)

Andrew.

Back to comp.lang.forth | Previous | NextPrevious in thread | Find similar


Thread

Re: Difficulty with Brad Rodriguez' screenful Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-20 10:25 -0500
  Re: Difficulty with Brad Rodriguez' screenful Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-20 18:08 +0100
    Re: Difficulty with Brad Rodriguez' screenful Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-20 13:04 -0500
      Re: Difficulty with Brad Rodriguez' screenful Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-20 20:12 +0100
        Re: Difficulty with Brad Rodriguez' screenful Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-21 04:39 -0500
    Re: Difficulty with Brad Rodriguez' screenful albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-20 19:22 +0000
  Re: Difficulty with Brad Rodriguez' screenful anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-30 17:35 +0000
    Re: Difficulty with Brad Rodriguez' screenful Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-31 08:51 -0500
      Re: Difficulty with Brad Rodriguez' screenful anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-04-02 15:50 +0000
        Re: Difficulty with Brad Rodriguez' screenful Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-04-02 16:16 -0500
          Re: Difficulty with Brad Rodriguez' screenful anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-04-03 11:57 +0000
            Re: Difficulty with Brad Rodriguez' screenful Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-04-03 10:25 -0500
              Re: Difficulty with Brad Rodriguez' screenful anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-04-03 16:45 +0000
                Re: Difficulty with Brad Rodriguez' screenful Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-04-03 15:12 -0500
                Re: Difficulty with Brad Rodriguez' screenful anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-04-04 15:29 +0000
                Re: Difficulty with Brad Rodriguez' screenful Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-04-05 09:11 -0500

csiph-web