octave-maintainers
[Top][All Lists]
Advanced

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

Re: user type segfault


From: Paul Kienzle
Subject: Re: user type segfault
Date: Wed, 12 Feb 2003 19:25:13 -0500
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021212

David Bateman wrote:

Just one wish, is it possible to fool the register_type() call into
doing the locking? If it is then no other changes are needed in other
source files to fix this for all existing loadable types. Other each
loadable type with need to be modified to perform the locking.

Not really, or at least not nicely.

I'm guessing that the register_type call is used by the builtin types as well, so we
will need macros in defun-dld.h to override it.  E.g.,
   inline void nop(void) {}
   #define register_type register_type(), mlock(__DLDNAME__),nop
Then
   mytype::register_type()
becomes
  mytype::register_type(),mlock(__DLDNAME__),nop()
Problem 1: register_type is a circular definition.  Is that allowed?
Problem 2: how do we define __DLDNAME__?
__DLDNAME__ can't be a C++ constant because it must exist in
the global scope.  Multiple DEFUN_DLD's in the same file would
collide.  I don't know how to define a macro within a macro.

Paul Kienzle
address@hidden



reply via email to

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