DescriptionUse pthread_mach_thread_np(pthread_self()) instead of mach_thread_self().
mach_thread_self() needs to be balanced by mach_port_deallocate(), which is
two system calls. The existing uses of mach_thread_self() were not
deallocated, which was a bug. pthread_mach_thread_np(pthread_self()) is two
libc function calls and no system calls, because pthread caches the Mach port.
When using pthread's cached port, no mach_port_deallocate() is necessary (it
would be an error to deallocate).
Additional background is available in http://crbug.com/105513 .
R=mseaborn@chromium.org
Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=13165
Patch Set 1 #
Messages
Total messages: 3 (0 generated)
|