aboutsummaryrefslogtreecommitdiff
path: root/core/sync/sync_windows.odin
Commit message (Collapse)AuthorAgeFilesLines
* Replace `sync` with `sync2`gingerBill2022-03-301-180/+0
|
* Remove unneeded semicolons from the core librarygingerBill2021-08-311-40/+40
|
* Remove `context.thread_id`gingerBill2021-06-081-0/+4
|
* Update package syncgingerBill2020-08-021-2/+8
|
* Add `sync.Benaphore`gingerBill2020-07-081-1/+1
|
* Add `sync.Barrier`; Add `sync.Blocking_Mutex` for unixgingerBill2020-06-271-26/+24
|
* Update sys/windows; Add sync.Blocking_Mutex (windows only at the moment)gingerBill2020-06-271-7/+82
|
* Remove `foreign import` for `-vet`gingerBill2020-06-261-2/+0
|
* Keep previous behaviour for `sync` but move to `sys/windows`gingerBill2020-06-261-31/+22
|
* Revert sync_windows.odingingerBill2020-06-261-47/+33
|
* Begin migration from sys/win32 to sys/windowsgingerBill2020-06-261-33/+47
|
* Update `sync.Condition` to require a `^sync.Mutex` on initgingerBill2020-06-221-16/+38
|
* Add `thread.Pool` with example in demo.odin; Update linalg to support ↵gingerBill2020-01-021-1/+1
| | | | handness changes for projection matrices
* Implement core:thread and core:sync on Unix using pthreadsTetralux2019-12-011-48/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also do some cleanup and refactoring of the thread, sync and time APIs. - remove 'semaphore_release' because 'post' and 'wait' is easier to understand - change 'semaphore_wait' to '*_wait_for' to match Condition - pthreads can be given a stack, but doing so requires the user to set up the guard pages manually. BE WARNED. The alignment requirements of the stack are also platform-dependant; it may need to be page size aligned on some systems. Unclear which systems, however. See 'os.get_page_size', and 'mem.make_aligned'. HOWEVER: I was unable to get custom stacks with guard pages working reliably, so while you can do it, the API does not support it. - add 'os.get_page_size', 'mem.make_aligned', and 'mem.new_aligned'. - removed thread return values because windows and linux are not consistent; windows returns 'i32' and pthreads return 'void*'; besides which, if you really wanted to communicate how the thread exited, you probably wouldn't do it with the thread's exit code. - fixed 'thread.is_done' on Windows; it didn't report true immediately after calling 'thread.join'. - moved time related stuff out of 'core:os' to 'core:time'. - add 'mem.align_backward' - fixed default allocator alignment The heap on Windows, and calloc on Linux, both have no facility to request alignment. It's a bit of hack, but the heap_allocator now overallocates; `size + alignment` bytes, and aligns things to at least 2. It does both of these things to ensure that there is at least two bytes before the payload, which it uses to store how much padding it needed to insert in order to fulfil the alignment requested. - make conditions more sane by matching the Windows behaviour. The fact that they were signalled now lingers until a thread tries to wait, causing them to just pass by uninterrupted, without sleeping or locking the underlying mutex, as it would otherwise need to do. This means that a thread no longer has to be waiting in order to be signalled, which avoids timing bugs that causes deadlocks that are hard to debug and fix. See the comment on the `sync.Condition.flag` field. - add thread priority: `thread.create(worker_proc, .High)`
* Add minor additions to mem, sync, and sys/win32gingerBill2019-02-211-0/+28
|
* sync atomics "wrapper" proceduresgingerBill2018-10-171-1/+0
|
* Add `utf8_to_ucs2` for package win32 so that the wide procedures can used by ↵gingerBill2018-08-301-2/+2
| | | | default
* Allow `.allocator` for dynamic arrays; Add `mem.Pool`gingerBill2018-06-121-59/+19
|
* Use const & for Array<AstNode *> parametersgingerBill2018-06-031-4/+4
|
* Parse directories to be packagesgingerBill2018-05-211-0/+124