View Issue Details

IDProjectCategoryView StatusLast Update
00012911003.1(2016/18)/Issue7+TC2Base Definitions and Headerspublic2019-10-10 15:57
Reporterjoelsherrill Assigned To 
PrioritynormalSeverityCommentTypeEnhancement Request
Status NewResolutionOpen 
NameJoel Sherrill
OrganizationRTEMS.org
User Reference
Sectionpthread.h
Page NumberNA - addition request
Line NumberNA - addition request
Interp Status
Final Accepted Text
Summary0001291: Add method to obtain pthread attributes
DescriptionThis is a commonly added pthread capability but there is little agreement on the API name.

https://musl.openwall.narkive.com/dD88I7eH/pthread-getattr-np provides this list of API names for this capability in the context of discussing how to get the current stack information:

glibc: pthread_getattr_np
freebsd: pthread_attr_get_np
netbsd: pthread_attr_get_np and pthread_getattr_np

RTEMS follows glibc/linux with pthread_getattr_np.


If this capability is provided, then the current stack information can also be obtained.

The naming pattern pthread_[sg]attr_* is used to modify the pthread_attr_t structure used in a pthread_create() call. The Linux name of pthread_attr_get() seems like a choice which is an easy name and wouldn't be confused.
Desired ActionAdd pthread_attr_get() API.
TagsNo tags attached.

Activities

Don Cragun

2019-10-10 15:57

manager   bugnote:0004616

Last edited: 2019-10-10 16:04

This was discussed during the 2019-10-10 conference call: We have no objections to adding such an interface (although it will need a sponsor). But, before we can proceed we need complete details on the interface (i.e., a man page). We note that the man pages for the implementations that currently support this feature have different descriptions and are not really sure what is being proposed.

We suggest using the name pthread_getattr() because it fits better with the existing naming conventions:
pthread_getschedparam(), pthread_getcpuclockid() are functions that obtain information about a specified thread
whereas:
pthread_attr_get*() are functions that extract individual attributes from a pthread_attr_t object


Please supply complete details as a note in this bug report and we will then look for a sponsor for this new interface.

See 0001216:0004215 for an example of the information we want to see.

Issue History

Date Modified Username Field Change
2019-09-27 19:36 joelsherrill New Issue
2019-09-27 19:36 joelsherrill Name => Joel Sherrill
2019-09-27 19:36 joelsherrill Organization => RTEMS.org
2019-09-27 19:36 joelsherrill Section => pthread.h
2019-09-27 19:36 joelsherrill Page Number => NA - addition request
2019-09-27 19:36 joelsherrill Line Number => NA - addition request
2019-10-10 15:57 Don Cragun Note Added: 0004616
2019-10-10 16:04 Don Cragun Note Edited: 0004616