Add pthread_self#591
Conversation
|
Thanks, @king6cong! However I don't believe this is the right approach to this. If we can't support |
To confirm , you mean that we should keep pthread_self out of nix or take it in in another form? 😃 |
|
I think we should provide a safe wrapper about
Right now there's a bunch of pthread stuff is in |
|
@Susurrus updated |
|
That looks like a step in the right direction, but tests are failing. |
|
@king6cong Can you also add an entry to the CHANGELOG for this? |
|
@Susurrus Yeah, haven't found the reason that tests fails, maybe tweak around ci setup to show failure details first. |
|
Do the tests pass locally for you? If you have access to a mac and can test on one too, that might point us in the right direction. |
|
@Susurrus Yeah, it occurred to me that I could use my x86 mac to test i686 failure. Updated, Thanks! |
Susurrus
left a comment
There was a problem hiding this comment.
A few minor issues, mostly the unix thing needs to get sorted out.
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
| - Added `nix::sys::pthread::test_pthread_self` |
There was a problem hiding this comment.
This should show nix::sys::pthread::pthread_self instead.
| )] | ||
| pub mod statvfs; | ||
|
|
||
| #[cfg(unix)] |
There was a problem hiding this comment.
Aren't all the platforms covered by nix unix? This seems unnecessary.
|
|
||
| #[cfg(target_os = "linux")] | ||
| mod test_epoll; | ||
| #[cfg(unix)] |
There was a problem hiding this comment.
Again, aren't all nix-supported platforms unix?
| @@ -0,0 +1,6 @@ | |||
| use nix::sys::pthread::*; | |||
There was a problem hiding this comment.
Please add an empty line below this one.
| @@ -0,0 +1,12 @@ | |||
| use libc::{self, pthread_t}; | |||
|
|
|||
|
|
|||
There was a problem hiding this comment.
Delete one of these blank lines.
|
@king6cong I can't tell because the old code is gone, but what was the cause of the failures and what did you change to fix them? |
|
@Susurrus Updated. |
|
Great, thanks for clearing that up. Makes sense why it fixed things. I wanted to ask, do you have a specific use case for this that this addition is all that's required for it to work? I'm going to block this on #590, so we can be sure that all platforms are passing before adding this, so we have a little time here in case there was any missing functionality you also needed. and wanted to add from |
|
Can you make a new type |
|
Updated |
|
This looks good. We're going to wait until the new FreeBSD buildbot is integrated (#618) and this will be our first test. |
|
Slight change of plans. We're no longer waiting for #618 . |
Build succeeded |
|
@King6Kong Thanks for your contribution! |
No description provided.