mirror of
https://github.com/fluencelabs/musl
synced 2025-06-05 19:11:34 +00:00
The architecture-specific assembly versions of clone did not set errno on failure, which is inconsistent with glibc. __clone still returns the error via its return value, and clone is now a wrapper that sets errno as needed. The public clone has also been moved to src/linux, as it's not directly related to the pthreads API. __clone is called by pthread_create, which does not report errors via errno. Though not strictly necessary, it's nice to avoid clobbering errno here.
8 lines
140 B
C
8 lines
140 B
C
#include <errno.h>
|
|
#include "pthread_impl.h"
|
|
|
|
int __clone(int (*func)(void *), void *stack, int flags, void *arg, ...)
|
|
{
|
|
return -ENOSYS;
|
|
}
|