On Mon, Jun 21, 1999 at 06:58:38AM -0700, Joe wrote:
> > >
> > > I am looking for documentation on how to implement threads
> > with C++. My
> > > problem is that I call a function from a class via
> > pthread_create and
> > > pass a (void *)-pointer with parameters. But this pointer
> > points
> > > anywhere, but not to the structure I want...
> >
> > would this pointer happen to be relative to a class/struct ?
> >
> > Threads only understand C-style pointers (i.e. no 'this'
> > pointer).
> > you need to provide C-style interface functions, or pass a
> > struct
> > containing the 'this' and any other pointers you need to the
> > thread
> > startup func.
> >
> hmm ...have you searched the pthreads site to see if there
> are some 'pointers' (no pun intended) to some C++ wrapper
> funtions? It is possible that someone has started work on a C++
> interface to the pthreads library, just like there are C++
> wrappers to GTK+ (gtk--). ????
>
> ->http://www.mit.edu:8001/people/proven/pthreads.html
>
> have you tried emailing someone listed on the pthreads web
> site to see if they can give you some more info on this?
Ever tried QpThread package from "ftp://ftp.cri.cz/pub/qpthread/".
It's a nice small and easy-to-use C++ wrapper for threads.
Hope that helps,
Chris
--
Christopher | Snail: Lehrstuhl fuer Mustererkennung (Informatik 5)
Drexler | Universitaet Erlangen-Nuernberg
| Martensstr. 3, 91058 Erlangen, Germany
| WWW : http://www5.informatik.uni-erlangen.de/Persons/dr
| Phone: +49 9131 85-27874 Fax : +49 9131 303811
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]