problem with mlock in current hg
Jaroslav Hajek
highegg at gmail.com
Sat Jun 7 03:36:08 CDT 2008
On Fri, Jun 6, 2008 at 9:56 PM, Shai Ayal <shaiay at gmail.com> wrote:
> On Fri, Jun 6, 2008 at 6:37 PM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
>> On 6-Jun-2008, Shai Ayal wrote:
>>
>> | using the current dev version, I cannot mlock a function. when I try I
>> | get the mlock usage text.
>> |
>> | Shai
>> |
>> |
>> | octave:1> function f(a); b=a;endfunction;
>> | octave:2> mlock("f")
>> |
>> | Invalid call to mlock. Correct usage is:
>> |
>> | -- Built-in Function: mlock (NAME)
>>
>> Since mlock can only work from within a function, to lock the
>> currently executing function.
>
> So how do I use it within a DLD function?
>
> Shai
>
I think you can simply use
octave_function *fcn = octave_call_stack::current ();
if (fcn) fcn->lock ();
this will lock the DLD provided that it was called by Octave's call
mechanism and thus has the associated octave_function object
(otherwise there's probably nothing to lock)
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Octave-maintainers
mailing list