[DGD]LPC- and Kernel-library questions

E. Harte harte at xs4all.nl
Wed May 17 16:05:22 CEST 2000


On Wed, 17 May 2000 birgit.schulte at philips.com wrote:

> 
> Hiyas,
> 
> two things which riddle my brain and I failed to figure out so far:
> 
<...thread local storage...>
> Now, could anyone explain what exactly happens here? What is it good for to
> allocate some memory assigned to the variable what?
> Or rather more to the point: what does this concept of thread local
> storage stand for? 

The kernel-lib is preparing itself for being able to do things in a
multi-threaded fashion without having the threads interfere with eachother
too much.

The thread-local-storage provides a way of storing temporary data (like
the 'current player' or the 'current command' that are in use) in a known
place without needing a central object for this (like the 'global' object
in the 2.4.5 emulation) that would cause parallel threads to be aborted
and retried b/c they'd both be trying to modify data in the same object.

> Next one is probably just my lack of knowledge:
> The kfun catch is documented as to take two statements (a,b) and to
> evaluate them.
> In the auto object of the kernel lib in function compile_object there is
> a part:
> catch { some statements} : { some more statements }
> 
> Is this a C-construct which I failed to find, or is it LPC-specific?

It's LPC-specific but quite likely (Dworkin?) inspired by the catch +
throw combination that exists in other language.

In the following situation:

  catch {
    <A>
  } : {
    <B>
  }

The statement(s) <A> will be executed until an error occurs.  If this
happens, execution will continue with <B>.  If no error occurs, <B> is
ignored entirely.

> Thanx in advance for possible enlightenment,

Hope this helped,

Erwin.
-- 
Erwin Harte  -  Forever September, 2451 and counting  -  harte at xs4all.nl


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list