This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cyg_thread_create()


Hi!

   I'd wanted to call cyg_thread_create() funcion passing to it
a function member (that is, a method) of a determined class
object, as the 2nd argument. For instance, something like this:

(class declaration)

class myclass {
public:
   int i;
   int func();
}

(object declaration)
myclass myobject;

(... and this is what I want to do:)
cyg_thread_create(..., myobject.func,...)

BUT I FOUND A COMPILING TIME ERROR, because
it seems that cyg_thread_create() necessarily asks a function
pointer, instead of a function member pointer.

I have tried also making and explicit conversion but it doesn't
functions, I'm not very sure, but it seems it's not posible to convert
a method pointer to a function pointer, at least with the compiler
I'm using (g++ 2.95.2).

  So it seems that all the process functionalities must be defined as
functions in eCos. Is this true or there is another alternative?
 Can't be this solved somehow?

(I'm new in the forum, so I don't now if this is
a trivial question or is simply a C++ question,
 (sorry in advance in that case)), anyway
you can tell me about.

--
---------------------------------------------
Fernando Herrera Casanueva
fherrera@teisa.unican.es
Phone +34 942 20 08 78

    University of Cantabria.
  Av. Castros sn. E.T.S.I.I.T.
       TEISA Department
       Santander  39009
---------------------------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]