octave-maintainers
[Top][All Lists]
Advanced

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

Re: Function lock and octave call stack (Was: seg-fault for default bran


From: Michael Goffioul
Subject: Re: Function lock and octave call stack (Was: seg-fault for default branch on Mac OSX?)
Date: Wed, 3 Sep 2008 09:14:23 +0200

On Tue, Sep 2, 2008 at 9:16 PM, John W. Eaton <address@hidden> 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.


reply via email to

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