[PATCH v3.1] New functions pthread_[sg]etattr_default_np for default thread attributes
Siddhesh Poyarekar
siddhesh@redhat.com
Thu Jun 13 02:26:00 GMT 2013
On Wed, Jun 12, 2013 at 04:17:57PM -0700, Roland McGrath wrote:
> > + void *newp = (cpu_set_t *) realloc (__default_pthread_attr.cpuset,
> > + attrs.cpusetsize);
>
> Drop the cast and make the variable cpu_set_t *.
>
> You could skip the realloc if the sizes match, which will be the common
> case (the second most common, after zero).
I already do with:
+ else if (attrs.cpusetsize != __default_pthread_attr.cpusetsize)
+ {
+ ....
Perhaps you mean something else?
> > + if (ret == EPERM)
> > + {
> > + fprintf (stderr, "Skipping CPU Affinity test: %s\n", strerror (ret));
> [...]
> > + fprintf (stderr, "Skipping Scheduler Attributes test: %s\n",
>
> Should probably be on stdout like the rest of the output.
>
It was agreed in the past that test warnings such as skipping a case
should be printing on standard error so that it is visible in the make
check output:
http://sourceware.org/glibc/wiki/Testing/Testsuite#Writing_a_test_case
I'll post an updated version in some time.
Siddhesh
More information about the Libc-alpha
mailing list