Forwarding to list as the reply was sent direct to me....
Regards
Phil Q
--- Begin Message ---
Hi,
I just called pthread_join and it works now.
Thanks a lot.
On Mon, Dec 29, 2008 at 5:04 PM, Phil Quiney <[email protected]>wrote:
> Hi,
>
> Can you post the source code for threadtest.c.
>
> Just because it appears to work on one platform does not mean that it is
> 'correct'. My guess is that on the host when you call 'pthread_create' the
> function that is being spawned as the thread is immediately called so gives
> the appearance of working. From memory it does not always work like this -
> the calling process can continue to run after 'pthread_create' returns and
> if it immediately exits it will kill the thread, thus the thread will appear
> not to be called.
>
> So after creating the thread, your calling program should either sleep for
> a while or call 'pthread_join' to let the spawned thread run.
>
> Regards
>
> Phil Q
>
> kirthika varadarajan wrote:
>
> I am working with application development in DM6467.
>> I have a query regarding creating thread using pthread_create.
>> I created the thread using pthread_create and compiled
>> arm_v5t_le-gcc threadtest.c -o threadtest -lpthread.
>> But the function defined in pthread_create is not at all called.
>> There is no error in compilation.
>> The same thread code works well in linux host PC but not in DM6467.
>> Any libraries i have to link...
>> i checked the required libraries for pthread in target device.
>> But the thread function is not all called.
>> Suggest me
>> Regards
>> Kirthika
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Davinci-linux-open-source mailing list
>> [email protected]
>> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>>
>>
>
>
--- End Message ---
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source