[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with mlock in current hg
From: |
Jaroslav Hajek |
Subject: |
Re: problem with mlock in current hg |
Date: |
Sat, 7 Jun 2008 10:36:08 +0200 |
On Fri, Jun 6, 2008 at 9:56 PM, Shai Ayal <address@hidden> wrote:
> On Fri, Jun 6, 2008 at 6:37 PM, John W. Eaton <address@hidden> 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