Commit Graph
7 Commits
Author SHA1 Message Date
Johannes Weiss fa35c603a0 on Darwin, sendfile might write fully and return EWOULDBLOCK 2017-12-15 16:58:12 +00:00
Norman Maurer 5fd753e1b7 Add documention for FileRegion 2017-12-15 11:06:07 +01:00
Max (Swift) Moiseev 198d6b447b Explicit access modifiers on members in extensions 2017-11-18 04:40:26 -08:00
Norman Maurer 68a475b37a Rename IOError.errno to IOError.errnoCode as errno is always in scope 2017-11-17 15:45:12 +01:00
Norman Maurer ba35fcb5a5 Move all syscalls that also need to handle errno in an extra file and ensure we not get any problems with invalid errno handling
* Move all syscalls that also need to handle errno in an extra file and ensure we not get any problems with invalid errno handling

Motivation:

Because it is possible ARC cause an syscall and so set the errno value we need to ensure no ARC can ever happen before we were able to read the errno value that was caused by an syscall we made.

Modifications:

Move all syscalls to an extra file (System.swift) and ensure all exposed methods are marked with `@inline(never)` and not capture any classes. This ensures no ARC can ever happen.

Result:

Be able to safely read errno if needed.

* Comments
2017-11-16 16:41:19 +01:00
Johannes Weiss 1adb581f59 remove more Foundation imports 2017-10-10 16:25:43 +01:00
Norman Maurer 1619c3d7c8 Add support for sendFile by allow to write a FileRegion. 2017-08-11 20:32:04 +02:00