This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3.2] New functions pthread_[sg]etattr_default_np for default thread attributes
- From: Richard Henderson <rth at twiddle dot net>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, libc-alpha at sourceware dot org
- Date: Thu, 13 Jun 2013 09:44:29 -0700
- Subject: Re: [PATCH v3.2] New functions pthread_[sg]etattr_default_np for default thread attributes
- References: <20130315043154 dot GG22471 at spoyarek dot pnq dot redhat dot com> <20130318222239 dot 7A2712C084 at topped-with-meat dot com> <CAAHN_R13bRF0UY_XZ7Rj6tSeSgq8c_0j4bbEH6m9BbGD32EycQ at mail dot gmail dot com> <20130528220730 dot 33C262C06F at topped-with-meat dot com> <20130529065138 dot GF2145 at spoyarek dot pnq dot redhat dot com> <20130529224222 dot 8A87F2C07E at topped-with-meat dot com> <20130606131212 dot GZ13968 at spoyarek dot pnq dot redhat dot com> <20130612000601 dot 54C9F2C06E at topped-with-meat dot com> <20130612101128 dot GB19582 at spoyarek dot pnq dot redhat dot com> <20130612231757 dot CCC752C07F at topped-with-meat dot com> <20130613035538 dot GL19582 at spoyarek dot pnq dot redhat dot com>
On 06/12/2013 08:55 PM, Siddhesh Poyarekar wrote:
> + /* Free the cpuset if the input is 0. Otherwise copy in the cpuset
> + contents. */
> + if (attrs.cpuset == NULL || attrs.cpusetsize == 0)
> + {
> + free (__default_pthread_attr.cpuset);
> + __default_pthread_attr.cpuset = NULL;
> + }
Surely both attrs.cpuset and attrs.cpusetsize need to be cleared here too,
since we can arrive in this block with either of them non-zero.
r~