Skip to content

eliminate mach_task_self from linux_stubs #86

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

Merged
merged 1 commit into from
Jun 18, 2016

Conversation

dgrove-oss
Copy link
Contributor

guard stray usage of mach_task_self with #if HAVE_MACH
and remove mach_test_self() from linux_stubs.

@MadCoder
Copy link
Contributor

could you try to get rid of pthread_mach_thread_np() in the same patch? because that one is also a MACH-ism and it would fit very well in that change set

Get rid of mach_error_string, mach_vm_deallocate, and mach_test_self
by adding missing #if HAVE_MACH in the last couple places it was missing.

Avoid needing pthread_mach_thread_np by replacing uses of the
_dispatch_thread_port() macro with _dispatch_tid_self()
@dgrove-oss dgrove-oss force-pushed the kill_mach_task_self_on_linux branch from 692cc0f to 92ff1bf Compare June 17, 2016 14:26
@dgrove-oss
Copy link
Contributor Author

Updated.

I'm pretty sure using _dispatch_tid_self in place of dispatch_thread_port is the right fix to avoid the expansion out to pthread_mach_thread_np, but if not let me know and I'll try again.

@MadCoder
Copy link
Contributor

Yup using _dispatch_tid_self() when it's a lock value is fine. it would be conceptually incorrect to use it as the argument to a mach call which you didn't do, so I think it's perfectly fine that way!

@MadCoder MadCoder merged commit 3339b81 into swiftlang:master Jun 18, 2016
@dgrove-oss dgrove-oss deleted the kill_mach_task_self_on_linux branch June 18, 2016 11:52
das pushed a commit that referenced this pull request Aug 11, 2016
eliminate mach_task_self from linux_stubs

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
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.

2 participants