summaryrefslogtreecommitdiff
path: root/rt
AgeCommit message (Collapse)Author
2019-07-13Oops, mangled something with git9.Ori Bernstein
2019-07-14Fix memory leak in bigparse. (Thanks, Mike)Ori Bernstein
2019-02-27Fix __fini__ on openbsdCarlin Bingham
2019-02-26Hook in __fini__ on 9front.Ori Bernstein
2019-02-26Add support for `__fini__` functions.Ori Bernstein
2018-11-06Create the output directory when assembling.Ori Bernstein
Easier to bootstrap.
2018-10-18Add thread-local storage for POSIX-y platforms.iriri
This patch implements thread-local storage by using a segment register to store pointers to regions of memory unique to each thread. In spawned threads, this region starts above the top of the stack, while in the main thread, this region is initially statically allocated so it can be used in `__init__` functions and dynamically reallocated if it needs to grow beyond 8 slots. The api consists of 3 functions: `tlsalloc()`, which must be called from the main thread, allocates a slot and returns a key to be used with `settls(k, v)` and `gettls(k)`. Each thread inherits its tls slots from the thread that spawned it and any slot added after a given thread is spawned is not available in that thread. Adding tls regions gives threads an easy way to get their own tids, allowing us to add some basic correctness checks to the mutex code. A pointer to the base of the stack and the size of the mapping are also stored in the tls region, making it easy to support user-specified stack sizes in the future. Changes from previous version: - Fixed size of main tls static allocation. - More comments, less magic. - Fixed typo in start+osx-x64.s exit+{freebsd,linux,openbsd}-x64.s - `gettlskey` renamed to `tlsalloc`. - `key` is now `tlskey(@a#)`, improving safety. - Test is slightly less bad.
2018-10-02Fix 'make clean' (Thanks Mike)Ori Bernstein
2018-01-15Define __guard_local on OpenBSD for linking libcCarlin Bingham
2017-12-14Add atexit for 9front.Ori Bernstein
A tad ugly, but a start. Maybe we'll figure something better out soon.
2017-12-11Undo the kbind call.Ori Bernstein
It breaks dynamic linking.
2017-12-05Align the stack in _start.snocl
2017-10-08Add kbind() calls.Ori Bernstein
OpenBSD expects that this is called after the runtime is done its initial setup. It's likely to care more in the future.
2017-07-07Use the correct syscall for kill on OpenBSDCarlin Bingham
2017-07-04Simplify _start routinesMichael Forney
sys$__environment was unused since 94ee9832f5861c4d09afa12338720eb3a479c342. Delete it and count, which is no longer needed. Simplify _start routines since they no longer need to allocate space for the environment slice and populate it.
2017-07-04rt: Remove duplicate stack allocationMichael Forney
2017-02-15Add assembly start code for netbsd.Ori Bernstein
Seems to work so far.
2017-01-17Add missing dependency.Ori Bernstein
install should build everything.
2017-01-17Add the ability to do setenv() on posixy systems.Ori Bernstein
2016-12-02Fix top of stack pointer on 9front.Ori Bernstein
We weren't setting it up right.
2016-08-28Our ABI relies on zero %rbp to terminate the stack.Ori Bernstein
Let's zero it.
2016-05-08Add OpenBSD note section.Ori Bernstein
2016-05-08work on openbsd portAndrew Chambers
- fix start assembly - update syscall numbers to match openbsd - add openbsd note section
2016-05-08Add initial openbsd skeletonAndrew Chambers
2016-01-16minor fixes to rt asm filesAndrew Chambers
- replace spaces with tabs. - change label references to be rip relative
2015-12-06Add missing files.Ori Bernstein
Fixes FreeBSD support.
2015-09-19Fix syscalls on FreeBSDOri Bernstein
2015-09-19Compile on FreeBSD.Ori Bernstein
Things are still broken, but we've got a start.
2015-06-29Call '__init__' in the runtime on OSX.Ori Bernstein
2015-06-28Implement '__init__' functions.Ori Bernstein
2015-05-15Fix successful exit on Plan 9.Ori Bernstein
I had mixed up ABIs. Unmix them up.
2015-05-15Add working 'uninstall' targets.glenda@cirno
2015-01-01Get args[:][:] set up on plan 9.Ori Bernstein
2014-12-26Fix a few typos.Ori Bernstein
2014-12-25Make installation work correctly.Ori Bernstein
2014-12-24Get plan9 even closer to workingness.Ori Bernstein
A few more oddities.
2014-10-06Fix symbol names.Ori Bernstein
2014-10-06Split libstd into libstd and libsys.Ori Bernstein
2014-10-05Add plan9 mkfiles and runtime.Ori Bernstein
2014-09-15Split abort-linux.s, abort-osx.sOri Bernstein
Syscall numbers are different. What was I smoking, and where can I get some?
2014-09-15Now the abort code works on OSX.Ori Bernstein
2014-09-15Add missing file abort.sOri Bernstein
This contains the code for dying out of memory. W00t string formatting in assembly!
2014-09-14Add checking for buffer overruns.Ori Bernstein
2014-08-11Add missing file.Ori Bernstein
2014-08-11Spit out the runtime from libstd.Ori Bernstein
This will allow linking code without libstd, as well as fixing link order on freebsd. Freebsd seems to be picky aobut where '_start' is searched from.