D
Drew Lawson
[First, I agree with asking the next question in the threading group.]
That would depend on what error 11 is. On my system, errno.h says:
#define EDEADLK 11 /* Resource deadlock avoided */
/* 11 was EAGAIN */
So, 11 once was EAGAIN, which is a known return for pthread_create().
It may still be on your implementation. My system's man page says:
The pthread_create() function will fail if:
[EAGAIN] The system lacked the necessary resources to create
another thread, or the system-imposed limit on the
total number of threads in a process
[PTHREAD_THREADS_MAX] would be exceeded.
My next guess is that your system won't allow a user process to run
24 (additional) threads. But most of what I can say about pthreads
is guesses. The experts in comp.programming.threads know this stuff
inside and out.
i have a code that uses pthread, but when i use pthread_create()
method it returns error code 11.
That would depend on what error 11 is. On my system, errno.h says:
#define EDEADLK 11 /* Resource deadlock avoided */
/* 11 was EAGAIN */
So, 11 once was EAGAIN, which is a known return for pthread_create().
It may still be on your implementation. My system's man page says:
The pthread_create() function will fail if:
[EAGAIN] The system lacked the necessary resources to create
another thread, or the system-imposed limit on the
total number of threads in a process
[PTHREAD_THREADS_MAX] would be exceeded.
I have found out that this is often
because of exceeding the THREAD_MAX limit for the process. But i want
to use only about 24 threads at a given time, and i destroy the
threads (or atleast i thought so) can someone tell me what i am doing
wrong here it would be of great help! thanks!
My next guess is that your system won't allow a user process to run
24 (additional) threads. But most of what I can say about pthreads
is guesses. The experts in comp.programming.threads know this stuff
inside and out.