Jukka Jylänki
|
d7c47b1ffe
|
Add support for pthread condition variables and add a test.
|
2015-06-01 15:09:45 +03:00 |
Jukka Jylänki
|
fb4b1e9fa1
|
Add support for thread local storage.
|
2015-06-01 15:09:44 +03:00 |
Jukka Jylänki
|
362e5fc557
|
Implement musl pthread control structure for each created pthread.
|
2015-06-01 15:09:44 +03:00 |
Jukka Jylänki
|
c126ff9485
|
Add test for pthread barriers.
|
2015-06-01 15:09:43 +03:00 |
Jukka Jylänki
|
963bc7af4a
|
Add pthread barrier API from musl.
|
2015-06-01 15:09:43 +03:00 |
Jukka Jylänki
|
b8fe785eda
|
Fix typo in previous commit.
|
2015-06-01 15:09:42 +03:00 |
Jukka Jylänki
|
d05db20482
|
Implement a_swap and a_fetch_add for internal musl libc atomics for the JS arch.
|
2015-06-01 15:09:42 +03:00 |
Jukka Jylänki
|
01d4a45148
|
Add test for pthread_once()
|
2015-06-01 15:09:41 +03:00 |
Jukka Jylänki
|
1f4069c0ea
|
Implement pthread_once() from musl.
|
2015-06-01 15:09:41 +03:00 |
Jukka Jylänki
|
51f795e2ff
|
Implement __wake and __wait musl libc internal futex operations for Emscripten.
|
2015-06-01 15:09:40 +03:00 |
Jukka Jylänki
|
281f27f7e2
|
Implement atomic operations for internal musl libc use for the JS arch.
|
2015-06-01 15:09:40 +03:00 |
Jukka Jylänki
|
dc3061692f
|
TEMP: Fix up GCC atomics in browser.test_pthread_gcc_atomics to be properly atomic. TODO: Implement these in the LLVM backend.
|
2015-06-01 15:09:39 +03:00 |
Jukka Jylänki
|
4e8ac209cf
|
Add test for the remaining GCC atomics.
|
2015-06-01 15:09:38 +03:00 |
Jukka Jylänki
|
8b07c4523c
|
TEMP: Implement __sync_op_and_fetch builtins in the test browser.test_pthread_gcc_atomic_op_and_fetch to work around that fastcomp doesn't generate these operations as atomic. TODO: Fix this in LLVM backend side.
|
2015-06-01 15:09:38 +03:00 |
Jukka Jylänki
|
4c7608171c
|
Add test for GCC old atomic builtin __sync_op_and_fetch instructions.
|
2015-06-01 15:09:37 +03:00 |
Jukka Jylänki
|
0c692f124a
|
TEMP: Route GCC atomic fetch and op builtins to library functions to make browser.test_pthread_gcc_atomic_fetch_and_op test pass.
|
2015-06-01 15:09:37 +03:00 |
Jukka Jylänki
|
f63fdc2663
|
TEMP: fastcomp does not have __sync_fetch_and_nand, so implement it for the test.
|
2015-06-01 15:09:36 +03:00 |
Jukka Jylänki
|
deafe10936
|
Add (non-working) test for old GCC atomic fetch_and_op builtin operations.
|
2015-06-01 15:09:36 +03:00 |
Jukka Jylänki
|
b044ac22eb
|
Fix browser.test_pthread_mutex expected return value.
|
2015-06-01 15:09:35 +03:00 |
Jukka Jylänki
|
5b85dfcae4
|
Fix typo in assert in pthread_cancel.
|
2015-06-01 15:09:35 +03:00 |
Jukka Jylänki
|
5ed8605623
|
Add a test for previous bug fix.
|
2015-06-01 15:09:34 +03:00 |
Jukka Jylänki
|
f6ec01fce7
|
Fix a bug where pthread exit might get called twice due to a race condition, and later on crashing in _free().
|
2015-06-01 15:09:34 +03:00 |
Jukka Jylänki
|
3a1396c97d
|
Make memory allocation thread-safe. Add test.
|
2015-06-01 15:09:33 +03:00 |
Jukka Jylänki
|
51ecfc9b35
|
Add test for pthread mutexes.
|
2015-06-01 15:09:33 +03:00 |
Jukka Jylänki
|
01946cf98e
|
Simplify pthreads volatile test to remove hack, depends on fastcomp commit 2d43fb7723 so that volatile loads and stores are implemented using Atomics.
|
2015-06-01 15:09:32 +03:00 |
Jukka Jylänki
|
2950d6353e
|
Add support for allocating Shared Array View objects for SharedArrayBuffer.
|
2015-06-01 15:09:32 +03:00 |
Jukka Jylänki
|
c6658a688f
|
Add test for pthread volatile vars.
|
2015-06-01 15:09:31 +03:00 |
Jukka Jylänki
|
d995424140
|
Add test browser.test_pthread_kill.
|
2015-06-01 15:09:30 +03:00 |
Jukka Jylänki
|
e8c6a54e05
|
Add test for pthread_join().
|
2015-06-01 15:09:30 +03:00 |
Jukka Jylänki
|
b30590c99b
|
Add test for pthread cleanup stack operations.
|
2015-06-01 15:09:29 +03:00 |
Jukka Jylänki
|
c32101013c
|
Work around https://bugzilla.mozilla.org/show_bug.cgi?id=1049091: Calling console.log/.error in a web worker blocks until the main JS thread yields back to the browser.
|
2015-06-01 15:09:29 +03:00 |
Jukka Jylänki
|
be04c2ff80
|
Fix browser.test_pthread_cancel.
|
2015-06-01 15:09:28 +03:00 |
Jukka Jylänki
|
cfe29d3235
|
Update test_pthread_create.
|
2015-06-01 15:09:28 +03:00 |
Jukka Jylänki
|
912686451a
|
Use atomic stores to zero-initialize thread block at thread creation. Should not matter, but reflects that the data is shared between threads.
|
2015-06-01 15:09:27 +03:00 |
Jukka Jylänki
|
9cd234c0b4
|
Add new function Runtime.establishStackSpace which sets up the stack area for the asm.js module. Call this at thread creation to properly message STACKMAX to asm.js code for created pthreads.
|
2015-06-01 15:09:27 +03:00 |
Jukka Jylänki
|
689e461b00
|
Fix null pointer dereference in pthread_create.
|
2015-06-01 15:09:26 +03:00 |
Jukka Jylänki
|
69de3816e7
|
Add test for pthread cancel.
|
2015-06-01 15:09:26 +03:00 |
Jukka Jylänki
|
ef1913ac1c
|
Add unit test for creating pthreads.
|
2015-06-01 15:09:25 +03:00 |
Jukka Jylänki
|
579aebcf8b
|
Add test for emscripten threading atomic ops.
|
2015-06-01 15:09:24 +03:00 |
Jukka Jylänki
|
cffba53f4a
|
Commit initial working implementation of basic pthreading support with thread creation, atomics and mutexes. Link your application with -lpthread to use it. Implement a custom Emscripten API for calling to browser directly for atomics and futex.
|
2015-06-01 15:09:24 +03:00 |
Jukka Jylänki
|
40395ed311
|
Adjust postamble.js to support being run from a worker that is hosting a pthread.
|
2015-06-01 15:09:23 +03:00 |
Jukka Jylänki
|
3dd9d6ead7
|
Adjust preamble.js to support being run from a worker that is hosting a pthread.
|
2015-06-01 15:09:23 +03:00 |
Jukka Jylänki
|
837e48d5ea
|
Add a w.i.p. mechanism to distinguish between running as a secondary pthread, and running the main thread as a worker with -s PROXY_TO_WORKER.
|
2015-06-01 15:09:22 +03:00 |
Jukka Jylänki
|
07e734b321
|
Remove some currently unused headers from being included in musl for Emscripten.
|
2015-06-01 15:09:22 +03:00 |
Jukka Jylänki
|
10d88fa6bf
|
Remove the pthread_cleanup_push/pop macros in musl pthread.h, since we need to call to JS for pthread cleanup implementation.
|
2015-06-01 15:09:21 +03:00 |
Jukka Jylänki
|
31383799e6
|
Remove memory allocation for filesystem for pthreads since it is not yet thread-safe. Remove the previous stub pthread symbols in library.js to make room for the new pthread implementation.
|
2015-06-01 15:09:21 +03:00 |
Jukka Jylänki
|
6b192f0c31
|
Remove the tempDoublePtr memory allocation for pthreads. TODO: Once memory allocation is thread-safe, make this available for pthreads.
|
2015-06-01 15:09:20 +03:00 |
Jukka Jylänki
|
e5207b7758
|
Don't run memory initializer when starting up a pthread, since the same static memory area is shared with the main thread and is therefore already initialized when the pthread starts up.
|
2015-06-01 15:09:20 +03:00 |
Jukka Jylänki
|
ba864a3431
|
Add a few more musl pthread functions.
|
2015-06-01 15:09:19 +03:00 |
Jukka Jylänki
|
d463415a55
|
Fix syntax error in a_cas_p of musl/arch/js/atomic.h
|
2015-06-01 15:09:19 +03:00 |