Laytan Laats
cc3c9bd871
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-10-30 15:51:56 +01:00
gingerBill
ee76acd665
Merge pull request #4427 from laytan/posix-additions
...
Finish sys/posix with Linux and partial Windows support & clean up other packages as a result
2024-10-30 11:43:47 +00:00
gingerBill
8312528a87
Merge pull request #4436 from karl-zylinski/utf8string-last-rune-bug
...
Fix for using `utf8string.at` with last rune index returning wrong rune
2024-10-30 11:42:47 +00:00
Karl Zylinski
36b958c120
Fix for using utf8string.at with last rune index returning wrong rune.
2024-10-30 11:10:36 +01:00
Laytan
47be77ead5
Merge pull request #4430 from Wyr0X/patch-1
...
fix cbor.to_json always returning array of tuples for objects
2024-10-29 11:46:51 +01:00
Jeroen van Rijn
28a3a68dc9
Fix image.which_bytes
...
Invert test in `which_bytes` to fix Softimage PIC detection. Fixes #4429 .
2024-10-29 09:55:27 +01:00
Alexis Caraballo
31d5bc48a7
fix cbor.to_json always returning array of tuples for objects
...
to_json uses a small proc to check if all keys of an object are strings.
It was always returning false for any input.
2024-10-29 01:50:38 -03:00
Laytan
5f99d6b427
Merge pull request #4423 from laytan/rand-choice-bit-set
...
math/rand: add `choice_bit_set`
2024-10-28 20:23:45 +01:00
Laytan
cb2768625a
math/rand: choice_bit_set return not_empty -> ok
2024-10-28 20:07:38 +01:00
Laytan
3e024347ee
Merge pull request #4426 from SrMordred/patch-1
...
Update process_windows.odin
2024-10-28 20:06:24 +01:00
Laytan
7e12e37df9
fix test
2024-10-28 19:58:39 +01:00
Laytan
b7140875cf
port pthread_mutex_t and pthread_cond_t from sys/unix cause miniaudio wants it
2024-10-28 19:42:27 +01:00
Laytan
0b4a4212bb
clean up dynlib and path/filepath with sys/posix
2024-10-28 19:21:16 +01:00
Laytan
afed3ce6b5
remove pthread from sys/unix and use sys/posix where used
2024-10-28 19:20:43 +01:00
Laytan Laats
1cebc025b0
sys/posix: impl rest of linux, impl some of Windows
2024-10-28 18:59:06 +01:00
Jeroen van Rijn
d4e87f7a62
Merge pull request #4421 from IllusionMan1212/fix-escaping-rune-greater-than-U-FFFF
...
core/io: correctly escape runes greater than 0xFFFF
2024-10-28 14:05:43 +01:00
Patric Dexheimer
b6599a52b5
Update process_windows.odin
...
Mistype
2024-10-27 23:27:18 -03:00
gingerBill
35d818bb4e
Fix possible leak in recursive filepath.glob
2024-10-27 12:10:10 +00:00
Laytan Laats
bd38b4839c
sys/wasm/js: add set_element_style
2024-10-26 22:41:14 +02:00
Laytan Laats
4608d26e6e
encoding/cbor: fix skipping of ignored/missing fields in struct unmarshal
2024-10-26 22:39:46 +02:00
Laytan
1e3a924e11
Merge pull request #4420 from laytan/cbor-better-handling-of-mismatch-in-struct-and-binary-fields
...
encoding/cbor: handle binary having more fields than the struct by discarding
2024-10-26 17:14:44 +02:00
Laytan Laats
10c2f8dbeb
math/rand: add choice_bit_set
2024-10-26 13:50:28 +02:00
IllusionMan1212
8906ffb39c
core/io: correctly escape runes greater than 0xFFFF
2024-10-26 01:25:12 +02:00
Jeroen van Rijn
831558a7c2
Merge pull request #4419 from laytan/rand-choice-enum-non-contiguous
...
math/rand: support non-contiguous enums in choice_enum
2024-10-25 23:46:05 +02:00
Laytan Laats
bb4fc9979a
math/rand: support non-contiguous enums in choice_enum
2024-10-25 20:41:57 +02:00
Laytan Laats
793ef6012b
encoding/cbor: handle binary having more fields than the struct by discarding
2024-10-25 20:37:55 +02:00
Laytan
0b8e98febe
Merge pull request #4398 from laytan/image-misuse-panic
...
image: add panic when load is called without any registered loaders
2024-10-25 20:05:32 +02:00
gingerBill
f047f804f6
Merge pull request #4402 from Lperlind/utf16_rune_count
...
core/unicode/utf16: add rune_count proc
2024-10-23 15:25:21 +01:00
gingerBill
8cba4aa1c3
Merge pull request #4410 from tf2spi/issue-4397-fix
...
Fix magnitude check in parse_f64_prefix
2024-10-23 15:24:48 +01:00
Misomosi
a9f2271a90
Fix magnitude check in parse_f64_prefix
2024-10-22 21:27:39 -04:00
Jeroen van Rijn
00ec862b63
Merge pull request #4335 from colrdavidson/datetime_tz
...
Add Timezone Support to Odin
2024-10-22 10:18:38 +02:00
Colin Davidson
d8696badb6
add better comment about freebsd hacks
2024-10-21 21:58:32 -07:00
Colin Davidson
9e00d610c8
Update core/time/timezone/tzdate.odin
...
Co-authored-by: Feoramund <161657516+Feoramund@users.noreply.github.com >
2024-10-21 21:49:19 -07:00
Colin Davidson
d393d3292f
Update core/time/timezone/tzdate.odin
...
Co-authored-by: Feoramund <161657516+Feoramund@users.noreply.github.com >
2024-10-21 21:48:58 -07:00
Lucas Perlind
66c53a1174
core/unicode/utf16: add rune_count proc
...
This returns the number of runes in a u16 slice
2024-10-21 08:29:07 +11:00
Tom Solberg
90a0c834bb
cbor: fix capacity and ptr calculation for dynarray unmarshal
2024-10-20 21:27:16 +02:00
Laytan Laats
c8ed499293
image: add panic when load is called without any registered loaders
2024-10-20 18:41:10 +02:00
Laytan Laats
9f609dd740
odin/parser: fix offsets of value declarations
...
Fixes #4356
2024-10-19 20:02:39 +02:00
gingerBill
b6cbdf7c54
Merge pull request #4370 from IllusionMan1212/allow-e000-codepoint
...
fix(core:{odin,c}/tokenizer): Don't error on valid \uE000 codepoint
2024-10-19 18:12:08 +01:00
Laytan Laats
e79f94ca5e
encoding/json: fix leak when string is unmarshalled into non-string field
...
Fixes #4391
2024-10-19 17:08:24 +02: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
142e7d6b52
Fixed time overflows that occur when running in a 32-bit Linux target.
2024-10-15 13:43:28 -04: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
Laytan Laats
1dd9b8560d
build mutex allocator code on freestanding wasm
2024-10-14 16:11:25 +02:00
Laytan Laats
b746e5287e
build tracking allocator code on freestanding wasm
2024-10-14 16:06:16 +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