Commit Graph

30 Commits (cc2b4da24ad19d9096022ccf094271971f351145)

Author SHA1 Message Date
Ariadne Conill cc2b4da24a add cooperative threading example 2020-12-07 18:15:18 -07:00
Ariadne Conill a52354e640 build: add docs target 2020-12-07 18:14:51 -07:00
Ariadne Conill da736b6add ppc64: chase API changes related to freestanding stuff
freestanding is however NOT supported here
2020-12-06 12:23:09 +00:00
Ariadne Conill 794b4f92aa build: generate libucontext pkg-config file 2020-12-06 04:10:14 -06:00
Ariadne Conill 74121dfe75 build: install generated headers 2020-12-06 04:01:26 -06:00
Ariadne Conill ef632da18f build: regenerate libucontext/bits.h as needed 2020-12-06 03:40:27 -06:00
Ariadne Conill 0953d71ed1 build: fill in more details for freestanding builds 2020-12-06 03:31:48 -06:00
Ariadne Conill 11468c3e54 build: assemble with -DLIBUCONTEXT_ASSEMBLY 2020-12-06 03:17:36 -06:00
Ariadne Conill d44eba0b22 build: add support for freestanding builds 2020-12-06 03:10:04 -06:00
Ariadne Conill fe19127c66 build: add support for EXPORT_UNPREFIXED=no
In an EXPORT_UNPREFIXED=no build, getcontext/makecontext/setcontext/swapcontext
symbols are not provided.
2020-12-06 02:54:01 -06:00
Ariadne Conill 02470ccdd8 build: split CFLAGS/CPPFLAGS correctly 2020-12-03 18:24:08 -07:00
Khem Raj e2178de76a Makefile: Add LIBDIR variable
This ensures that it can be installed into custom location and also

Upstream-Status: Submitted
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-03-30 08:21:52 +00:00
Ariadne Conill 8536f1fa3b makefile: add include path for arch/common 2020-03-29 13:46:19 +00:00
Ariadne Conill 5f137a1fe4
Merge pull request #16 from gabrielivascu/master
Makefile: i386, i686 -> x86
2020-03-27 03:09:32 -06:00
Khem Raj 6cfab025e0 pass LDFLAGS to link step
This helps to use OE specific linker flags and fixes

do_package_qa: QA Issue: No GNU_HASH in the ELF binary

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-03-27 08:54:56 +00:00
Gabriel Ivașcu acff6c83eb Makefile: i386, i686 -> x86 2019-10-22 18:08:47 +03:00
Gabriel Ivașcu 2e15b38327 Makefile: Handle static library at clean/install 2019-04-12 10:48:24 +03:00
Gabriel Ivașcu 9cc1a2c0e6 Build static library too 2019-04-09 16:07:39 +03:00
Bobby Bingham 2610c7faa7 ppc32/64: rewrite get/set/swapcontext in assembly
getcontext cannot be correctly implemented in C.

If this calls another function, as it does to call syscall, it needs to
first spill its return address to the stack.  If, after getcontext returns,
its caller then calls other functions, this saved return address can be
clobbered.  When the context saved by getcontext is later restored, the
(now clobbered) return address will be reloaded from the stack, and the
second return from getcontext will return to the wrong location.

Because the powerpc swapcontext syscall allows either the old context or
new context pointers to be null, it is usable for implementing all of
get/set/swapcontext.

We therefore rewrite swapcontext in assembly, and get/setcontext as simple
assembly function wrappers around swapcontext.

The one piece we keep in C is the code to check the return value of the
system call and to set errno.  This code was actually unnecessary before --
libc does this within syscall.  However, now that the system call is made
directly in assembly, bypassing libc, it is truly necessary.  Because errno
is thread-local and the details of how to set it can vary by libc, this
code remains written in C.
2019-04-05 14:44:54 -05:00
William Pitcock f0741bc7a0 build: use -lucontext instead of libucontext.so in linker flags for test program 2018-02-15 04:41:22 +00:00
William Pitcock 70089a405c build: use absolute path for LD_LIBRARY_PATH when testing 2018-02-14 03:30:50 +00:00
William Pitcock 0188f29771 build: remove test_libucontext on make clean 2018-02-14 03:01:35 +00:00
William Pitcock c28af0399e build: rebuild test program if it is modified 2018-02-01 01:27:13 +00:00
William Pitcock 3f63152bbc build: add -Iarch/${ARCH} to CFLAGS 2018-01-31 20:37:00 +00:00
William Pitcock b686d707b2 build: fix arch detection 2018-01-31 05:58:26 +00:00
William Pitcock a6dfb59ef2 build: default ARCH to $(uname -m) 2018-01-31 04:13:32 +00:00
William Pitcock f17103b6f4 build: build testsuite with -ggdb3 2018-01-31 04:12:09 +00:00
William Pitcock 29225e0974 build: add libucontext test program 2018-01-30 03:53:04 +00:00
William Pitcock da10e5a66d implement ucontext functions on x86_64 2018-01-30 03:41:02 +00:00
William Pitcock 6062fc83b1 don't bother with glibc stuff afterall, kernel defines ABI to use 2018-01-29 21:50:49 +00:00