mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
nptl: Make pthread_attr_t dynamically extensible
This introduces the function __pthread_attr_extension to allocate the extension space, which is freed by pthread_attr_destroy. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
@@ -36,9 +36,10 @@ struct pthread_attr
|
||||
/* Stack handling. */
|
||||
void *stackaddr;
|
||||
size_t stacksize;
|
||||
/* Affinity map. */
|
||||
cpu_set_t *cpuset;
|
||||
size_t cpusetsize;
|
||||
|
||||
/* Allocated via a call to __pthread_attr_extension once needed. */
|
||||
struct pthread_attr_extension *extension;
|
||||
void *unused;
|
||||
};
|
||||
|
||||
#define ATTR_FLAG_DETACHSTATE 0x0001
|
||||
@@ -57,6 +58,15 @@ union pthread_attr_transparent
|
||||
struct pthread_attr internal;
|
||||
};
|
||||
|
||||
/* Extension space for pthread attributes. Referenced by the
|
||||
extension member of struct pthread_attr. */
|
||||
struct pthread_attr_extension
|
||||
{
|
||||
/* Affinity map. */
|
||||
cpu_set_t *cpuset;
|
||||
size_t cpusetsize;
|
||||
};
|
||||
|
||||
/* Mutex attribute data structure. */
|
||||
struct pthread_mutexattr
|
||||
{
|
||||
|
Reference in New Issue
Block a user