Andrew Kelley
c4b9466da7
Merge pull request #1294 from ziglang/async-fs
...
introduce std.event.fs for async file system functions
2018-08-10 15:51:17 -04:00
Andrew Kelley
0a3ae9dc6e
fix std.os.Thread.getCurrentId for linux
2018-08-06 16:48:49 -04:00
Andrew Kelley
2680f9ab48
Merge remote-tracking branch 'origin/master' into async-fs
2018-08-03 18:47:30 -04:00
Matthew D. Steele
dcaaa241df
Fix a type error in std.os.linux.getpid() ( #1326 )
...
syscall0() returns usize, but we were trying to @bitCast to i32.
2018-08-03 11:45:23 -04:00
Andrew Kelley
3c8d4e04ea
std: file system watching for linux
2018-07-30 13:46:09 -04:00
Andrew Kelley
cc45527333
introduce std.event.fs for async file system functions
...
only works on linux so far
2018-07-30 13:44:36 -04:00
Andrew Kelley
c15a6fa9d0
add std.os.cpuCount and have std.event.Loop use it for thread pool size
2018-07-07 01:23:18 -04:00
Andrew Kelley
eb326e1553
M:N threading
...
* add std.atomic.QueueMpsc.isEmpty
* make std.debug.global_allocator thread-safe
* std.event.Loop: now you have to choose between
- initSingleThreaded
- initMultiThreaded
* std.event.Loop multiplexes coroutines onto kernel threads
* Remove std.event.Loop.stop. Instead the event loop run() function
returns once there are no pending coroutines.
* fix crash in ir.cpp for calling methods under some conditions
* small progress self-hosted compiler, analyzing top level declarations
* Introduce std.event.Lock for synchronizing coroutines
* introduce std.event.Locked(T) for data that only 1 coroutine should
modify at once.
* make the self hosted compiler use multi threaded event loop
* make std.heap.DirectAllocator thread-safe
See #174
TODO:
* call sched_getaffinity instead of hard coding thread pool size 4
* support for Windows and MacOS
* #1194
* #1197
2018-07-07 00:32:19 -04:00
Andrew Kelley
7912061226
remove integer and float casting syntax
...
* add `@intCast`
* add `@floatCast`
* add `@floatToInt`
* add `@intToFloat`
See #1061
2018-06-17 02:57:07 -04:00
Andrew Kelley
77678b2cbc
breaking syntax change: orelse keyword instead of ?? ( #1096 )
...
use the `zig-fmt-optional-default` branch to have zig fmt
automatically do the changes.
closes #1023
2018-06-10 01:13:51 -04:00
Andrew Kelley
ec1b6f6673
breaking syntax change: ??x to x.? ( #1095 )
...
See #1023
This also renames Nullable/Maybe to Optional
2018-06-09 23:42:14 -04:00
Andrew Kelley
96164ce613
disallow single-item pointer indexing
...
add pointer arithmetic for unknown length pointer
2018-06-04 01:39:57 -04:00
Andrew Kelley
fcbb7426fa
use * for pointer type instead of &
...
See #770
To help automatically translate code, see the
zig-fmt-pointer-reform-2 branch.
This will convert all & into *. Due to the syntax
ambiguity (which is why we are making this change),
even address-of & will turn into *, so you'll have
to manually fix thes instances. You will be guaranteed
to get compile errors for them - expected 'type', found 'foo'
2018-05-31 17:28:07 -04:00
Andrew Kelley
ea58f4a5a9
run zig fmt on the codebase
2018-05-30 16:09:11 -04:00
Andrew Kelley
0c16cd2d0e
run zig fmt on the codebase
...
See #1003
2018-05-29 04:23:38 -04:00
Andrew Kelley
ac4d55dec1
behavior tests passing with new pointer deref syntax
2018-05-01 01:53:04 -04:00
Andrew Kelley
b21bcbd775
fix std threads for macos
2018-04-29 02:52:04 -04:00
Andrew Kelley
21767144fc
linux: support VDSO for clock_gettime
...
also fix a compiler crash when using cmpxchg with nullable pointer
2018-04-22 18:11:50 -04:00
Andrew Kelley
da2af9c613
fixups
2018-04-22 13:36:26 -04:00
Andrew Kelley
0dcadc61b4
Merge branch 'std.os.time' of https://github.com/tgschultz/zig into tgschultz-std.os.time
2018-04-22 13:24:25 -04:00
tgschultz
7cfe328a16
fixed typos.
2018-04-18 17:43:35 -05:00
tgschultz
8b66dd8c7d
Added unstaged changes.
2018-04-18 13:55:42 -05:00
Andrew Kelley
b7af9edb8a
add std.os.createThread
...
this adds kernel thread support to the standard library for
linux.
See #174
2018-04-14 02:24:05 -04:00
Marc Tiehuis
03bec631bd
Replace File.exists with File.access
2018-04-13 21:27:09 +12:00
Andrew Kelley
2ec1cec92d
add more linux syscalls and constants
...
Based on #904 by tgshultz
2018-04-10 23:29:24 -04:00
Andrew Kelley
e85a10e9f5
async tcp server proof of concept
2018-04-09 00:52:45 -04:00
Andrew Kelley
0d22a00f6f
*WIP* async/await TCP server
2018-04-08 18:26:24 -04:00
Andrew Kelley
f5b43ada46
std/os: getting dir entries works on OS X
2018-03-28 12:06:48 +02:00
Andrew Kelley
2cff31937f
std.os.linux exposes syscall functions and syscall numbers
2018-03-24 15:57:36 -04:00
Andrea Orru
f25c1c6858
Fixed syntax errors in linux-i386 syscalls
2018-03-09 22:25:21 -08:00
Andrew Kelley
bde15cf080
improve std lib linux epoll API
2018-02-17 17:53:07 -05:00
Andrew Kelley
f9be970375
Merge remote-tracking branch 'origin/master' into error-sets
2018-02-08 20:45:26 -05:00
Andrew Kelley
44d8d654a0
fix test failure, organize code, add new compile error
2018-02-05 09:26:39 -05:00