Re: [OT] error running p_threads



coconut1986@xxxxxxxxx wrote:

Please don't top post.

On 11月20日, 上午7时29分, "Ivar" <ravi.sath...@xxxxxxxxx> wrote:

}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...

I guess the problem is that sub-thread end with the main thread ends,
maybe you can add one line in the main function:

int main(int argc, char** argv) {
printf("We've reached here!\n");


pthread_create(&thread_id,NULL,threadtest,NULL);
while(1);
}

While the cause is correctly identified, the off topic advice is unwise.

Look up pthread_join() to replace the while.

This question should have been posted to comp.programming.threads.

--
Ian Collins.
.



Relevant Pages

  • Re: Some new clues!
    ... > Console Applications would run? ... > I really dont know what's wrong. ... >> allso importet the pnq file and got 32 hardware devices added. ... >>> It has been known that video driver problems affected GUI application appearience and some system components. ...
    (microsoft.public.windowsxp.embedded)
  • Re: What micros do you actually hate to work with?
    ... and I have shown you that it IS possible.Indded i dont, you didnt post them but the comparison is self evident. ... in C and that it fits in 1 kB ... 13 bytes in segment ABSOLUTE ...
    (comp.arch.embedded)
  • Re: error with pthreads
    ... segment" line print out to console (so basically I feel the thread is ... But when I run in gdb, put a break point at line ... that the main thread does not get out of the while loop, or exit, ...
    (comp.programming.threads)
  • Re: In IE ok - but not in Opera and Firefox
    ... It works in IE but not with any other browser. ... dont see the point. ... Console in Firefox it will tell you the ... As the amount of users refusing to read any manuals out of principles ...
    (comp.lang.javascript)
  • Re: I am confused - just what is it?
    ... Was this a real computer to replace the TI 99/4A or was ... showing it to a user group meeting in San Diego. ... it again and still dont know exactly what it was. ... it replaced the TI console. ...
    (comp.sys.ti)