Commit Graph

8 Commits

Author SHA1 Message Date
Damien George
ee622cc1ed unix/mpthreadport: Adjust minimum thread stack, and stack limit check.
The minimum thread stack size is set by pthreads (16k bytes) so we must
use that value for our minimum.  The stack limit check is also adjusted
to work correctly for 32-bit builds.
2016-07-11 14:59:47 +00:00
Damien George
df95f52583 py/modthread: Allow to properly set the stack limit of a thread.
We rely on the port setting and adjusting the stack size so there is
enough room to recover from hitting the stack limit.
2016-06-28 11:28:51 +01:00
Damien George
f443504f86 unix/mpthreadport: Suppress compiler warning about unused arguments. 2016-06-28 11:28:50 +01:00
Damien George
c2508ac8bd unix/mpthreadport: Use SA_SIGINFO for GC signal handler.
SA_SIGINFO allows the signal handler to access more information about
the signal, especially useful in a threaded environment.  The extra
information is not currently used but it may prove useful in the future.
2016-06-28 11:28:49 +01:00
Damien George
dbd54e0b5b unix: Implement garbage collection with threading.
This patch allows any given thread to do a proper garbage collection and
scan all the pointers of all active threads.
2016-06-28 11:28:49 +01:00
Damien George
801d1b3803 py/modthread: Implement lock object, for creating a mutex. 2016-06-28 11:28:49 +01:00
Damien George
707f98f207 py/modthread: Add stack_size() function. 2016-06-28 11:28:48 +01:00
Damien George
a791be936a unix: Add basic thread support using pthreads.
Has the ability to create new threads.
2016-06-28 11:28:48 +01:00