[PATCH v2 1/4] um: Add pthread-based helper support
Johannes Berg
johannes at sipsolutions.net
Tue Mar 18 06:06:20 PDT 2025
On Thu, 2025-03-06 at 23:07 +0800, Tiwei Bie wrote:
> Introduce a new set of utility functions that can be used to create
> pthread-based helpers. Helper threads created in this way will ensure
> thread safety for errno while sharing the same memory space.
Using pthreads seemed odd, but Benjamin argues that it's the only way to
get libc to really sort it all out, unless we never use libc syscall
functions, which is probably kind of unreasonable? Or maybe we could?
Either way though,
> +#include <pthread.h>
> + err = pthread_create(&td->handle, NULL, routine, arg);
if we're going to use pthread API, then we need to link against it?
johannes
More information about the linux-um
mailing list