1834045 Members
2359 Online
110063 Solutions
New Discussion

Re: pthread_create

 
Murali_12
Occasional Contributor

pthread_create

On HP-UX 11.0, I am using the pthread_create system call to create new threads on our application. But the pthread_create function returns the thread id in negative ( for example -1342).Any one can shed some light on this as why the thread ids are in negative?

Thanks,
Murali
2 REPLIES 2
aparna challagulla
Valued Contributor

Re: pthread_create

hi murali,

does the pthread_create return any error value or does it exit with a return value of 0. look into pthread_attr_init() to see if u are missing something.

HTH
aparna
If you don't have time to do it right you must have time to do it over
Zeev Schultz
Honored Contributor

Re: pthread_create

Set a watchpoint with debugger and check how pthread_create return value changes.man pthread_create for error return values (not negative).

How to set watchpoints with GDB for example:
http://www.gnu.org/manual/gdb-5.1.1/html_node/gdb_29.html
So computers don't think yet. At least not chess computers. - Seymour Cray