aboutsummaryrefslogtreecommitdiff
path: root/core/thread/thread_unix.odin
Commit message (Collapse)AuthorAgeFilesLines
* Ensure creating a low priority thread does not assert with SCHED_OTHER policyNathan Wong2026-01-131-1/+5
|
* removes the darwin specific paths from thread_unixLaytan Laats2025-11-071-15/+8
| | | | | | | | | | | I know I left a note there about deadlocks but it doesn't seem to happen anymore, especially now that the test runner creates cancellation points. Also, what was this `can_set_thread_cancel_state` for? It does not make sense to me that it enables cancellation, and then does it again later. With the comment it seems like it should be `.DISABLE` to first disable and then wait for the thread to start. But even that seems weird, why do you need to do that? I removed it.
* thread: set stack size to rlimitLaytan Laats2025-08-021-1/+6
|
* Fix early join after start.Jeroen van Rijn2025-06-211-6/+5
|
* Revert changes to thread_unix.odinJeroen van Rijn2025-06-121-7/+2
|
* Remove transmuteJeroen van Rijn2025-06-121-2/+2
|
* Remove c importJeroen van Rijn2025-06-121-1/+0
|
* Fix #5321Jeroen van Rijn2025-06-121-2/+7
|
* fix thread_unix for Darwin after pthread corrections in posix packageLaytan Laats2024-10-301-4/+12
| | | | | | | | | | | | | | | | | | | | | | | 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.)
* remove pthread from sys/unix and use sys/posix where usedLaytan2024-10-281-30/+30
|
* Merge branch 'master' into file-tags-without-commentsKarl Zylinski2024-09-171-24/+8
|\
| * Convert POSIX `Thread` to use semaphore insteadFeoramund2024-09-091-12/+4
| | | | | | | | | | | | | | | | One less value to store, and it should be less of a hack too. Semaphores will not wait around if they have the go-ahead; they depend on an internal value being non-zero, instead of whatever was loaded when they started waiting, which is the case with a `Cond`.
| * Fix rare double-join possibility in POSIX `thread._join`Feoramund2024-09-091-12/+4
| | | | | | | | This was occuring about 1/100 times with the test runner's thread pool.
* | Moved all packages in core, base, vendor, tests and examples to use new #+ ↵Karl Zylinski2024-09-141-2/+2
|/ | | | file tag syntax.
* fix zombie thread leak in thread self cleanupLaytan Laats2024-08-281-0/+3
|
* Add API for freeing `thread_local` stateFeoramund2024-08-261-1/+5
|
* fix some bugs with -disable-assertLaytan Laats2024-07-161-3/+5
|
* wasi: make the demo run on wasi and run it in CILaytan Laats2024-06-291-0/+2
|
* Call `pthread_cancel` on Darwin, with advisory commentFeoramund2024-06-281-14/+17
|
* core/thread: fix a deadlock situation on unixLaytan Laats2024-06-071-11/+12
|
* Merge pull request #3439 from andreas-jonsson/netbsdgingerBill2024-05-151-5/+5
|\ | | | | NetBSD support
| * Merge branch 'master' into netbsdAndreas T Jonsson2024-05-101-2/+2
| |\
| * | Fixed concurrency issueAndreas T Jonsson2024-04-181-2/+2
| | | | | | | | | | | | Fixed broken thread policy causing deadlocks.
| * | Updated core lib and did cleanupAndreas T Jonsson2024-04-181-2/+2
| | | | | | | | | | | | | | | Updated core with some path related functions and did some minor code cleanup. Most of the standard library function is just a matter of copy what is there for the other BSDs.
| * | Initial commit of NetBSD portAndreas T Jonsson2024-04-161-1/+1
| | |
* | | Fix joining non-`Started` threads from blocking main threadFeoramund2024-05-101-0/+9
| |/ |/|
* | Fix discrepancy with pthread cancelability stateFeoramund2024-04-221-2/+2
|/
* fix core:thread and a memory leakavanspector2024-02-271-4/+9
| | | | in the future probably native non-pthread implementation for haiku will be required
* Replace `core:*` to `base:*` where appropriategingerBill2024-01-281-1/+1
|
* Require parentheses for `#align(N)`gingerBill2023-08-151-1/+1
|
* [core:thread] Seeing if this fixes network testshikari2023-06-071-8/+1
|
* [core:thread] Fix compilationhikari2023-06-071-0/+2
|
* [core:thread] Added `self_cleanup` flag to properly auto-clean threadshikari2023-06-071-0/+5
|
* [thread] Refactor handling of 'init_context' + add doc comments for itTetralux2023-06-031-12/+12
|
* Disable thread.terminate on Darwin for now.Jeroen van Rijn2022-05-111-7/+14
|
* Implement pthread_cancel.Jeroen van Rijn2022-05-111-1/+10
|
* Fix join on *nix.Jeroen van Rijn2022-05-111-5/+14
|
* Replace `sync` with `sync2`gingerBill2022-03-301-1/+1
|
* can use sync.guard hereDale Weiler2022-03-111-2/+1
|
* formattingDale Weiler2022-03-111-2/+2
|
* fix for mac & use atomic store on write side to avoid raceDale Weiler2022-03-111-2/+2
|
* fix for spurious wakeupsDale Weiler2022-03-111-1/+1
|
* fix thread data racesDale Weiler2022-03-111-80/+40
|
* initial OpenBSD supportSébastien Marie2022-02-251-1/+1
|
* Fix mutex and conditions trying to be destroyed twice in unixpowerc90002022-01-271-2/+0
|
* Move thread initialization variables in thread_unix.odingingerBill2021-10-261-2/+6
|
* Add `id` to `thread.Thread`gingerBill2021-10-241-1/+2
|
* Strip semicolons in core which were missinggingerBill2021-09-081-55/+55
|
* Make `or_else` and `or_return` operators (binary and suffix respectively)gingerBill2021-08-151-1/+1
|
* Fix `thread_unix.odin`gingerBill2021-07-051-0/+1
|