[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] VS: Strange behaviour with pthreads in PetaLinux 0.3
Hi!
I'm trying to get an application up and running on a Xilinx
Spartan3E-500 Starter Kit RevD with PetaLinux 0.30-rc1 (using EDK 9.2
with a split Linux/Windows development setup). The OS itself is running
fine, and I have access to it both from Kermit and telnet, and I can
access the demo-webpage.
My application consists of two functions, main() and clientThread().
Main() listens on a specific port, and creates a new thread using
pthread_create() whenever an incoming connection is made.
pthread_create() calls the clientThread() function, which operates on
the newly established connection. Rather standard stuff, and it all
works fine on my Slackware installation (2.6.21.5-smp on a standard PC).
However, on PetaLinux it seems as if the call to pthread_create()
instead of starting clientThread(), simply starts main()?!
The functions are declared as:
Int main();
Void* clientThread(void* threadIndex);
My thread control blocks:
Pthread_t *clientThreads[MAX_CONNECTIONS]; (Initialized using a loop and
'new' early on in the application)
The call to pthread_create() is:
Pthread_create(clientThreads[currentThreadIndex], NULL, clientThread,
(void*) currentThreadIndex);
I'm hoping this is just a simple mistake on my part, and if anyone has a
solution, or at least an idea of what could be wrong, I'd be very happy
to hear it. Thank you in advance!
Simon Falsig
sifa@xxxxxxxxxxx
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/