pthread_create need not set errno
authorRich Felker <dalias@aerifal.cx>
Sun, 3 Apr 2011 20:15:15 +0000 (16:15 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 3 Apr 2011 20:15:15 +0000 (16:15 -0400)
src/thread/pthread_create.c

index cdf36ff..284b45a 100644 (file)
@@ -195,7 +195,7 @@ int pthread_create(pthread_t *res, const pthread_attr_t *attr, void *(*entry)(vo
        unsigned char *map, *stack, *tsd;
        static const pthread_attr_t default_attr;
 
-       if (!self) return errno = ENOSYS;
+       if (!self) return ENOSYS;
        if (!init && ++init) init_threads();
 
        if (!attr) attr = &default_attr;