[M3devel] SaveRegsInStack / awkward SignalHandler, etc.
Jay K
jay.krell at cornell.edu
Thu Nov 26 20:11:35 CET 2009
Tony I agree my code was "awkward" (what I'd really like is for cm3 to output .h files
so that interop can be "natural", reliable, clear, idiomatic, correct.. but until then..)
(And if such .h files were output, I'd just write the entire signal handler in C.)
However I found the meaning and correctness of my code clearer.
In particular I was getting the registers into the stack keeping
the stack below their location.
In your case, you know, sem_post/sigsuspend will overwrite part of that.
Now, I grant, it isn't all clear -- your code has a high chance of being correct.
The (current) registers probably are already higher up the signal call stack.
So the stack pointer for the signal handler itself probably suffices -- what
you were using prior to yesterday.
"Briefly: I like the way I had it." (except, again, yes the C <=> Modula-3 interop is "awkard").
?
- Jay
> Date: Thu, 26 Nov 2009 19:44:24 +0000
> To: m3commit at elegosoft.com
> From: hosking at elego.de
> Subject: [M3commit] CVS Update: cm3
>
> CVSROOT: /usr/cvs
> Changes by: hosking at birch. 09/11/26 19:44:24
>
> Modified files:
> cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThread.i3
> ThreadPThread.m3
> ThreadPThreadC.c
>
> Log message:
> Refactor slightly to avoid need for awkward SignalHandlerC call.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20091126/999e9031/attachment-0001.html>
More information about the M3devel
mailing list