This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3.1] New functions pthread_[sg]etattr_default_np for default thread attributes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]