Guillaume Lessard
882466a730
apply missing availability attributes to Mach.Port
2023-10-13 18:55:23 -07:00
Guillaume Lessard
b92be8a02a
Update availability declarations for swift-system 1.1.0 API
2023-10-13 10:21:57 -07:00
Guillaume Lessard
495f729347
[noncopyability] explicitly prevent a capture
...
This may be needed because of a bug involving resilient structs.
2023-10-12 15:01:08 -07:00
Guillaume Lessard
7654f14f8c
[gardening] add some more availability annotations
2023-10-11 14:28:43 -07:00
Guillaume Lessard
0e060b7a7a
Merge pull request #144 from kateinoigakukun/katei/fix-rename-typo
...
Fix typos in renaming message for `Errno`
2023-09-07 15:21:20 -07:00
Yuta Saito
1ccaee141c
Fix typos in renaming message for Errno
2023-09-05 11:36:08 -07:00
Guillaume Lessard
8a8552f617
Merge pull request #129 from glessard/reenable-mach-port
...
Re-enable Mach.Port
2023-08-16 16:04:53 -07:00
Guillaume Lessard
87e68fca36
declare Sendable conformances along with the types
...
- `Sendable` is fundamental, it is preferably not declared as an extension.
2023-08-16 11:19:06 -07:00
Guillaume Lessard
f32faad415
remove code depending on Swift older than 5.6
2023-08-16 11:02:51 -07:00
Guillaume Lessard
8730f2cf25
[gardening] 80-column enforcement
2023-08-15 09:34:05 -07:00
Guillaume Lessard
65693b8b80
improve memory rebinding for mach_port_get_attributes call
2023-08-15 09:11:46 -07:00
Guillaume Lessard
6189c1f553
fix copySendRight() for send rights that become dead names
2023-08-11 14:09:44 -07:00
Guillaume Lessard
e4d06ae3ea
simplify deinit
2023-08-10 15:35:27 -07:00
Guillaume Lessard
d259ef476e
test two-parameter withBorrowedName
2023-08-10 15:35:27 -07:00
Guillaume Lessard
5e03246e4e
test copies of dead mach port names
2023-08-10 15:32:19 -07:00
Guillaume Lessard
40b5b3068b
test all the relinquish() methods
2023-08-10 15:32:19 -07:00
Guillaume Lessard
e8bb779909
use inout conversion
...
- this is the situation where it is appropriate
2023-08-10 15:32:19 -07:00
Guillaume Lessard
6ee96ffdb5
modify consuming methods to call discard self
2023-08-09 15:58:56 -07:00
Guillaume Lessard
9123120c08
destroy Send rights with mach_port_deallocate
2023-08-09 15:58:56 -07:00
Daniel Loffgren
2df5b0b031
srdelta argument to mach_port_destruct should be zero
...
This should never have been -1, as there is no send right for
it to balance when `RightType.self == ReceiveRight.self`.
2023-08-09 15:58:56 -07:00
Guillaume Lessard
af4544c869
Re-enable Mach.Port
2023-08-09 15:58:56 -07:00
Max Desiatov
0062c82c90
Add support for Musl libc ( #133 )
...
Since Musl is sufficiently different from Glibc (see https://wiki.musl-libc.org/functional-differences-from-glibc.html ), it requires a different import, which now should be applied to files that have `import Glibc` in them.
2023-07-04 16:50:13 +01:00
Guillaume Lessard
adbf8d2856
Add availability attributes to Sendable conformances
2023-06-21 14:50:47 -07:00
Alex Martini
1d1bef36c9
Fix abstracts to follow reference style.
...
- Use a present tense verb phrase
- Avoid repeating the symbol's name
2023-06-21 10:26:04 -07:00
Guillaume Lessard
a74751c99c
Merge pull request #128 from apple/maxd/fix-comment-typo
...
FilePathSyntax.swift: fix doc comment typo
2023-06-10 00:18:26 -07:00
Guillaume Lessard
7bcc01f0bf
deactivate Mach.Port
...
Will reactivate when the following issue is fixed:
https://github.com/apple/swift/issues/66299 (rdar://110496872)
2023-06-09 16:46:48 -07:00
Guillaume Lessard
6bbed6b199
update non-copyable type declaration syntax
2023-06-09 16:40:32 -07:00
Daniel Loffgren
5b1b4cab56
Remove allocatePortRightPair(), as move only types are not permitted in tuples
2023-06-09 16:40:32 -07:00
Max Desiatov
7c6609eaca
FilePathSyntax.swift: fix doc comment typo
...
`Appliations` -> `Applications`
2023-06-01 17:01:30 +01:00
Karoy Lorentey
bb6ab43e44
Update availability declarations
2023-03-01 18:10:40 -08:00
Karoy Lorentey
e708e4adda
Mach: Avoid non-inlinable generics where possible
...
- Leave Ports as non-frozen for now, but expose its two stored
properties.
- Make most members inlinable. The core initializers and the
deinitializer must remain opaque for now.
- Mark the empty `MachPortRight` types as `@frozen` — these are
markers, not carrying any data.
rdar://106057781
2023-02-28 17:05:18 -08:00
Karoy Lorentey
cc96d40bee
Merge pull request #76 from apple/lorentey/post-back-ios15-system
...
Update package with changes from recent ABI stable releases
2023-02-28 16:13:44 -08:00
loffgren
9cdaaa356e
Merge pull request #121 from loffgren/machport_fixes
...
Mach.Port: Tidiness
2023-02-22 09:55:03 -08:00
Daniel Loffgren
16c7885387
Move public annotations from extensions down to each function explicitly
2023-02-21 16:03:31 -08:00
Daniel Loffgren
0fb71dd6ad
Fit all function signatures within 80 cols
2023-02-13 23:53:06 -08:00
Daniel Loffgren
16a2775645
Annotate entire Mach namespace as being available in System 1.3.0
2023-02-13 17:53:42 -08:00
Daniel Loffgren
13bf719c29
Freeze the Mach namespace, as it should only ever be used as a namespace
2023-02-10 18:04:55 -08:00
Daniel Loffgren
3750b96b2e
name and context should have leading underscores
2023-02-10 18:03:31 -08:00
Daniel Loffgren
12baba9706
machPrecondition should have a leading underscore
2023-02-10 17:59:16 -08:00
Alex Martini
2c2a831f66
Remove blank lines at the end of doc comments.
2023-01-31 12:35:33 -08:00
Alex Martini
deb56e1ad2
Keep doc comments immediately before declarations.
...
If there's anything between them, DocC doesn't recognize that the doc
comment belongs to the declaration that comes after the interruption,
resulting in that declaration being undocumented.
2023-01-31 12:07:17 -08:00
Max Desiatov
3f66dfbaf8
MachPort: fix build issues with Swift 5.7
...
It seems that `#if $MoveOnly` check has no effect on Swift 5.7, so we should check whether Swift 5.8 or later are available first.
Resolves #117 .
2023-01-05 10:58:04 +00:00
Daniel Loffgren
700b8f867e
Use two space indentation
2022-12-22 18:01:40 -08:00
loffgren and Karoy Lorentey
d129f62ce9
Use Markdown code voice for initializer comment
...
Co-authored-by: Karoy Lorentey <klorentey@apple.com >
2022-12-22 17:12:26 -08:00
loffgren and Michael Ilseman
ae6b1f24a9
Remove space before inheritance colon
...
Co-authored-by: Michael Ilseman <michael.ilseman@gmail.com >
2022-12-22 14:52:36 -08:00
Daniel Loffgren
6a9ebce259
Add public annotations where applicable
2022-12-21 13:20:38 -08:00
Daniel Loffgren
7f4560f022
Remove unnecessary RightTypes for Mach.Ports being constructed inline with a return
2022-12-21 13:12:13 -08:00
Daniel Loffgren
6dd57fe3a9
Add a friendly precondition message for the MACH_PORT_NULL check
2022-12-21 12:57:25 -08:00
Daniel Loffgren
551d7b897f
Use mach_port_destruct() to deinit receive rights eliminating the second syscall, and use mach_port_mod_refs() for all other right types to get a free type check at deinit time
...
mach_port_mod_refs() requires the type of right being modified. So,
MACH_PORT_DEAD must be identified as a separate type. As this is
something that shouldn't be possible for receive rights, preconditions
have also been added to protect against this particular error.
2022-12-21 12:53:47 -08:00
Daniel Loffgren
296374ecef
Label tuple contents for allocatePortPair() and relinquish()
2022-12-21 11:46:06 -08:00