summaryrefslogtreecommitdiff
path: root/lib/thread
AgeCommit message (Collapse)Author
2018-08-19Fix futex timeouts and handle futex error codes.iriri
2018-08-11Clean up the mutex code a bit more.Ori Bernstein
2018-08-02Prettify mutex code a bit.Ori Bernstein
The if statements at the start were a touch odd.
2018-07-28Fix openbsd build.Ori Bernstein
2018-07-28Allocate condvar waiters on heap.Ori Bernstein
It solves crashes on plan 9, because plan 9 keeps separate stacks in different procs.
2018-07-27Fix typo in plan 9 mksem.iriri
2018-07-25Subject: [PATCH 2/2] Add/fix condvar implementations.iriri
2018-07-25Add ftxwakeall and waitgrps to libthread.iriri
A waitgrp provides more or less the same functionality as a pthread_barrier_t or a sync.WaitGroup from Go. Since "barrier" sounds similar to a memory barrier/fence, I went with the latter name.
2018-06-22Missed a 9front semaphore fix.Ori Bernstein
2018-06-22Fix compilation and clean up code.Ori Bernstein
Use "atomic" was needed in the non-OSX platforms, to fix the build. The repated 'extern' declarations were also deleted, turning the declarations in atomic.myr into extern declarations. Semaphores were also cleaned up on Plan 9.
2018-06-22Add ftxtag type and add missing castsiriri
2018-06-23Add semaphores and wrapper for various futexesque system callsiriri
2018-06-09Consistently and corretly add Oundef.Ori Bernstein
2018-06-08Add convenience wrappers for atomic operations on pointersiriri
2018-04-22Improve comments.Ori Bernstein
2018-04-22Add a special exit stack to our thread library.Ori Bernstein
Because OpenBSD wants a valid stack pointer in any code that enters the kernel, unmapping our stack as part of exiting the process is rather unreliable. This change allocates a stack page that we can switch to when a thread is deallocating itself, which keeps the kernel happy.
2018-03-24Add support for OpenBSD's MAP_STACK mmap flags, use it in libthreadOri Bernstein
2018-01-11Move to new trait syntax.Ori Bernstein
2017-12-14Add atexit for 9front.Ori Bernstein
A tad ugly, but a start. Maybe we'll figure something better out soon.
2017-10-12Add ncpu for openbsd.Ori Bernstein
2017-09-23Implement OpenBSD 6.2 futex mutexes.Ori Bernstein
2017-09-20Add Linux CPU count function.Ori Bernstein
Linux users deserve fast builds too.
2017-09-20Move to custom stack on OSX. System-allocated just doesn't do it for us.Ori Bernstein
2017-09-09Give a sane default for NCPU.Ori Bernstein
2017-09-04Fix caching.Ori Bernstein
2017-08-01HACK: Work around bug in mbld.Ori Bernstein
It picks up the wrong test util library right now.
2017-07-25Update all bootstrapsmbld-rebaseOri Bernstein
- FreeBSD - Linux - Plan 9 - OSX - OpenBSD - NetBSD
2017-07-25New parallel mbld.Ori Bernstein
2017-07-25Add fallback ncpu for all OSes.Ori Bernstein
It just returns a hard-coded value, but that should be good enough for correctness.
2017-07-23Preparing for the new mbld.Ori Bernstein
It's a tad stricter about a couple of things.
2017-07-22Using implicit util files in tests is a bad idea.Ori Bernstein
Also, it's going to go away in the new mbld.
2017-07-15Type binding refactoring now compiles.Ori Bernstein
Still a bit sloppy on a few things, needs some dedup work, but it's working.
2017-04-22Reserve stack space for the environment.Ori Bernstein
We copied it, but then clobbered it. Shit.
2017-04-09Move plan9 fndup before fork.Ori Bernstein
2017-04-09Duplicate env on thread spawn.Ori Bernstein
2017-03-05Merge branch 'master' of git+ssh://git.eigenstate.org/git/ori/mcOri Bernstein
2017-02-17Search for usefiles relative to the output.Ori Bernstein
For most uses, this is equivalent to compiler cwd, but supports out of tree builds better. It also means that builds behave the same way regardless of the directory that the compiler is run from, which is convenient for testing. This also drops support for `.use` suffixes on local uses.
2017-02-15Add NetBSD supportKamil Rytarowski
2016-12-29Clean up thread spawning code on linux.Ori Bernstein
2016-11-20Add ncpu for 9front.Ori Bernstein
2016-11-20Allow requesting CPU counts on FreeBSDOri Bernstein
2016-11-20Fix cut-paste error.Ori Bernstein
I was supposed to copy, not cut.
2016-08-27Rename `std.Fail to `std.Err.Ori Bernstein
2016-05-27Add missing file.Ori Bernstein
2016-05-17New syntax for casts.Ori Bernstein
2016-05-14Regenerate builds for OpenBSD.Ori Bernstein
And patch up libstd to matcht .
2016-05-12Exercise some of the allocation/put locking.Ori Bernstein
2016-05-12Install thread hooks in libstdOri Bernstein
Looks like the file wasn't properly added.
2016-05-09Add support for OpenBSD thread spawning.Ori Bernstein
2016-05-08We now can build and install on openbsd.Ori Bernstein