Function lock and octave call stack (Was: seg-fault for default branch on Mac OSX?)
John W. Eaton
jwe at bevo.che.wisc.edu
Wed Sep 3 10:38:54 CDT 2008
On 3-Sep-2008, Michael Goffioul wrote:
| On Tue, Sep 2, 2008 at 9:16 PM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
| > The idea was that mlock would only be used inside Fmlock, so we should
| > get the caller (i.e., the .m file that called Fmlock), not the current
| > function (Fmlock).
|
| This makes sense.
|
| > Maybe we should define a separate internal function (or allow an
| > argument to the current mlock function) to allow locking the current
| > function on the call stack.
|
| It's as easy as octave_call_stack::top()->lock(). But I was confused
| by the mlock() function presence. If this function is only intended
| to be used from Fmlock, then maybe its code should be inlined
| directly in Fmlock. Then you could redefine the C++ mlock to lock
| the function on the top of the stack. This seems more natural to me.
OK, how about the following change? I see that mlock is also used in
mexLock, but I think incorrectly, since it seems it should be locking
the current mex function, not the calling function.
Thanks,
jwe
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
Url: https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080903/2d87f9cc/attachment-0001.ksh
More information about the Octave-maintainers
mailing list