Andrew Kelley
39befc35a8
update comment in std/os/index.zig
2018-04-29 22:31:42 -04:00
Andrew Kelley
f37e79e720
Merge pull request #963 from zig-lang/atomic-stack-and-queue
...
Atomic stack and queue
2018-04-29 12:29:40 -04:00
Andrew Kelley
c76b0a845f
fix std threads for linux
2018-04-29 02:56:59 -04:00
Andrew Kelley
b21bcbd775
fix std threads for macos
2018-04-29 02:52:04 -04:00
Andrew Kelley
6376d96824
support kernel threads for windows
...
* remove std.os.spawnThreadAllocator - windows does not support
an explicit stack, so using an allocator for a thread stack
space does not work.
* std.os.spawnThread - instead of accepting a stack argument, the
implementation will directly allocate using OS-specific APIs.
2018-04-29 02:40:22 -04:00
Andrew Kelley
bf8e419d2b
linux uses pthreads when linking against libc
2018-04-29 00:40:04 -04:00
Andrew Kelley
a425420993
make pthreads threads work on darwin
...
darwin pthreads adds a restriction that the stack start and end
must be page aligned
2018-04-29 00:07:32 -04:00
Andrew Kelley
998e25a01e
pthread support working
2018-04-28 23:47:39 -04:00
Andrew Kelley
a344cb03bc
*WIP* use pthreads when linking libc
2018-04-28 23:30:13 -04:00
Andrew Kelley
ec2a81a081
fix compiler-rt ABI for x86_64 windows
2018-04-28 22:03:07 -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
ca4053ba49
Use std.os.errorUnexpectedPosix if timer initialization encounters unexpected error
2018-04-19 14:53:58 -05:00
tgschultz
89eade0548
Style cleanups, u64 casts, Timer.start returns error instead of unreachable on unexpected errno.
2018-04-19 10:01:41 -05:00
tgschultz
3c9b6f8cd5
Fixed another incorrect comment
2018-04-18 19:57:47 -05:00
tgschultz
fdebe38fa3
Added notes regarding CLOCK_MONOTONIC_RAW and made it easy to change our mind in the future.
...
Updated std.os imported tests' block with lazy declaration workaround and added time.zig.
Corrected some incorrect comments.
2018-04-18 19:48:19 -05:00
tgschultz
5c83d271a3
Fixed incorrect sign on epoch.clr
2018-04-18 18:50:28 -05:00
tgschultz
7cfe328a16
fixed typos.
2018-04-18 17:43:35 -05:00
tgschultz
bf9cf28322
Fixed compiler errors around darwin code.
2018-04-18 15:46:50 -05:00
tgschultz
8b66dd8c7d
Added unstaged changes.
2018-04-18 13:55:42 -05:00
tgschultz
c90f936eef
Added timestamp, high-perf. timer functions.
2018-04-18 13:52:25 -05:00
Andrew Kelley
b9360640ce
add @atomicLoad builtin
...
See #174
2018-04-15 18:12:00 -04: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
Andrea Orru
06614b3fa0
Merge branch 'master' into zen_stdlib
2018-04-13 11:11:21 -07:00
Andrea Orru
d2c672ab0c
FIXME note
2018-04-13 11:10:36 -07:00
Marc Tiehuis
fe9489ad63
Fix windows access check
2018-04-13 22:50:57 +12:00
Marc Tiehuis
03bec631bd
Replace File.exists with File.access
2018-04-13 21:27:09 +12:00
Andrea Orru
c5f088e52c
Pass up to 5 arguments in Zen IPC
2018-04-12 22:24:57 -07:00
Andrew Kelley
c43f77f109
fix invalid implicit cast on macos
2018-04-12 10:38:32 -04:00
Marc Tiehuis
803f0a295b
Revise self-hosted command line interface
...
Commands are now separated more precisely from one another. Arguments
are parsed mostly using a custom argument parser instead of manually.
This should be on parity feature-wise with the previous main.zig but
adds a few extra code-paths as well that were not yet implemented.
Subcommands are much more prominent and consistent. The first argument
is always a sub-command and then all following arguments refer to that
command. Different commands display there own usage messages and options
based on what they can do instead of a one-for-all usage message that
was only applicable for the build commands previously.
The `cc` command is added and is intended for driving a c compiler. See #490 .
This is currently a wrapper over the system cc and assumes that it
exists, but it should suffice as a starting point.
2018-04-12 22:28:47 +12:00
Andrea Orru
70f2bb03fd
outb syscall
2018-04-11 23:11:26 -07:00
Andrea Orru
135a335ce1
Merge branch 'master' into zen_stdlib
2018-04-11 00:33:19 -07:00
Andrea Orru
b01c5a95c4
Update zen library
2018-04-11 00:31:32 -07: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
cbda0fa78c
basic tcp server working when used with netcat
2018-04-08 20:08:40 -04:00
Andrew Kelley
0d22a00f6f
*WIP* async/await TCP server
2018-04-08 18:26:24 -04:00
Andrew Kelley
abd389209b
fix up logic for macos std.os.deleteTree
2018-04-04 00:08:10 -04:00
Andrew Kelley
e1e536e03d
Merge branch 'wip-macos-dirent' of https://github.com/hellerve/zig into hellerve-wip-macos-dirent
2018-04-03 23:33:18 -04:00
Andrew Kelley
9dfd1a7c8a
remove more signal handling stuff from std.os.ChildProcess
...
439621e44a68b436f958a84fcdb0bdac83613aea failed to remove
everything. this finishes the job
2018-04-03 18:26:49 -04:00
hellerve
7e951e5043
st/os: address @andrewrk concerns
2018-03-29 10:23:44 +02:00
Andrew Kelley
f5b43ada46
std/os: getting dir entries works on OS X
2018-03-28 12:06:48 +02:00
Andrew Kelley
0b7b3190fd
fix bitrotted code in unexpected error tracing
2018-03-27 10:44:13 -04:00
Andrew Kelley
2cff31937f
std.os.linux exposes syscall functions and syscall numbers
2018-03-24 15:57:36 -04:00
Marc Tiehuis
7350181a4a
Fix os.File.mode function
2018-03-23 22:41:08 +13:00
Andrea Orru
43cdfa275a
Zen specific hacks
2018-03-20 16:09:30 -04:00
Andrea Orru
0082ed0ef1
Public SplitIterator
2018-03-20 11:40:33 -04:00
Andrea Orru
935f10502f
Message type, Undefined mailbox, read syscall, more constructors
2018-03-18 14:45:23 -04:00
Andrea Orru
df3d2115b5
Service -> Server
2018-03-16 20:27:13 -07:00