Skip to content

Add pthread_getname_np, requires #define _GNU_SOURCE #789

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

Closed
wants to merge 11 commits into from

Conversation

dns2utf8
Copy link

@dns2utf8 dns2utf8 commented Oct 3, 2017

I noticed two things:

  1. pthread_setname_np was not included in libc so I started adding it.
  2. inside rustc's libstd/sys/unix/thread.rs the linux variant pthread_getname_np is implemented with a raw syscall. So I added it here too.

@alexcrichton
Copy link
Member

Looks great! I think CI has some errors though?

@dns2utf8
Copy link
Author

dns2utf8 commented Oct 3, 2017

All tests pass on my local machine with the latest Arch Linux.
I am working now on the MacX and Windows calls to rename a thread

@vojtechkral
Copy link
Contributor

@dns2utf8

All tests pass on my local machine with the latest Arch Linux.

I'm wondering how you got the libc-test to work on current Arch. I'm running into #788. What's your glibc version?

@alexcrichton
Copy link
Member

@dns2utf8 looks like there may still be a lot of CI errors?

@bors
Copy link
Contributor

bors commented Oct 12, 2017

☔ The latest upstream changes (presumably #798) made this pull request unmergeable. Please resolve the merge conflicts.

/usr/include/asm-generic/signal.h
46:#define      SIGUNUSED       31

/usr/include/asm/signal.h
56:#define      SIGUNUSED       31
@dns2utf8
Copy link
Author

I am testing it again now.
My current version of glibc is 2.26-6

@dns2utf8
Copy link
Author

@alexcrichton regarding the CI errors. Should we switch to a container solution with a more recent linux?
I did that for kiss3d, but it is not merged yet: sebcrozet/kiss3d#102

@dns2utf8
Copy link
Author

I noticed that the repo already has a CI folder, we could use the scripts or wrap them inside a container.

I am currently developing the extension for mac os x. Sadly it broke with the latest updates.

Android does not support getting the thread name with posix functions
@dns2utf8
Copy link
Author

Hi all

I finished for the tier 1 plattform. Unfortunatly there is a style violation because android and musl do not support getname.
Do you have an idea how to fix this?
After that I would like to squash and merge it.

Best

@alexcrichton
Copy link
Member

Oh for style I think it can just be tweaked a bit, and for platforms missing this it's ok to just omit the definition on those platforms

@bors
Copy link
Contributor

bors commented Nov 30, 2017

☔ The latest upstream changes (presumably #862) made this pull request unmergeable. Please resolve the merge conflicts.

@alexcrichton
Copy link
Member

I'm gonna close this now due to inactivity, but it can of course be resubmitted!

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.

4 participants