Skip to content

Merge darwin/libdispatch-913.1.4 to master #289

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 47 commits into from
Aug 1, 2017

Conversation

das
Copy link
Contributor

@das das commented Jul 31, 2017

Merge tag darwin/libdispatch-913.1.4 on darwin/trunk.

This includes the latest Apple source drop libdispatch-913.1.4 (up from libdispatch-890 in #254), on top of darwin/darwin-009.

The latter tag includes the github PR's below merged to trunk that we've pulled back into the Apple internal repository, along with any changes made to them during internal review and testing on Darwin:

#249 from dgrove-oss/update-docs
#248 from dgrove-oss/queue_config_cleanup
#254 from apple/das-darwin-libdispatch-890-merge-master
#256 from apple/revert-255-revert-254-das-darwin-libdispatch-890-merge-master
#172 from karwa/removespecific
#253 from dgrove-oss/linux-qos-prioritty
#259 from johnno1962a/master
#260 from compnerd/cmake-parity
#261 from compnerd/module-maps
#262 from compnerd/gold
#264 from compnerd/dtrace-usdt-probes
#266 from compnerd/pwq
#258 from spevans/pr_expose_symbol
#267 from dgrove-oss/cmake-copy-libdisaptch
#269 from dgrove-oss/cmake-default-args
#268 from ktopley-apple/dispatch-sync-fixup-overlay
#277 from apple/mad/remove-sys-membarrier
#280 from apple/mad/epoll-fixes
#281 from apple/mad/epoll-fixes-2
#279 from apple/mad/greedy-signalfd
#273 from dgrove-oss/match-darwin-cflags-round1

dgrove-oss and others added 30 commits July 31, 2017 13:56
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
update README and INSTALL for libpwq removal

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
As suggested in review of PR-206, DISPATCH_USE_INTERNAL_WORKQUEUES
should not enable HAVE_PTHREAD_WORKQUEUES.  Instead, a new
DISPATCH_USE_WORKQUEUES is defined in queue.c to guard code that
should be enabled in either case.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
clarify config of pthread_workqueue vs. internal_workqueue

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
define WORKQ_ADDTHREADS_OPTION_OVERCOMMIT for DISPATCH_USE_INTERNAL_WORKQUEUE
remove unused _swift_dispatch_apply_current_root_queue symbol
remove duplicate _dispatch_adopt_wlh_anon() in _dispatch_mgr_thread(), this is already set by its caller _dispatch_root_queue_drain()

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
…aster

Merge darwin/libdispatch-890 to master

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
…ibdispatch-890-merge-master

Re-merge darwin/libdispatch-890 to master

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
[Overlay/Queue]: Allow setting an optional  value in setSpecific

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Update dispatch_workq (DISPATCH_USE_INTERNAL_WORKQUEUE)
to use QoS-based constants instead of legacy priorities.

Enhance monitoring code to count runnable threads from
highest QoS to lowest and to suppress voluntary
oversubscription for lower QoS queues if the total count
of runnable worker threads is already over the desired
threshold.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Convert dispatch_workq from legacy priorities to qos

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Thread detach hook for Java JNI on Android

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Use the target_sources function to add additional sources to the
dispatch target rather than managing lists.  This simplifies the
handling and modernises the CMake usage.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Add support to the cmake based build system to use the internal pthread
workqueue implementation.  This restores parity with the autotools
build.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
cmake parity updates

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Use a darwin specific modulemap on darwin, and the generic one
elsewhere.  This fixes the cmake build to create the symlinks like the
autotools build and cause the installation to be correct on Darwin as
well as the build.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
build: switch the module map according to the target

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
This used to be an option in the autotools build.  Address the TODO item
and add an option to control that.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
build: add option to use the gold linker

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Add the missing support for dtrace header script support.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
build: add dtrace USDT probe support

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Remove the supporting code for WITH_PTHREAD_WORKQUEUES which was removed
previously.  NFC.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
build: remove dead code

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
- This allows it to be used by Foundation so that the duplicate
  function can be removed.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Export objc_retainAutoreleasedReturnValue()

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
All of the swift projects that depend on finding libdispatch.so
during their builds (swift, foundation, swiftpm) all expect it
to be in src/.libs/libdispatch.so (libtool convention). Temporarily
add a rule to copy the built library to where libtool would have
placed it to decouple using CMake for libdispatch from updating
all of the other dependent projects' build expectations.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
CMake compatibility with Swift build assumptions

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
There may be a more elegant way to do this, but we really want
to build shared libraries by default on Linux and we want to
build the test cases and be able to run them.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
das and others added 15 commits July 31, 2017 13:56
Set CMake defaults to match autoconf Linux behavior.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
…iler with SE-0176 support.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Fix warnings in DispatchQueue.sync() implementation when using a comp…

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
By not inlining the fastpath of dispatch_once() when the hardware cannot
give us the right semantics.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Remove dependency on sys_membarrier on linux

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
_dispatch_epoll_update() was being called without dmn->dmn_events being
updated beforehand.

Signed-off-by: Pierre Habouzit <phabouzit@apple.com>
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Actually update epoll events if needed when unregistering

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Make sure we don't keep doing these syscalls and log stupid errors about
it failing forever.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
the buffer size ioctls on linux return EINVAL when it's not supported

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Fix improper double-fire of signal sources on Linux

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
work in progress on cleaning up code so it can be compiled
with the same set of warning flags used on Darwin. This is an initial
pass through the C files in src to resolve warnings. Most warnings
are related to implicit size/sign conversions between integral types and
missing explicit prototypes for non-static functions.

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
fixes to src to prep for enabling additional compiler warnings

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <das@apple.com>
@das das requested a review from dgrove-oss July 31, 2017 23:23
Signed-off-by: Daniel A. Steffen <das@apple.com>
@das das force-pushed the das-darwin-libdispatch-913.1.4-merge-master branch from ec0f661 to 0eaaab6 Compare August 1, 2017 01:05
Signed-off-by: Daniel A. Steffen <das@apple.com>
@das das force-pushed the das-darwin-libdispatch-913.1.4-merge-master branch from 485b60f to 17c153a Compare August 1, 2017 02:21
@das
Copy link
Contributor Author

das commented Aug 1, 2017

@swift-ci please test

@das
Copy link
Contributor Author

das commented Aug 1, 2017

with those last two changes, the CI is happy.

@dgrove-oss would you mind giving this a manual sanity check on your end as well just to make sure we don't break anything at this late stage ?

@dgrove-oss
Copy link
Contributor

sure. i'll do that this morning.

Copy link
Contributor

@dgrove-oss dgrove-oss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on Linux; looks good.

@das
Copy link
Contributor Author

das commented Aug 1, 2017

Thanks Dave!

@das das merged commit 666df60 into master Aug 1, 2017
ktopley-apple pushed a commit that referenced this pull request Dec 6, 2018
…ge-master

Merge darwin/libdispatch-913.1.4 to master

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.

9 participants