LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Return value of pthread_create (https://www.linuxquestions.org/questions/programming-9/return-value-of-pthread_create-428994/)

Kosal 03-27-2006 10:10 AM

Return value of pthread_create
 
I have read that pthread_create function returns EAGAIN on error.
But I am getting an return value of 1 for which the corresponding error from /usr/include/asm/errno is EPERM.


May I know what exactly is happening.
Thanks.

Mara 03-27-2006 03:45 PM

pthread_create may return EAGAIN. It's one of the possible errors. The list is: EAGAIN, EINVAL and EPERM.

EPERM is 1 also in my system, so that's the error you get. The manual says
Quote:

EPERM
The caller does not have appropriate permission to set the required scheduling parameters or scheduling policy.
So how do you try to call the function? Check the arguments. If you still can't find it, post the code.


All times are GMT -5. The time now is 02:31 AM.