Andrew Kelley
0043cdbeca
Revert "std.c: further darwin's host statistics data"
...
This reverts commit cceadf52baff2590c1b38c469b1177918183dfe8.
2023-07-31 11:03:52 -07:00
Andrew Kelley
faa6daef99
Revert "std.c: darwin's *copyfile api update."
...
This reverts commit 40e8c2243c139dc499298645a2b387e30ae09cba.
2023-07-31 10:57:06 -07:00
Andrew Kelley
1b9ffa0824
Revert "std.Thread: refining stack size from platform minimum, changes more targetted towards platform like Linux/musl ( #15791 )"
...
This reverts commit 41502c6aa53a3da31b276c23c4db74db7d04796b.
2023-07-31 10:54:35 -07:00
Andrew Kelley
ba3b352891
Revert "std.os: fix uname usage."
...
This reverts commit 138f1253deb48434af707ec5e9124e889520be08.
2023-07-31 10:52:12 -07:00
Andrew Kelley
004711310a
Revert "std.c: fix host_basic_info definition for darwin."
...
This reverts commit ea1d64dae4bb34d62e9cfddf7e3da493ed8063e9.
2023-07-31 10:50:22 -07:00
Lauri Tirkkonen
972e70b794
darwin: drop underscore from SIG._{BLOCK,UNBLOCK,SETMASK}
...
this makes them match decls in other OSes
2023-07-25 13:49:08 -07:00
kcbanner
576ffaa329
darwin: update mcontext_t definition for aarch64 to add neon state
2023-07-20 22:58:14 -04:00
kcbanner
412cd789bf
debug: fixup base address calculations for macho
...
dwarf: fixup x86 register mapping logic
dwarf: change the register context update to update in-place instead of copying
debug: always print the unwind error type
2023-07-20 22:58:14 -04:00
mlugg
f26dda2117
all: migrate code to new cast builtin syntax
...
Most of this migration was performed automatically with `zig fmt`. There
were a few exceptions which I had to manually fix:
* `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten
* `@truncate`'s fixup is incorrect for vectors
* Test cases are not formatted, and their error locations change
2023-06-24 16:56:39 -07:00
David CARLIER
ea1d64dae4
std.c: fix host_basic_info definition for darwin.
...
follow-up on ff59c45.
ref: a5e15eced0/lib/libc/include/any-macos-any/mach/host_info.h (L116)
2023-06-24 13:00:14 -07:00
Eric Joldasov
50339f595a
all: zig fmt and rename "@XToY" to "@YFromX"
...
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00
David CARLIER
138f1253de
std.os: fix uname usage.
...
close #15839 .
2023-05-29 22:08:43 +03:00
David CARLIER
41502c6aa5
std.Thread: refining stack size from platform minimum, changes more targetted towards platform like Linux/musl ( #15791 )
2023-05-25 14:32:17 -05:00
David CARLIER
40e8c2243c
std.c: darwin's *copyfile api update.
2023-05-17 06:06:41 +03:00
David CARLIER
cceadf52ba
std.c: further darwin's host statistics data
2023-05-13 11:55:43 +03:00
David CARLIER
6547d23312
std.c: adding basic darwin's host_statistics data.
2023-05-12 20:20:31 +03:00
Veikka Tuominen
d761e6cc7d
fix formatting in darwin.zig
2023-05-11 14:59:19 +03:00
David CARLIER
20cc69318f
std.c: darwin adding more host_info api data
2023-05-11 11:21:07 +03:00
David CARLIER
ff59c45840
std.c: darwin add host_info based data.
2023-05-07 17:05:03 +03:00
David CARLIER
4bfd37ddb4
std.c: adding cpu affinity api for macOs (mainly x86_64)
2023-05-06 00:55:20 +03:00
Veikka Tuominen
a111130977
Merge pull request #15317 from devnexen/darwin_rand_nativegen
...
std: add CCRandomGenerateBytes macOs native api.
2023-05-05 19:52:05 +03:00
David CARLIER
012f9a97eb
std.c: add os_proc_available_memory for darwin
2023-05-04 10:13:11 +03:00
Linus Groh
94e30a756e
std: fix a bunch of typos
...
The majority of these are in comments, some in doc comments which might
affect the generated documentation, and a few in parameter names -
nothing that should be breaking, however.
2023-04-30 18:16:04 -07:00
David CARLIER
05f9608115
std.c: add mincore api to darwin.
2023-04-29 14:25:37 +03:00
Andrew Kelley
a5c910adb6
change semantics of @memcpy and @memset
...
Now they use slices or array pointers with any element type instead of
requiring byte pointers.
This is a breaking enhancement to the language.
The safety check for overlapping pointers will be implemented in a
future commit.
closes #14040
2023-04-25 11:23:40 -07:00
David CARLIER
7b0e015eb4
std: add a subset of the macOs's libproc api.
2023-04-23 19:45:46 +03:00
David CARLIER
c579a23c5d
std: add CCRandomGenerateBytes macOs native api.
2023-04-22 21:01:12 +01:00
David CARLIER
3e467c778a
std: add os_log/signpost api (sort of linux's perf event equivalent)
...
subset.
2023-04-06 07:31:06 +03:00
David CARLIER
f86f531e9c
std: add a subset of the apple's QOS api
2023-04-05 09:01:35 +02:00
David CARLIER
1de64dba23
std: add the VM_MAKE_TAG macro for darwin.
2023-03-26 23:56:27 +02:00
Jakub Konka
6f15eedff1
darwin: put posix spawn constants in POSIX_SPAWN struct
2023-03-18 21:54:05 +01:00
Jakub Konka
37192bcdcb
macos: HCS PoC working
2023-03-18 21:53:36 +01:00
Jakub Konka
266c81322e
darwin: resurrect posix_spawn wrappers
2023-03-18 21:53:15 +01:00
Jakub Konka
e1e414e62a
std: move os/darwin.zig and related to c/darwin.zig
...
Move to c/darwin.zig as they really are libSystem/libc imports/wrappers.
As an added bonus, get rid of the nasty `usingnamespace`s which are now
unneeded.
Finally, add `os.ptrace` but currently only implemented on darwin.
2023-03-16 11:42:30 +01:00
Andrew Kelley
cd0d514643
remove the experimental std.x namespace
...
Playtime is over. I'm working on networking now.
2023-01-02 16:57:15 -07:00
Jakub Konka
ec2697b7ea
darwin: add even more wrappers for Mach syscalls
...
Rename `ThreadId` to `MachThread`.
2022-12-14 00:10:26 +01:00
Jakub Konka
f505cb96f4
darwin: add thread_act_t wrapper and helpers
2022-12-13 12:53:10 +01:00
Jakub Konka
2efd0eb884
darwin: wrap task_threads mach syscall
2022-12-13 11:36:00 +01:00
Jakub Konka
6f5eb9927d
darwin: add more defs and wrappers
2022-12-12 20:04:46 +01:00
Jakub Konka
612b9f4da1
darwin: add defs and funcs for Mach exception handling
2022-12-12 00:13:37 +01:00
Jakub Konka
402dfb5fd3
darwin: wrap mach_port_insert_right kernel call
2022-12-11 18:27:10 +01:00
Jakub Konka
2a65971eb0
darwin: wrap allocating and deallocating mach ports for a task
2022-12-11 14:40:27 +01:00
Andrew Kelley
50eb7983cd
remove most conditional compilation based on stage1
...
There are still a few occurrences of "stage1" in the standard library
and self-hosted compiler source, however, these instances need a bit
more careful inspection to ensure no breakage.
2022-12-06 20:38:54 -07:00
Ryan Schneider
7f1f2e653d
std.os: fix alignment of Sigaction.handler_fn
...
Fixes #13216
2022-11-04 08:00:50 -07:00
Ryan Liptak
33fdc43714
std.fs: Add MAX_NAME_BYTES
...
Also add some NAME_MAX or equivalent definitions where necessary
2022-10-29 14:30:43 -07:00
Ali Chraghi
fb366f3cd4
std.c: fix incorrect return types
...
Closes #12964
2022-10-13 13:21:19 +02:00
ominitay
295451dfe5
std: Replace use of stage1 function pointers
2022-09-29 21:45:30 +03:00
Bill Nagel
eeeda53423
add missing darwin types
2022-09-23 12:25:40 +03:00
Isaac Freund
b78f3bf1f1
std: fix definition of SIG_IGN, SIG_DFL, etc.
...
POSIX specifies that the sa_handler field of the sigaction struct may
be set to SIG_IGN or SIG_DFL. However, the current constants in the
standard library use the function pointer signature corresponding to
the sa_sigaction field instead.
This may not cause issues in practice because the fields usually occupy
the same memory in a union, but this isn't required by POSIX and there
may be systems we do not yet support that do this differently.
Fixing this also makes the Zig interface less confusing to use after
reading the man page.
2022-08-11 12:09:34 +02:00
Andrew Kelley
9c5056788f
std: update bsd bits to new fn ptr semantics
2022-07-04 13:02:30 -07:00