chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re : Re : Re : [Chicken-users] hacking the mailbox egg


From: Kon Lovett
Subject: Re: Re : Re : Re : [Chicken-users] hacking the mailbox egg
Date: Sun, 7 Jan 2007 18:21:25 -0800


<snip>
>
> If the above is true, what are the real primitives of chicken (that
> can thus be used without 'getting out' of the file) ?

I do not understand "... without 'getting out' of the file".
Well, I meant "without running code that re-enables interrupts". And
I guessed the "re-enabling" is done when executing code from
"somewhere else". But I don't see what is the "somewhere else".
I.e. I don't see what triggers the "re-enabling".

And you won't, unless you either disassemble or tell the compiler to keep the generated .c file(s). The declarations are file global & apply to every procedure - the compiler generates the interrupt stuff automatically. The compiler knows when a proc "calls out" & is "called in".

There is a manual wrapper, 'critical-section', but it is deprecated.

Mailbox is special. It could have been implemented using explicit synchronization but for such a high-performance & low computation facility it makes more sense to just treat every procedure as if, as you said, it were Java proc w/ synchronized.

There is an egg that provides syntactic-sugar for explicit synchronization, "synch.egg". It has a small user community & makes writing such code much easier.

<snip>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]