Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set posix thread names using task name when creating CFE tasks #532

Closed
dsburns opened this issue Jul 6, 2020 · 4 comments
Closed

Set posix thread names using task name when creating CFE tasks #532

dsburns opened this issue Jul 6, 2020 · 4 comments

Comments

@dsburns
Copy link

dsburns commented Jul 6, 2020

Is your feature request related to a problem? Please describe.
It would be helpful for the pthread name to match the CFE task name in the underlying OS on POSIX platforms. This would allow for a better user experience when debugging CFE applications using Linux based utilities i.e. strace, htop, etc.

Describe the solution you'd like
This can be accomplished by using the pthread_setname_np function in the OS_Posix_InternalTaskCreate_Impl function. Since this is a non-posix function, each BSP can specify the availability of this function through a #define in osconfig.h

Describe alternatives you've considered
None

Additional context
None

Requester Info
Dan Burns (GSFC - 596.0)
daniel.s.burns@nasa.gov

dsburns pushed a commit to dsburns/osal that referenced this issue Jul 6, 2020
This change allows underlying OS tools to view thread names for
platforms that support the pthread_setname_np function.
@astrogeco
Copy link
Contributor

@dsburns take a look at #541 that we just merged.

@skliper
Copy link
Contributor

skliper commented Oct 2, 2020

And I think @jphickey is planning to submit a PR to the PSP to set the thread names using capability implemented in #541.

@jphickey
Copy link
Contributor

jphickey commented Oct 2, 2020

And I think @jphickey is planning to submit a PR to the PSP to set the thread names using capability implemented in #541.

Done - see nasa/PSP#199.

@skliper
Copy link
Contributor

skliper commented Dec 1, 2020

Closing as duplicate, actually implemented in PSP (nasa/PSP#199)

@skliper skliper closed this as completed Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants