pthread-1.0b4 library from /usr/free

Is anyone using this library sucessfully under QNX425 and Watcom10.6 ?

I’ve tried the examples and exit() does not seams to work since the parent
thread never exits.
Also the cancel2 example hangs the system?

Any idea?

Thanks in advance for any input,

  • Cesar.

Hi Cesar

I have worked with threads under QNX 4. There are severa problems with it.
The biggest for me was that ‘errno’ is not thread safe.

In our application, whose design predated me and which I thought was very
poor, we used threads to do a lot of IO. When an error was encountered we
would check errno to see the cause of the error. But often, when one error
would occur several would occur on several threads. It was impossible to
determine why “this thread” encountered an error.

If you must develop an application with threads then you will definitely
want to use Neutrino/RTP.

Bill Caroselli


“Cesar Hernandez” <chernandez@vds.ca> wrote in message
news:9n5r1r$dtd$1@inn.qnx.com

Is anyone using this library sucessfully under QNX425 and Watcom10.6 ?

I’ve tried the examples and exit() does not seams to work since the parent
thread never exits.
Also the cancel2 example hangs the system?

Any idea?

Thanks in advance for any input,

  • Cesar.

Thanks for your input,

You probably used the _beginthread()/_endthread() implementation because so
far the pthread library seams to be bogus.

I’m porting a big multithreaded application so I’m now evaluating the work
involved to make it a single threaded process instead.

-Cesar.

“Bill Caroselli (Q-TPS)” <qtps@earthlink.net> wrote in message
news:9n8690$s04$1@inn.qnx.com

Hi Cesar

I have worked with threads under QNX 4. There are severa problems with
it.
The biggest for me was that ‘errno’ is not thread safe.

In our application, whose design predated me and which I thought was very
poor, we used threads to do a lot of IO. When an error was encountered we
would check errno to see the cause of the error. But often, when one
error
would occur several would occur on several threads. It was impossible to
determine why “this thread” encountered an error.

If you must develop an application with threads then you will definitely
want to use Neutrino/RTP.

Bill Caroselli


“Cesar Hernandez” <> chernandez@vds.ca> > wrote in message
news:9n5r1r$dtd$> 1@inn.qnx.com> …
Is anyone using this library sucessfully under QNX425 and Watcom10.6 ?

I’ve tried the examples and exit() does not seams to work since the
parent
thread never exits.
Also the cancel2 example hangs the system?

Any idea?

Thanks in advance for any input,

  • Cesar.
    \

Cesar Hernandez <chernandez@vds.ca> wrote:

Thanks for your input,

You probably used the _beginthread()/_endthread() implementation because so
far the pthread library seams to be bogus.

I’m porting a big multithreaded application so I’m now evaluating the work
involved to make it a single threaded process instead.

It is worth looking at either a single-threaded process, or a group
of cooperating processes, possibly sharing a moderate-sized shared
memory area.

-David

QNX Training Services
dagibbs@qnx.com