LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-08-2008, 02:01 PM   #1
alenD
Member
 
Registered: Jul 2005
Posts: 69

Rep: Reputation: 15
pthread_create hangs


Hello,

while debugging a multithreaded program i noticed that sometimes! pthread_create() just stops responding - does not return error code, nothing.
what would be the ways to proceed? any ideas what could be possible reasons? The system is newly installed Fedora9

thnx
 
Old 08-08-2008, 03:29 PM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Please post the relevant code.
ta0kira
 
Old 08-11-2008, 10:41 AM   #3
alenD
Member
 
Registered: Jul 2005
Posts: 69

Original Poster
Rep: Reputation: 15
if (pthread_create(&qmediaplayer_thread, NULL, (void*)&player1_task, NULL)!=0){
return -1;
}

fprintf(stderr,"Player1 thread starts \n");
ind = pthread_create(&qmp_read_thread, NULL,(void *)&player2_task , NULL);


fprintf(stderr,"Player2 thread starts %d\n",ind);

the second pthread_create functions hangs, i.e. second fprintf is not executed...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pthread_create in C++ environment lucky6969b Programming 1 12-13-2005 12:38 AM
pthread_create... os2 Programming 4 05-26-2005 03:09 PM
pthread_create problem live_dont_exist Programming 5 04-24-2005 06:21 AM
Pthread_create rahul_kulkarni Programming 4 02-10-2005 11:48 AM
pthread_create tushar123 Programming 2 06-07-2004 08:15 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration