Function lock and octave call stack (Was: seg-fault for default branch on Mac OSX?)

Michael Goffioul michael.goffioul at gmail.com
Wed Sep 3 02:14:23 CDT 2008


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.

Michael.


More information about the Octave-maintainers mailing list