error running p_threads
- From: "Ivar" <ravi.sathyam@xxxxxxxxx>
- Date: 19 Nov 2006 15:29:45 -0800
Hi,
So basically in my application I have a a main function that does
this...
//Global variables
pthread_t thread_id;
void* threadtest(void * arg) {
while(1) {
printf("Reached this segment\n");
}
return NULL;
}
int main(int argc, char** argv) {
....
printf("We've reached here!\n");
//Line 500
pthread_create(&thread_id,NULL,threadtest,NULL); //Line 501
....
}
So basically, when I run this code, I dont have my "Reached this
segment" line print out to console (so basically I feel the thread is
not being entered). But when I run in gdb, put a break point at line
500 in main (as shown below) and continue stepping, I reach the thread
code and get no errors....What could be the reason that I see no thread
output?? Is it even getting there? Sorry for my english...I can explain
anything more in detail if necessary...
-Ravi
.
- Follow-Ups:
- Re: error running p_threads
- From: coconut1986@xxxxxxxxx
- Re: error running p_threads
- From: Ivar
- Re: error running p_threads
- Prev by Date: Re: Please Help ----------Free Downloadable Ebooks for C & C++ Language needed
- Next by Date: Re: Overview
- Previous by thread: HOW CAN WE GET THE ADMINISTRATOR PASSWORD?
- Next by thread: Re: error running p_threads
- Index(es):
Relevant Pages
|
|