Error Return Code From Pthread_create Is 11
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about
Pthread Return Code 11
Stack Overflow the company Business Learn more about hiring developers or posting ads with linux pthread_create resource temporarily unavailable us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is
Pthread Create Detached Thread
a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Return code from pthread_create() is 11 up vote 2 down vote favorite 2 I pthread create and join am trying to run a simple multi threaded programming and i am getting this error from gcc return code from pthread_create() is 11 how do i solve this issue ? #include returns error code 11. 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 create pthread in c example tell me what i am doing wrong here it would be of great help! thanks! for (i=0; i i void *(*start_routine)(void*), void *arg); DESCRIPTION The pthread_create() function is used to create a new thread, with attributes specified by attr, within a process. If attr is NULL, the default attributes are used. http://pubs.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html If the attributes specified by attr are modified later, the thread's attributes are not affected. Upon successful completion, pthread_create() stores the ID of the created thread in the location referenced by thread. The thread is created executing start_routine with arg as its sole argument. If the start_routine returns, the effect is as if there was an implicit call pthread create to pthread_exit() using the return value of start_routine as the exit status. Note that the thread in which main() was originally invoked differs from this. When it returns from main(), the effect is as if there was an implicit call to exit() using the return value of main() as the exit status. The signal state of the new thread error return code is initialised as follows: The signal mask is inherited from the creating thread. The set of signals pending for the new thread is empty. If pthread_create() fails, no new thread is created and the contents of the location referenced by thread are undefined. RETURN VALUE If successful, the pthread_create() function returns zero. Otherwise, an error number is returned to indicate the error. ERRORS 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. [EINVAL] The value specified by attr is invalid. [EPERM] The caller does not have appropriate permission to set the required scheduling parameters or scheduling policy. The pthread_create() function will not return an error code of [EINTR]. EXAMPLES None. APPLICATION USAGE None. FUTURE DIRECTIONS None. SEE ALSO pthread_exit(), pthread_join(), fork(), C++ Pthread Create
Pthread Lock