Re: For review: pthread_attr_setaffinity_np.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,


.TH PTHREAD_ATTR_SETAFFINITY_NP 3 2008-11-05 "Linux" "Linux Programmer's
Manual"
Title looks weird on a 80x24 terminal.

Yes.  But, hard to help -- I couldn't think of a reasonable, more
abbreviated name for the page title.

Sure. I just reviewed using the '-pedantic' flag :-D


.TP
.BR EINVAL
.RB ( pthread_attr_setaffinity_np ())
.I cpuset
specified a CPU that was outside the range
permitted by the kernel data type
.\" cpumask_t
used to represent CPU sets.
.\" The raw sched_getaffinity() system call returns the size (in bytes)
.\" of the cpumask_t type.
This range is determined by the kernel configuration option
.BR CONFIG_NR_CPUS .

(While we're here: I changed the text of this EINVAL error to be the
same as the revised EINVAL error text in ptherad_setaffinity_np(3).)

<check>
Hmmm. What does happen if CPU set contains no CPU physically on the system
when the thread is created? I guess pthread_create() fails?
</check>

I would expect pthread_create() to fail with EINVAL, and testing
confirms this.  (There is an EINVAL error diagnostic in
pthread_create(3): "Invalid settings in attr".)

Fine. I expected something like that, but I didn't got the opportunity to check it. Thanks.


.TP
.B ENOMEM
.RB ( pthread_attr_setaffinity_np ())
Could not allocate memory.
Correct. However, the glibc looks somewhat suspicious to me: I had expected
the memory allocated by iattr->cpuset to be bounded (by the size of the
underlying kernel structure).

Or perhaps I am just missing my coffeine :o

Not sure if you are suggesting that I need to change anything here?

I suggest to change the glibc code, not your description.


.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
.\"     <mtk.manpages@xxxxxxxxx>

[snip]

The revised version looks good to me.

Cheers,
Loïc.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux