View topic - pthreads for QNX 4

pthreads for QNX 4

For the old QNX2 and QNX4 RTOS

pthreads for QNX 4

Postby sweetrommie » Tue Jul 08, 2008 1:59 pm

I need to create driver for MOXA 1150I usb to serial adapter for QNX 4.25
I got USB ddk from www.qnx.com and written a simple usb detecting driver (logs on insertion an removal functions)
but during the compilation (linking) i got an error
Code: Select all
cc try.o -o try -l usbdi
/usr/watcom/10.6/bin/wlink op quiet form qnx flat na try op priv=3 op c libp /us
r/watcom/10.6/usr/lib:/usr/lib:. f try.o l /usr/lib/usbdi.lib op offset=40k op s
t=32k
Warning(1028): _pthread_create_ is an undefined reference
file /usr/lib/usbdi.lib(/cvs/qnx4/drivers/devu/usbdi/thread.c): undefined symbol
 _pthread_create_
 cc: /usr/watcom/10.6/bin/wlink exited 1
 make: *** [try] Error 1

seems i need pthread library
I learn that there is a beta pthread lib for QNX 425
Where to obtain it?
Or maybe there is other usb DDK which is not using pthreads?
sweetrommie
New Member
 
Posts: 4
Joined: Mon Jul 07, 2008 9:06 am

RE: pthreads for QNX 4

Postby maschoen » Tue Jul 08, 2008 2:45 pm

Are you using the QNX 6 USB ddk under QNX 4? That's what it sounds like. There was a hacked together type of threads created for QNX 4. I'm 99% sure that it didn't use pthread_create(). It doesn't really create threads at all, but instead processes that share the data segment.
maschoen
QNX Master
 
Posts: 2712
Joined: Wed Jun 25, 2003 5:18 pm

RE: pthreads for QNX 4

Postby sweetrommie » Tue Jul 08, 2008 2:59 pm

i have just found pthreads beta on
ftp://ftp.qnx.com/usr/free/qnx4/os/libs/

usb ddk i got from www.qnx.com described as
"QNX4 USB 1.0 Host Controller and class driver support
QNX USB DDK QNX 4.25
QNX4 Driver Development Kit for USB"

the threads you mean are like _begin_thread _end_thread?

i will check with beta pthreads tomorow as soon as i get to my qnx machine at work
sweetrommie
New Member
 
Posts: 4
Joined: Mon Jul 07, 2008 9:06 am

RE: pthreads for QNX 4

Postby mario » Tue Jul 08, 2008 5:56 pm

The beta pthread stuff has pthread_create but that beta library comes with some caveat and I'm surprise that the USB DDK uses it.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Postby sweetrommie » Wed Jul 09, 2008 12:04 pm

hmm... usb ddk is also beta, I got it from
www.qnx.com -> downloads -> Prerelease Software -> QNX 4 Beta Software -> QNX4 USB 1.0 Host Controller and class driver support -> QNX USB DDK QNX 4.25
But you are right, it is not using pthreads as I thought it does.
Linkig with pthread_g3.lin (beta i got) stays with the same _pthread_create_ error.

Tests in pthreads-1.0b4 are compiling but the programs don't end. I think something with pthread_join.
Makefile modified not to linking pthread_g3s.lib, gives an error of "Warning(1028): pthread_create is an undefined reference", which seems to be different object than _pthread_create_.

There is iomgr.lib in USBDDK i got. I added it to my linking libs and it's now compiling well, without pthreads.
Also need to add -T0 option, or there would be segmantation error during run.
cc try.o -o try -T0 -liomgr -lusbdi

The program is connecting to devu-uhci host and recognizing insertion of usb device.
I'll use a moue example included in DDK to avoid further problems.

Thanks for your attention.
sweetrommie
New Member
 
Posts: 4
Joined: Mon Jul 07, 2008 9:06 am


Return to QNX2 and QNX4

Who is online

Users browsing this forum: No registered users and 2 guests