diff options
| author | Tiwei Bie <tiwei.btw@antgroup.com> | 2025-03-19 21:55:20 +0800 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2025-03-20 09:26:38 +0100 |
| commit | 4f087eafdcef24b7160b097ddb9704084767b77a (patch) | |
| tree | 4f7040055e550c02397f307d6fd7e075828b17f1 /arch/um/include/shared/os.h | |
| parent | 16a0ca5e4e79ca52fb1c4a9194dc6bdadacae4fb (diff) | |
um: Add pthread-based helper support
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.
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20250319135523.97050-2-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'arch/um/include/shared/os.h')
| -rw-r--r-- | arch/um/include/shared/os.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h index bc02767f0639..d0ae42911cb5 100644 --- a/arch/um/include/shared/os.h +++ b/arch/um/include/shared/os.h @@ -224,6 +224,11 @@ extern int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, unsigned long *stack_out); extern int helper_wait(int pid); +struct os_helper_thread; +int os_run_helper_thread(struct os_helper_thread **td_out, + void *(*routine)(void *), void *arg); +void os_kill_helper_thread(struct os_helper_thread *td); +void os_fix_helper_thread_signals(void); /* umid.c */ extern int umid_file_name(char *name, char *buf, int len); |