Skip to content

Merge darwin/libdispatch-1324.41.2 to main #583

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

Open
wants to merge 250 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
250 commits
Select commit Hold shift + click to select a range
68c3553
Merge libdispatch-1186
rokhinip Aug 27, 2021
f49eafb
build: honour `BUILD_SHARED_LIBS`
compnerd Oct 2, 2018
ac83a4a
Merge pull request #396 from compnerd/build-type-blocks
compnerd Oct 4, 2018
83b5a20
build: enable usage on Windows
compnerd Oct 3, 2018
cf9fd05
Merge pull request #362 from compnerd/shared
compnerd Oct 5, 2018
86935c8
[CMake] Make sure to link swiftrt.o when building the Swift Dispatch …
DougGregor Oct 9, 2018
a79e5c1
Merge pull request #398 from DougGregor/link-swiftrt
DougGregor Oct 10, 2018
8e746aa
swift: cast to the appropriate type
compnerd Oct 11, 2018
9fbd493
Merge pull request #399 from compnerd/casting
compnerd Oct 12, 2018
1ce501c
Merge pull request #400 from compnerd/cleanup
compnerd Oct 12, 2018
f2e0ebf
Linux i686 Build Support
Kaiede Oct 14, 2018
cad27f8
Merge pull request #402 from Kaiede/i686Support
compnerd Oct 16, 2018
2edda3c
Fix the signature of _dispatch_install_thread_detach_callback()
adierking Oct 15, 2018
8cefcf3
Merge pull request #403 from adierking/detach
MadCoder Oct 17, 2018
42e6931
build: use the exported target instead of reconstructing paths
compnerd Oct 4, 2018
8470f24
Merge pull request #397 from compnerd/static-stdlib
ktopley-apple Oct 18, 2018
174bb90
Merge pull request #406 from adierking/printflike
ktopley-apple Oct 18, 2018
d8e05b4
build: always copy the modulemaps
compnerd Oct 27, 2018
6d24e9c
Merge pull request #412 from compnerd/copy
shahmishal Oct 29, 2018
aac2825
cmake: update SwiftSupport from XCTest
compnerd Oct 12, 2018
9012286
cmake: support static and shared swift libraries
compnerd Oct 12, 2018
9bc407f
build: split out the SDK overlay
compnerd Oct 12, 2018
242e725
build: correct dependency tracking
compnerd Oct 23, 2018
370b38f
Merge pull request #401 from compnerd/split-sdk-overlay
ktopley-apple Nov 5, 2018
7bb4a40
build: remove "/usr/include" for swift
compnerd Oct 18, 2018
516be48
Merge pull request #410 from compnerd/include
ktopley-apple Nov 5, 2018
7694808
SDK: guard BSD specific paths against windows
compnerd Oct 29, 2018
e570606
Merge pull request #413 from compnerd/bsdism
ktopley-apple Nov 5, 2018
f2bc62b
DispatchStubs: make more Windows friendly
compnerd Nov 2, 2018
0ba34b4
Merge pull request #415 from compnerd/stubs
ktopley-apple Nov 5, 2018
bdb3648
dispatch: make public interfaces LLP64 friendly
compnerd Oct 21, 2018
852f2d3
Merge pull request #409 from compnerd/llp64
ktopley-apple Nov 5, 2018
d0f6c29
WIP/DNM: LLP64 support for SDK Overlay
compnerd Oct 29, 2018
e6b27db
Merge pull request #414 from compnerd/llp64-overlay
ktopley-apple Nov 5, 2018
ac85878
Replace valloc() usages in portable code
adierking Oct 16, 2018
a129ab2
Merge pull request #405 from adierking/valloc
ktopley-apple Nov 5, 2018
34878d2
io: use posix_fadvise() instead of readahead()
adierking Oct 16, 2018
9c481b3
Merge pull request #404 from adierking/readahead
ktopley-apple Nov 6, 2018
73e145f
build: clean up the transition compatibility work
compnerd Nov 5, 2018
46fa585
Merge pull request #411 from compnerd/cleanup
ktopley-apple Nov 6, 2018
d264761
build: honour the USE_*_LINKER flags for swift
compnerd Nov 3, 2018
21d90b1
Merge pull request #421 from compnerd/linker
ktopley-apple Nov 6, 2018
29892e4
build: add an explicit link to BlocksRuntime
compnerd Nov 3, 2018
194cc4f
Merge pull request #422 from compnerd/blocks
ktopley-apple Nov 6, 2018
c50dacc
tests: fall back to fork() if posix_spawnp() is not available
adierking Oct 17, 2018
9f0dab0
Merge pull request #408 from adierking/fork
ktopley-apple Nov 6, 2018
7151c0d
Merge pull request #407 from adierking/testfile
ktopley-apple Nov 6, 2018
330fc49
Add string.h for memcpy in Data.swift.
drodriguez Nov 7, 2018
09e3013
Merge pull request #426 from drodriguez/include-string-for-memcpy
ktopley-apple Nov 9, 2018
ecb4a75
build: rename flags to cmake_flags (NFC)
compnerd Nov 15, 2018
946b287
build: enable cross-linking
compnerd Nov 15, 2018
59d9ea6
Merge pull request #427 from compnerd/cross-link
ktopley-apple Nov 16, 2018
a65aa25
cmake: update SwiftSupport from XCTest
compnerd Oct 12, 2018
6c9bf7c
cmake: support static and shared swift libraries
compnerd Oct 12, 2018
6d9b70e
build: install import libraries for Windows
compnerd Nov 17, 2018
5f5eebc
build: install os header for Windows
compnerd Nov 17, 2018
023f50d
build: spell `-fno-exceptions` for MSVC
compnerd Nov 17, 2018
09528b0
build: install libraries into the right location
compnerd Nov 17, 2018
7c19bda
Merge pull request #429 from compnerd/image
ktopley-apple Nov 26, 2018
0ca99b1
dispatch: include `time.h` on windows
compnerd Nov 24, 2018
bac98b0
Merge pull request #430 from compnerd/it-is-time
ktopley-apple Nov 26, 2018
ed2329c
libdispatch: clean up some Win64 warnings
compnerd Nov 23, 2018
c1a96e9
Merge pull request #432 from compnerd/warnings
ktopley-apple Nov 27, 2018
1f2105b
build: make the static build work well
compnerd Nov 27, 2018
f3b0e48
Merge pull request #433 from compnerd/static-build
ktopley-apple Nov 27, 2018
0e44d51
build: build libdispatch as position independent
compnerd Dec 1, 2018
0ab1a7b
Merge pull request #434 from compnerd/pic
ktopley-apple Dec 3, 2018
7932b0a
dispatch: add support for runloops on Windows
compnerd Jan 12, 2019
6eef9ce
Merge pull request #436 from compnerd/dispatch-queues
ktopley-apple Feb 1, 2019
9eb7a41
Pass along source context in `dispatchPrecondition`
helje5 Jan 14, 2019
ff70651
Merge pull request #437 from helje5/feature/dizpatchPrecondition-context
ktopley-apple Feb 1, 2019
e7f5361
build: remove unnecessary `find_package`
compnerd Jan 18, 2019
8f9f8ec
Merge pull request #438 from compnerd/swift-less
ktopley-apple Feb 1, 2019
a9100cc
build: add executable suffix for `-fuse-ld=`
compnerd Jan 22, 2019
3d8bc11
Merge pull request #439 from compnerd/android-wins
ktopley-apple Feb 1, 2019
bdcfeb0
Merge pull request #440 from adierking/windowstests
ktopley-apple Feb 1, 2019
1d1e2be
dispatch: fix logging to a file on Windows
adierking Feb 2, 2019
3975291
Merge pull request #441 from adierking/winlog
ktopley-apple Feb 5, 2019
459cbef
Retry sem_wait on signal interrupts
gmilos Feb 2, 2019
17659f9
Merge pull request #442 from gmilos/SR-9863-sem-wait-signal-interrupt…
ktopley-apple Feb 5, 2019
3c888b7
Use numericCast() to get the correct type when creating a dispatch_bl…
ktopley-apple Feb 8, 2019
9ebfacb
Merge pull request #444 from ktopley-apple/ktopley-numericCast-for-di…
ktopley-apple Feb 11, 2019
dbb013f
Revert "Use numericCast() to get the correct type when creating a dis…
compnerd Feb 13, 2019
01aa2f3
Merge pull request #446 from compnerd/sometimes-code-is-ugly
ktopley-apple Feb 13, 2019
9c1b616
libdispatch-1121 merge fixes.
ktopley-apple Feb 22, 2019
aad26e9
Make workloop scheduling depend on TARGET_OS_MAC
ktopley-apple Mar 13, 2019
fdefd3d
Merge pull request #447 from apple/kwt-test-darwin-libdispatch-1121-m…
ktopley-apple Mar 18, 2019
d07d536
shims: correct indirection on Windows
compnerd Mar 18, 2019
b283276
event: plumb partial timer support for Windows
compnerd Mar 19, 2019
45d641d
remove last few __LP64__ usage
compnerd Mar 19, 2019
e8703c9
simplify preprocessor checks
compnerd Mar 19, 2019
c34242a
windows: correct use of WaitOnAddress
compnerd Mar 19, 2019
7a9f955
queue: implement queue handles for Windows
compnerd Mar 19, 2019
431aad9
correct debug print format specifiers
compnerd Mar 19, 2019
693b697
build: allow enabling assertions
compnerd Mar 19, 2019
6a3a878
TSD: correct FlsAlloc check
compnerd Mar 19, 2019
9da4d23
shims: correct _dispatch_get_nanoseconds on Windows
compnerd Mar 19, 2019
0e4894b
event: support CLOCK_WALL on Windows
compnerd Mar 19, 2019
4985807
time: use GetSystemTimePreceiseAsFileTime on Windows
compnerd Mar 19, 2019
3f2ffe0
lock: adopt the POSIX behaviour on Windows
compnerd Mar 19, 2019
a191e33
queue: expose `_dispatch_get_main_queue_port_4CF`
compnerd Mar 19, 2019
8fcf7df
Optimize Windows contention performance
adierking Mar 19, 2019
8339746
shims: flesh out generic_sys_queue.h further
compnerd Mar 19, 2019
2d7c429
shims: correct `_dispatch_uptime` for Windows
compnerd Mar 19, 2019
e2d01f8
benchmark: disable 128-bit math on Windows
compnerd Mar 19, 2019
eb989df
resolve 1121 merge conflicts
compnerd Mar 19, 2019
c54cbca
Merge pull request #453 from compnerd/windows-improvements
ktopley-apple Mar 20, 2019
97e5dc4
Fixed printf format in _dispatch_semaphore_debug()
triplef Mar 19, 2019
d6a0bba
Merge pull request #448 from triplef/fix-printf-ptr
ktopley-apple Mar 20, 2019
e5308a4
Added missing private headers to cmake install.
triplef Mar 19, 2019
e17e1be
Merge pull request #460 from triplef/fix-cmake-private-install
ktopley-apple Mar 20, 2019
b716283
Merge pull request #457 from triplef/fix-signatures
ktopley-apple Mar 20, 2019
d14663f
Fix printf format macro for `dsema_value`
triplef Mar 20, 2019
986610e
Merge pull request #463 from triplef/fix-printf-dsma-value
ktopley-apple Mar 20, 2019
536b9d0
Use sched_yield() as fallback for preemption yield.
triplef Mar 20, 2019
436104d
Merge pull request #459 from triplef/fix-sched-yield-android
ktopley-apple Mar 21, 2019
2fc6b18
Added underscores to gettid(void) to remove name clash with system-pr…
tachoknight Mar 19, 2019
f2bbd6b
Changed __gettid() to _gettid() to be consistent with existing naming…
tachoknight Mar 21, 2019
96c2846
Merge pull request #461 from tachoknight/master
ktopley-apple Mar 21, 2019
947047b
Added missing macros in generic_sys_queue.h
triplef Mar 20, 2019
d71fa40
Use generic_sys_queue.h on Android.
triplef Mar 20, 2019
ba2e4f0
Merge pull request #458 from triplef/fix-missing-queue-defs
ktopley-apple Mar 21, 2019
828f7db
[cmake] Skip regex when CMAKE_STATIC_LIBRARY_PREFIX is empty.
drodriguez Mar 5, 2019
f9b904f
Merge pull request #452 from drodriguez/fix-regex-windows
ktopley-apple Mar 22, 2019
b106c4a
Use SYS_gettid on Android.
triplef Mar 22, 2019
86ec7b6
Merge pull request #465 from triplef/fix-gettid-android
ktopley-apple Mar 22, 2019
120ff02
Workaround for Ubuntu 18.04 clang crashes in swift-corelibs-libdispath
ktopley-apple Mar 22, 2019
d95bb27
Merge pull request #466 from apple/kwt-ubuntu1804-clang-workaround
shahmishal Mar 22, 2019
4d5f99d
Fix typo in documentation for "deadline" parameter.
ktopley-apple Apr 1, 2019
093f8f4
Merge pull request #468 from apple/kwt-fix-doc-typo
ktopley-apple Apr 1, 2019
0f74ca6
build: address -Werror,-Wcovered-switch-default error
compnerd Mar 26, 2019
8bee3ce
build: switch `-Wswitch-enum` to `-Wswitch`
compnerd Mar 26, 2019
71c9404
Merge pull request #467 from compnerd/warnings
ktopley-apple Apr 3, 2019
8e960c2
Merge pull request #470 from adierking/win_io_tests
ktopley-apple Apr 8, 2019
b2656b2
event: create a typedef for the unote ident type
compnerd Apr 5, 2019
e6b30d4
Merge pull request #469 from compnerd/size
ktopley-apple Apr 8, 2019
bb63edb
build: install swiftDispatch.dll to bin
compnerd Apr 10, 2019
173e6ed
Merge pull request #471 from compnerd/runtime-binaries
ktopley-apple Apr 10, 2019
85c61dc
shims: correct list macros
compnerd Apr 19, 2019
947b4df
Merge pull request #472 from compnerd/prev-next-prev
ktopley-apple Apr 25, 2019
27b1a9f
SR-9033: handle EPOLLHUP on Linux
adierking May 3, 2019
d9b009f
Merge pull request #478 from gottesmm/sr-9033
ktopley-apple May 6, 2019
4fc6fdc
explicitly ignore return value
mroi Apr 29, 2019
309163b
Merge pull request #474 from mroi/patch-1
ktopley-apple May 10, 2019
ccef90b
dispatch: fix a couple of printf specifiers
compnerd Apr 19, 2019
2559da4
windows: add initial cut of file sources
compnerd Apr 19, 2019
798fc5d
Merge pull request #473 from compnerd/file-sources
ktopley-apple May 10, 2019
a5f4e31
shims: correct `TAILQ_CONCAT`
compnerd Apr 29, 2019
e203e93
Merge pull request #475 from compnerd/chasing-my-tail
ktopley-apple May 10, 2019
5dc5e07
Swift: correct dispatch source construction on Win32
compnerd May 9, 2019
07591d5
Merge pull request #479 from compnerd/get-a-handle-on-the-situation
ktopley-apple May 10, 2019
d268787
build: ensure that we link against the correct library
compnerd May 10, 2019
9687520
Merge pull request #480 from compnerd/one-is-better-than-many
ktopley-apple May 10, 2019
e91341d
Merge pull request #484 from apple/disable-group-starfish
shahmishal May 16, 2019
dd47f71
Merge pull request #485 from apple/disable-group-followup
shahmishal May 16, 2019
a061b6b
When adding conditionally included compiler flags, dont use the CFLAG…
spevans May 16, 2019
f272fbd
Merge pull request #483 from spevans/pr_cflags_fix
ktopley-apple May 16, 2019
6cdf7b9
swift: add a set of Windows extensions
compnerd May 12, 2019
932cfbe
Merge pull request #481 from compnerd/handle-extensions
ktopley-apple May 16, 2019
88103d2
Install libDispatchStubs.a if building static libraries.
spevans May 27, 2019
0f49eff
Merge pull request #489 from spevans/pr_install_dispatch_stubs
ktopley-apple May 30, 2019
97bf93a
Fixes Cmake error "Unrecognized architecture on host system: armv7-a"
vgorloff Jun 1, 2019
e2f1980
Merge pull request #490 from vgorloff/macos-to-android-crosscompile
ktopley-apple Jun 4, 2019
0907ae1
Fix formatting in documentation for "deadline" parameter.
marcprux Jun 3, 2019
e27d0bf
Merge pull request #491 from marcprux/patch-1
ktopley-apple Jun 7, 2019
899d468
io: free Windows operation data with _aligned_free()
adierking Jun 11, 2019
e3fbeb3
Merge pull request #493 from adierking/alignedfree
ktopley-apple Jun 11, 2019
105e638
shims: fix TAILQ_CONCAT() edge cases
adierking Jun 12, 2019
815a1b7
Merge pull request #496 from adierking/tailq
ktopley-apple Jun 12, 2019
d253b3c
Remove libbsd dependency for Linux
compnerd Jun 11, 2019
89f8898
Merge pull request #492 from compnerd/bsd-free-bsd
ktopley-apple Jun 12, 2019
c684ab9
Revert "Remove libbsd dependency for Linux"
benlangmuir Jun 12, 2019
39f0cd4
Merge pull request #497 from apple/revert-492-bsd-free-bsd
shahmishal Jun 12, 2019
1b4c03f
Revert "Revert "Remove libbsd dependency for Linux""
compnerd Jun 13, 2019
d9be150
Merge pull request #499 from compnerd/marsha-marsha-marsha
ktopley-apple Jun 13, 2019
62e2814
Put back generic_win_stubs.c
ktopley-apple Aug 23, 2019
1837177
shims: use the precise Windows time functions
adierking Jun 12, 2019
82d490b
Merge pull request #498 from adierking/precise-time
ktopley-apple Jun 13, 2019
70374db
build: allow passing Swift specific link flags
compnerd Jun 15, 2019
ee500da
build: spell the linker suffix properly on Windows
compnerd Jun 15, 2019
c57b823
Merge pull request #500 from compnerd/windows-android
compnerd Jun 15, 2019
97b5c25
io: fix dispatch_io_create_with_path() on Windows
adierking Jun 11, 2019
68724f5
Merge pull request #494 from adierking/iopath
ktopley-apple Jun 26, 2019
129e943
Merge pull request #495 from adierking/test-all-the-things
ktopley-apple Jun 27, 2019
97cf07a
event: support pipe sources on Windows
adierking Jun 18, 2019
0e21537
Merge pull request #501 from adierking/peep-the-pipes
ktopley-apple Jun 27, 2019
0546f27
sys/sysctl.h is deprecated on Linux and a warning has been added to t…
tachoknight Jun 29, 2019
5cc8569
Merge pull request #502 from tachoknight/master
ktopley-apple Jul 2, 2019
8c8cda4
build: add DT_SONAME for ELF libraries
compnerd Jul 13, 2019
3add582
Merge pull request #503 from compnerd/soname-sosad
compnerd Jul 14, 2019
0dec444
build: correct the `DT_SONAME`
compnerd Jul 15, 2019
48011c4
Merge pull request #504 from compnerd/the-path-challenge
compnerd Jul 15, 2019
9b2063a
Address TODO to unblock master-next.
pschuh Jul 16, 2019
9e40148
Merge pull request #505 from pschuh/f-1
compnerd Jul 17, 2019
3f3b5e5
event: support socket sources on Windows
adierking Jul 18, 2019
f45b0c8
Merge pull request #507 from adierking/sock-and-roll
ktopley-apple Jul 29, 2019
6aaaca5
build: support `CMAKE_SWIFT_COMPILER_TARGET`
compnerd Jul 23, 2019
e18bbaa
Merge pull request #509 from compnerd/compiler-target
ktopley-apple Jul 31, 2019
e99a38d
shims: always replace `_Bool` with `bool` in C++
compnerd Aug 14, 2019
2549f99
Merge pull request #510 from compnerd/boolean
compnerd Aug 14, 2019
9acd855
event: simplify the Windows file source implementation
adierking Aug 16, 2019
d7be6c5
Merge pull request #511 from adierking/file-cleanup
ktopley-apple Aug 21, 2019
708257f
libdispatch open source import fixups.
ktopley-apple Aug 23, 2019
82fefaf
event: implement source muxing on Windows
adierking Aug 20, 2019
56dc31b
Merge pull request #512 from adierking/cross-the-streams
ktopley-apple Aug 22, 2019
d422044
build: remove unnecessary flag to control the linker
compnerd Aug 18, 2019
d8aa3c9
Merge pull request #513 from compnerd/linker-be-gone
ktopley-apple Aug 26, 2019
e5c17ba
build: place executable content into the root of the build
compnerd Aug 29, 2019
d8986aa
Merge pull request #515 from compnerd/output-directory
ktopley-apple Sep 3, 2019
7910811
build: sink BlocksRuntime into its own directory
compnerd Sep 10, 2019
f47dc3b
Merge pull request #517 from compnerd/blocks
ktopley-apple Sep 10, 2019
19fefed
build: migrate to standard mechanism for testing
compnerd Sep 12, 2019
b6315ff
Merge pull request #518 from compnerd/enable-testing
ktopley-apple Sep 17, 2019
5bc081a
hw_config: fix Windows CPU detection
adierking Sep 22, 2019
00f88eb
Merge pull request #521 from adierking/learn-to-count
compnerd Sep 23, 2019
a44fc5e
queue: use the default stack size on Windows
adierking Sep 22, 2019
24f21db
Merge pull request #522 from adierking/stack-size
compnerd Sep 23, 2019
cd4e479
semaphore: annotate fallthrough (NFC)
compnerd Aug 26, 2019
37a319f
Merge pull request #514 from compnerd/implicit-fallthrough
ktopley-apple Sep 24, 2019
a0de861
Revert "Revert "build: port to new Swift support""
shahmishal Sep 26, 2019
44dd24b
Merge pull request #527 from apple/revert-526-revert-519-swift-support
shahmishal Sep 26, 2019
9395c68
build: repair macro definition handling
compnerd Sep 27, 2019
ba84fd8
Merge pull request #529 from compnerd/definition-handling
ktopley-apple Sep 27, 2019
f450524
build: add exports targets
compnerd Sep 26, 2019
39db556
build: adjust linking visibility for exported targets
compnerd Sep 27, 2019
d6e8ffc
Merge pull request #525 from compnerd/bring-out-your-targets
ktopley-apple Sep 30, 2019
c60e834
build: make some linkage flags public
compnerd Sep 30, 2019
819591d
Merge pull request #530 from compnerd/public-flags
ktopley-apple Oct 1, 2019
fb301e0
[build] Silence `-Wvoid-pointer-to-int-cast`
bulbazord Feb 18, 2020
578a672
Merge pull request #538 from xiaobai/fix-build-new-flag
benlangmuir Mar 16, 2020
250f7a2
[CMake] fix runpath for ELF platforms
finagolfin May 6, 2020
e94c8ea
Merge pull request #541 from buttaface/rpath
MadCoder May 11, 2020
c59fb3e
dispatch: use auto-reset event for dispatch queue
compnerd May 26, 2020
252434b
Merge pull request #542 from compnerd/auto-reset
compnerd May 27, 2020
758dfcb
IO: match the signature for `DispatchIO` with `dispatch_io_create`
compnerd Mar 25, 2020
9683049
Merge pull request #539 from compnerd/IO
MadCoder Jun 8, 2020
88e7baa
Add modulemap for static compilation
drexin Jul 31, 2020
753ca52
Merge pull request #544 from drexin/wip-static-modulemap
drexin Aug 12, 2020
ed27ebe
Add missing DISPATCH_COCOA_COMPAT preprocessor symbol.
3405691582 Feb 1, 2020
77590c1
Merge pull request #537 from 3405691582/MissingDispatchCocoaCompat
compnerd Aug 14, 2020
4e1147f
Make some preliminary porting changes.
3405691582 Feb 1, 2020
3df74e6
Merge pull request #536 from 3405691582/NoSysctlbyname_AddOSSymbol
compnerd Aug 14, 2020
7a97c24
docs: fix simple typo, transiton -> transition
timgates42 Nov 27, 2020
0e37faf
Merge pull request #553 from timgates42/bugfix_typo_transition
compnerd Jan 19, 2021
8ffad06
[android] Put in fixes for librt and armv7-a
finagolfin Dec 2, 2020
98bfc28
Merge pull request #554 from buttaface/droid-arm
drexin Feb 24, 2021
e42a145
shims: adjust the Windows path for Windows 11
compnerd Jul 22, 2021
1b3d2a5
Merge pull request #562 from compnerd/windows-11
compnerd Jul 26, 2021
3136e15
Merge libdispatch-1324.41.2
rokhinip Oct 4, 2021
4981dfd
merge darwin/libdispatch-1324.41.2
rokhinip Nov 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ int main(int argc, char *argv[]) {
if(DISPATCH_HAVE_EXTENDED_SLPI_20348)
add_compile_definitions(DISPATCH_HAVE_EXTENDED_SLPI_20348)
endif()

Copy link
Contributor

@das das Nov 6, 2021

Choose a reason for hiding this comment

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

not sure what's up with the github diff viewer but this difference isn't real, this file is identical between the two branches

check_c_source_compiles([=[
#include <Windows.h>
int main(int argc, char *argv[]) {
switch ((LOGICAL_PROCESSOR_RELATIONSHIP)0) {
case RelationProcessorModule:
return 0;
}
return 0;
}
]=] DISPATCH_HAVE_EXTENDED_SLPI_22000)
if(DISPATCH_HAVE_EXTENDED_SLPI_22000)
add_compile_definitions(DISPATCH_HAVE_EXTENDED_SLPI_22000)
endif()
endif()

set(CMAKE_C_STANDARD 11)
Expand Down
110 changes: 110 additions & 0 deletions PATCHES
Original file line number Diff line number Diff line change
Expand Up @@ -434,3 +434,113 @@ github commits starting with 29bdc2f from
[3975b58] APPLIED rdar://44568645
[81dc900] APPLIED rdar://44568645
[6162a1d] APPLIED rdar://44568645
[c55ff6f] APPLIED rdar://54572081
[c4a7149] APPLIED rdar://54572081
[edce1fe] APPLIED rdar://54572081
[ac525a4] APPLIED rdar://54572081
[0710b29] APPLIED rdar://54572081
[e99de71] APPLIED rdar://54572081
[6d83ad5] APPLIED rdar://54572081
[3ed78b5] APPLIED rdar://54572081
[f6376cb] APPLIED rdar://54572081
[9acbab3] APPLIED rdar://54572081
[ca08b5f] APPLIED rdar://54572081
[775f9f2] APPLIED rdar://54572081
[db37bbc] APPLIED rdar://54572081
[9852dcb] APPLIED rdar://54572081
[9ec95bf] APPLIED rdar://54572081
[bd2367c] APPLIED rdar://54572081
[a736ea7] APPLIED rdar://54572081
[3e4ea66] APPLIED rdar://54572081
[c85c0d8] APPLIED rdar://54572081
[7187ea2] APPLIED rdar://54572081
[30eeb14] APPLIED rdar://54572081
[6a5c6d8] APPLIED rdar://54572081
[64a12c6] APPLIED rdar://54572081
[09ec354] APPLIED rdar://54572081
[5bcd598] APPLIED rdar://54572081
[7874a92] APPLIED rdar://54572081
[619775e] APPLIED rdar://54572081
[e3ae79b] APPLIED rdar://54572081
[fb368f6] APPLIED rdar://54572081
[afa6cc3] APPLIED rdar://54572081
[e6df818] APPLIED rdar://54572081
[7144ee3] APPLIED rdar://54572081
[60ffcc2] APPLIED rdar://54572081
[618b070] APPLIED rdar://54572081
[dde5892] APPLIED rdar://54572081
[81c9bf6] APPLIED rdar://54572081
[4b85ca6] APPLIED rdar://54572081
[ff3bf51] APPLIED rdar://54572081
[bc00e13] APPLIED rdar://54572081
[d44acc0] APPLIED rdar://54572081
[4659503] APPLIED rdar://54572081
[60fdf80] APPLIED rdar://54572081
[7a74af4] APPLIED rdar://54572081
[f20349f] APPLIED rdar://54572081
[ef9364c] APPLIED rdar://54572081
[9d485ca] APPLIED rdar://54572081
[cbd70d1] APPLIED rdar://54572081
[6e1825a] APPLIED rdar://54572081
[319bd33] APPLIED rdar://54572081
[6c5b3ba] APPLIED rdar://54572081
[7e7677b] APPLIED rdar://54572081
[9002f70] APPLIED rdar://54572081
[cc04868] APPLIED rdar://54572081
[dc0dd64] APPLIED rdar://54572081
[a5f5a92] APPLIED rdar://54572081
[e5ba042] APPLIED rdar://54572081
[a3bff44] APPLIED rdar://54572081
[2e3d5c0] APPLIED rdar://54572081
[1482ec9] APPLIED rdar://54572081
[6bf6cb1] APPLIED rdar://54572081
[aa13cad] APPLIED rdar://54572081
[b073d89] APPLIED rdar://54572081
[7784917] APPLIED rdar://54572081
[717b3f7] APPLIED rdar://54572081
[37010f0] APPLIED rdar://54572081
[251dba4] APPLIED rdar://54572081
[a18aa1f] APPLIED rdar://54572081
[e8d020e] APPLIED rdar://54572081
[90a84a1] APPLIED rdar://54572081
[7721660] APPLIED rdar://54572081
[c5af10f] APPLIED rdar://54572081
[f01432d] APPLIED rdar://54572081
[d0394bf] APPLIED rdar://54572081
[2b14a98] APPLIED rdar://54572081
[d32596b] APPLIED rdar://54572081
[52bc6b2] APPLIED rdar://54572081
[4169c8d] APPLIED rdar://54572081
[318f6e5] APPLIED rdar://54572081
[6a36af8] APPLIED rdar://54572081
[d11d565] APPLIED rdar://54572081
[d9740c2] APPLIED rdar://54572081
[fc917b4] APPLIED rdar://54572081
[f911a44] APPLIED rdar://54572081
[6d32c4d] APPLIED rdar://54572081
[9005cb4] APPLIED rdar://54572081
[68875cb] APPLIED rdar://54572081
[fc73866] APPLIED rdar://54572081
[3cf1bf3] APPLIED rdar://54572081
[3da29dd] APPLIED rdar://81276248
[90a45ce] APPLIED rdar://81276248
[37c8c28] APPLIED rdar://81276248
[c023edd] APPLIED rdar://81276248
[ab8a151] APPLIED rdar://81276248
[c66cb25] APPLIED rdar://81276248
[289e552] APPLIED rdar://81276248
[afd6b6d] APPLIED rdar://81276248
[4c91d20] APPLIED rdar://81276248
[2accb0b] APPLIED rdar://81276248
[b0b314c] APPLIED rdar://81276248
[c992dac] APPLIED rdar://81276248
[80b1772] APPLIED rdar://81276248
[1986f39] APPLIED rdar://81276248
[598ce42] APPLIED rdar://81276248
[feb4421] APPLIED rdar://81276248
[f152471] APPLIED rdar://81276248
[457b110] APPLIED rdar://81276248
[f13ea5d] APPLIED rdar://81276248
[1c303fa] APPLIED rdar://81276248
[34f383d] APPLIED rdar://81276248
[7870521] APPLIED rdar://81276248
14 changes: 10 additions & 4 deletions config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
you don't. */
#define HAVE_DECL_VQ_VERYLOWDISK 1

/* Define to 1 if you have the declaration of `VQ_SERVEREVENT', and to 0 if
you don't. */
#define HAVE_DECL_VQ_SERVEREVENT 1

/* Define to 1 if you have the declaration of `VQ_QUOTA', and to 0 if
you don't. */
#define HAVE_DECL_VQ_QUOTA 1
Expand All @@ -73,10 +77,6 @@
you don't. */
#define HAVE_DECL_VQ_DESIRED_DISK 1

/* Define to 1 if you have the declaration of `VQ_FREE_SPACE_CHANGE', and to 0 if
you don't. */
#define HAVE_DECL_VQ_FREE_SPACE_CHANGE 1

/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1

Expand Down Expand Up @@ -125,6 +125,12 @@
/* Define if you have the Objective-C runtime */
#define HAVE_OBJC 1

/* Define to 1 if you have the `posix_fadvise' function. */
#define HAVE_POSIX_FADVISE 0

/* Define to 1 if you have the `posix_spawnp' function. */
#define HAVE_POSIX_SPAWNP 1

/* Define to 1 if you have the `pthread_key_init_np' function. */
#define HAVE_PTHREAD_KEY_INIT_NP 1

Expand Down
37 changes: 29 additions & 8 deletions dispatch/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,35 @@
#endif
#endif

#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) || defined(_WIN32)
#if __has_attribute(enum_extensibility)
#define __DISPATCH_ENUM_ATTR __attribute__((__enum_extensibility__(open)))
#define __DISPATCH_ENUM_ATTR_CLOSED __attribute__((__enum_extensibility__(closed)))
#else
#define __DISPATCH_ENUM_ATTR
#define __DISPATCH_ENUM_ATTR_CLOSED
#endif // __has_attribute(enum_extensibility)

#if __has_attribute(flag_enum)
#define __DISPATCH_OPTIONS_ATTR __attribute__((__flag_enum__))
#else
#define __DISPATCH_OPTIONS_ATTR
#endif // __has_attribute(flag_enum)


#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) || \
__has_extension(cxx_fixed_enum) || defined(_WIN32)
#define DISPATCH_ENUM(name, type, ...) \
typedef enum : type { __VA_ARGS__ } name##_t
typedef enum : type { __VA_ARGS__ } __DISPATCH_ENUM_ATTR name##_t
#define DISPATCH_OPTIONS(name, type, ...) \
typedef enum : type { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR name##_t
#else
#define DISPATCH_ENUM(name, type, ...) \
enum { __VA_ARGS__ }; typedef type name##_t
#endif
enum { __VA_ARGS__ } __DISPATCH_ENUM_ATTR; typedef type name##_t
#define DISPATCH_OPTIONS(name, type, ...) \
enum { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR; typedef type name##_t
#endif // __has_feature(objc_fixed_enum) ...



#if __has_feature(enumerator_attributes)
#define DISPATCH_ENUM_API_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__)
Expand All @@ -283,12 +305,11 @@
#define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...)
#endif

#if defined(SWIFT_SDK_OVERLAY_DISPATCH_EPOCH) && \
SWIFT_SDK_OVERLAY_DISPATCH_EPOCH >= 2
#ifdef __swift__
#define DISPATCH_SWIFT3_OVERLAY 1
#else
#else // __swift__
#define DISPATCH_SWIFT3_OVERLAY 0
#endif // SWIFT_SDK_OVERLAY_DISPATCH_EPOCH >= 2
#endif // __swift__

#if __has_feature(attribute_availability_swift)
#define DISPATCH_SWIFT_UNAVAILABLE(_msg) \
Expand Down
2 changes: 1 addition & 1 deletion dispatch/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ __BEGIN_DECLS
* for synchronous execution or when the dispatch block object is invoked
* directly.
*/
DISPATCH_ENUM(dispatch_block_flags, unsigned long,
DISPATCH_OPTIONS(dispatch_block_flags, unsigned long,
DISPATCH_BLOCK_BARRIER
DISPATCH_ENUM_API_AVAILABLE(macos(10.10), ios(8.0)) = 0x1,
DISPATCH_BLOCK_DETACHED
Expand Down
4 changes: 3 additions & 1 deletion dispatch/dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@
#endif
#endif

#define DISPATCH_API_VERSION 20180109
#define DISPATCH_API_VERSION 20181008

#ifndef __DISPATCH_BUILDING_DISPATCH__
#ifndef __DISPATCH_INDIRECT__
#define __DISPATCH_INDIRECT__
#endif

#include <os/object.h>
#include <os/workgroup.h>
#include <dispatch/base.h>
#include <dispatch/time.h>
#include <dispatch/object.h>
Expand All @@ -73,6 +74,7 @@
#include <dispatch/once.h>
#include <dispatch/data.h>
#include <dispatch/io.h>
#include <dispatch/workloop.h>

#undef __DISPATCH_INDIRECT__
#endif /* !__DISPATCH_BUILDING_DISPATCH__ */
Expand Down
58 changes: 58 additions & 0 deletions dispatch/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#include <dispatch/base.h> // for HeaderDoc
#endif

#if __has_include(<sys/qos.h>)
#include <sys/qos.h>
#endif

DISPATCH_ASSUME_NONNULL_BEGIN

/*!
Expand Down Expand Up @@ -95,6 +99,7 @@ typedef union {
struct dispatch_queue_attr_s *_dqa;
struct dispatch_group_s *_dg;
struct dispatch_source_s *_ds;
struct dispatch_channel_s *_dch;
struct dispatch_mach_s *_dm;
struct dispatch_mach_msg_s *_dmsg;
struct dispatch_semaphore_s *_dsema;
Expand Down Expand Up @@ -178,6 +183,16 @@ typedef void (^dispatch_block_t)(void);

__BEGIN_DECLS

/*!
* @typedef dispatch_qos_class_t
* Alias for qos_class_t type.
*/
#if __has_include(<sys/qos.h>)
typedef qos_class_t dispatch_qos_class_t;
#else
typedef unsigned int dispatch_qos_class_t;
#endif

/*!
* @function dispatch_retain
*
Expand Down Expand Up @@ -374,6 +389,49 @@ DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
void
dispatch_resume(dispatch_object_t object);

/*!
* @function dispatch_set_qos_class_floor
*
* @abstract
* Sets the QOS class floor on a dispatch queue, source or workloop.
*
* @discussion
* The QOS class of workitems submitted to this object asynchronously will be
* elevated to at least the specified QOS class floor. The QOS of the workitem
* will be used if higher than the floor even when the workitem has been created
* without "ENFORCE" semantics.
*
* Setting the QOS class floor is equivalent to the QOS effects of configuring
* a queue whose target queue has a QoS class set to the same value.
*
* @param object
* A dispatch queue, workloop, or source to configure.
* The object must be inactive.
*
* Passing another object type or an object that has been activated is undefined
* and will cause the process to be terminated.
*
* @param qos_class
* A QOS class value:
* - QOS_CLASS_USER_INTERACTIVE
* - QOS_CLASS_USER_INITIATED
* - QOS_CLASS_DEFAULT
* - QOS_CLASS_UTILITY
* - QOS_CLASS_BACKGROUND
* Passing any other value is undefined.
*
* @param relative_priority
* A relative priority within the QOS class. This value is a negative
* offset from the maximum supported scheduler priority for the given class.
* Passing a value greater than zero or less than QOS_MIN_RELATIVE_PRIORITY
* is undefined.
*/
API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))
DISPATCH_EXPORT DISPATCH_NOTHROW
void
dispatch_set_qos_class_floor(dispatch_object_t object,
dispatch_qos_class_t qos_class, int relative_priority);

#ifdef __BLOCKS__
/*!
* @function dispatch_wait
Expand Down
Loading