Commit Graph

1000 Commits

Author SHA1 Message Date
Laytan Laats
460e2629bd sys/posix: add MAP_ANONYMOUS 2024-12-01 11:54:54 +11:00
Laytan Laats
468c0b573a add missing macos version 2024-12-01 11:54:54 +11:00
Laytan Laats
d94ef8d27a sys/posix: fix dirfd on netbsd 2024-12-01 11:54:54 +11:00
NicknEma
f8ba86e0a6 Fix integer type
Change int to i32 so it is the correct size
2024-12-01 11:54:54 +11:00
A1029384756
9e520c38db core:sys/linux - prefixing + moved IN_CLOSE/IN_MOVE to constants 2024-12-01 11:54:54 +11:00
A1029384756
59adcf6c46 core:sys/linux - flags, spacing, inotify_init 2024-12-01 11:54:54 +11:00
A1029384756
f6b0ea160b core:sys/linux - fixed vet errors 2024-12-01 11:54:54 +11:00
A1029384756
be66d4bd8b core:sys/linux - implemented inotify
core:sys/linux - added constants and spacing
2024-12-01 11:54:53 +11:00
Alex Overstreet
357d6212d0 Use tabs instead of spaces 2024-12-01 11:54:53 +11:00
Alex Overstreet
522f05445e Add STICKYKEYS, TOGGLEKEYS, and FILTERKEYS 2024-12-01 11:54:53 +11:00
Sebastian Pahnke
a0561860f9 Add NSApplication bindings for mainWindow and keyWindow 2024-12-01 11:54:53 +11:00
p2jason
62d30daa00 Increase size of JS keyboard event key/code buffer size 2024-12-01 11:54:53 +11:00
A1029384756
943b09a8b1 added unlinking section to posix socket binding documentation 2024-12-01 11:54:53 +11:00
NicknEma
1b7a32f76c Mark procs as "contextless" in winerror.odin
So that they can be called from places like the windproc and stuff.
2024-12-01 11:54:52 +11:00
p2jason
ee84aa4ead Removed event hook callback from add_*_event_listener functions 2024-12-01 11:54:52 +11:00
p2jason
f993fcb82c Removed event queue from add_*_event_listener JS functions and added event hook callback 2024-12-01 11:54:52 +11:00
p2jason
aa08f661ca Changed boolean parameters to bit set in the add_*_event_listener functions 2024-12-01 11:54:52 +11:00
p2jason
0eac9f15bc Added parameters to the add_*_event_listener JS functions for stopping event behavior 2024-12-01 11:54:52 +11:00
Laytan Laats
9adc7f2bcf fix tabs 2024-12-01 11:54:52 +11:00
Laytan Laats
c08408ea08 fix thread_unix for Darwin after pthread corrections in posix package
afed3ce removed the sys/unix package and moved over to sys/posix, it has
new bindings for the pthread APIs but should have been equivalent (not).

8fb7182 used `CANCEL_ENABLE :: 0`, `CANCEL_DISABLE :: 1`, `CANCEL_DEFERRED :: 0`, `CANCEL_ASYNCHRONOUS :: 1` for Darwin, while the
correct values are `1`, `0`, `2` and `0` respectively (same mistake was made for
FreeBSD in that commit).

What this meant is that the
`pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS)` was not actually
successful, but because the error wasn't checked it was assumed it was.
It also meant `pthread_setcancelstate(PTHREAD_CANCEL_ENABLE)` would
actually be setting `PTHREAD_CANCEL_DISABLE`.

The code in this PR restores the behaviour by now actually deliberately
setting `PTHREAD_CANCEL_DISABLE` and not setting
`PTHREAD_CANCEL_ASYNCHRONOUS` which was the previous behaviour that does
actually seem to work for some reason.

(I also fixed an issue in fmt where `x` would use uppercase if it was a
pointer.)
2024-12-01 11:54:52 +11:00
Laytan
78dc4d4907 fix test 2024-12-01 11:54:51 +11:00
Laytan
9f1c894f1f port pthread_mutex_t and pthread_cond_t from sys/unix cause miniaudio wants it 2024-12-01 11:54:51 +11:00
Laytan
2b5f0fc729 remove pthread from sys/unix and use sys/posix where used 2024-12-01 11:54:51 +11:00
Laytan Laats
49ddbd9b99 sys/posix: impl rest of linux, impl some of Windows 2024-12-01 11:54:51 +11:00
Laytan Laats
d185ab5991 sys/wasm/js: add set_element_style 2024-12-01 11:54:51 +11:00
Colin Davidson
fc9983e9c8 Initial cut of timezones 2024-12-01 11:54:50 +11:00
Laytan
2141299d2b Merge pull request #4376 from Barinzaya/sysinfo-avx512
core:sys/info AVX-512 CPU Features
2024-10-16 19:46:01 +02:00
Barinzaya
872a29752c Renamed and trimmed AVX-512 features in sys/info.
Removed underscores from the AVX-512 names in `CPU_Feature` to make them match their equivalent LLVM target features. Removed 4FMAPs and 4VNNIW as there aren't matching LLVM target features.
2024-10-15 05:21:35 -04:00
Laytan Laats
7989d512a0 add macos 15.0.1 to odin report and core/sys/info 2024-10-14 16:19:03 +02:00
Barinzaya
ff35a59548 Fixed a theoretical edge case in AVX512VL support detection. 2024-10-14 09:13:27 -04:00
Barinzaya
c93923c9f7 Fixed formatting. 2024-10-14 08:53:16 -04:00
Barinzaya
0e4ed515b9 Added AVX-512 feature detection to core:sys/info. 2024-10-14 08:20:23 -04:00
Laytan
0157ff1541 Merge pull request #4118 from andradei/posix-linux
Linux POSIX support
2024-10-13 20:05:03 +02:00
Beau McCartney
e240c034de aliases to enum members are other enum members, not constants 2024-10-12 20:11:46 -06:00
Laytan
16eac6c844 Merge pull request #4357 from beaumccartney/mach-vm-apis
bindings, types, and constants for some mach vm apis
2024-10-10 20:04:20 +02:00
Beau McCartney
77cf4373a8 sync policy enum 2024-10-10 11:24:55 -06:00
Beau McCartney
4fffd1b271 kern return: doc comments above enum members 2024-10-10 11:12:42 -06:00
Beau McCartney
66c902406d align by space instead of colon 2024-10-10 11:09:06 -06:00
Beau McCartney
3aae1740c7 proc ( -> proc( 2024-10-10 11:03:55 -06:00
Beau McCartney
b0ff41e673 indent with tabs not spaces 2024-10-08 19:08:13 -06:00
Beau McCartney
41c717de3f vm_flags as a bitset 2024-10-08 19:08:13 -06:00
Beau McCartney
fee99c0800 move doc comment to right spot 2024-10-08 13:41:13 -06:00
Beau McCartney
58745bc7ae use b32 for boolean_t 2024-10-08 13:39:53 -06:00
Beau McCartney
27753ff7a8 VM_INHERIT_* as an enum 2024-10-08 12:51:18 -06:00
Beau McCartney
9004441e43 VM_PROT_* flags as a bitset 2024-10-08 12:51:12 -06:00
Beau McCartney
2695b269a4 kern return as an enum 2024-10-08 12:44:49 -06:00
Beau McCartney
67252ff415 make some types and procs match the c apis
procs:
| type          | old  | new (matching c api)|
| ---           | ---- | ------------------- |
| kern_return_t | u64  | c.int               |
| thread_t      | u64  | mach_port_t         |
| task_t        | u64  | mach_port_t         |
| semaphore_t   | u64  | mach_port_t         |

for mach_task_self(), return mach_port_t instead of task_t

for semaphore_signal_thread(), accept a thread_t instead of a thread_act_t
2024-10-08 12:12:21 -06:00
Beau McCartney
db8950922c add mach_port_deallocate - frees the port from mach_make_memory_entry() 2024-10-07 15:48:24 -06:00
Beau McCartney
7b1086b489 make aliases of vm types not distinct
I think they're meant to be used interchangeably, just typedefed to have more
clear names for certain contexts
2024-10-07 14:24:38 -06:00
Beau McCartney
f858374ef2 small cleanup 2024-10-07 11:45:45 -06:00