diff options
author | Florian Weimer <fweimer@redhat.com> | 2020-05-19 12:32:39 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2020-05-20 20:28:44 +0200 |
commit | 331c6e8a184167dd21a9f0b3fc165aeefea6eeca (patch) | |
tree | 76c20764a829cbb26017adb371e0160ffa2c7afd /nptl/pthreadP.h | |
parent | 3699ef99de0d69284cdd28c3cc5e1aa89e398443 (diff) | |
download | glibc-331c6e8a184167dd21a9f0b3fc165aeefea6eeca.tar glibc-331c6e8a184167dd21a9f0b3fc165aeefea6eeca.tar.gz glibc-331c6e8a184167dd21a9f0b3fc165aeefea6eeca.tar.bz2 glibc-331c6e8a184167dd21a9f0b3fc165aeefea6eeca.zip |
nptl: Add __pthread_attr_copy for copying pthread_attr_t objects
Also add the private type union pthread_attr_transparent, to reduce
the amount of casting that is required.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'nptl/pthreadP.h')
-rw-r--r-- | nptl/pthreadP.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index f218b01574..41b693d034 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -580,6 +580,12 @@ extern void __wait_lookup_done (void) attribute_hidden; # define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " #name); #endif +/* Make a deep copy of the attribute *SOURCE in *TARGET. *TARGET is + not assumed to have been initialized. Returns 0 on success, or a + positive error code otherwise. */ +int __pthread_attr_copy (pthread_attr_t *target, const pthread_attr_t *source); +libc_hidden_proto (__pthread_attr_copy) + /* Returns 0 if POL is a valid scheduling policy. */ static inline int check_sched_policy_attr (int pol) |