Skip to content

Fix #199, set kernel task name for OSAL tasks#212

Merged
astrogeco merged 2 commits intonasa:integration-candidatefrom
jphickey:fix-199-threadname
Oct 30, 2020
Merged

Fix #199, set kernel task name for OSAL tasks#212
astrogeco merged 2 commits intonasa:integration-candidatefrom
jphickey:fix-199-threadname

Conversation

@jphickey
Copy link
Contributor

Describe the contribution
Use event callback mechanism to invoke pthread_setname_np() such that the OS kernel is informed of the OSAL task name.

Fixes #199

Testing performed
Build and sanity test CFE
Check /proc/<pid>/task/<tid>/comm and confirm that the correct name is shown for CFE tasks e.g. CFE_EVS, CFE_SB, etc.

Expected behavior changes
/proc filesystem on Linux has actual task name, instead of all being core-cpu1.

System(s) tested on
Ubuntu 20.04

Additional context
The pthread_setname_np API requires _GNU_SOURCE to be defined when compiling - this can be local to PSP.

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Use event callback mechanism to invoke pthread_setname_np() such
that the OS kernel is informed of the OSAL task name.
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Oct 28, 2020
@astrogeco
Copy link
Contributor

CCB 2020-10-28 APPROVED

@astrogeco astrogeco removed the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Oct 28, 2020
@astrogeco astrogeco changed the base branch from main to integration-candidate October 30, 2020 15:44
@astrogeco astrogeco merged commit d381c47 into nasa:integration-candidate Oct 30, 2020
astrogeco added a commit to nasa/cFS that referenced this pull request Oct 30, 2020
@jphickey jphickey deleted the fix-199-threadname branch January 6, 2021 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set thread name on pc-linux

3 participants