aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-28cc3200/mpthreadport: Properly initialise the main thread's data.Damien George
2016-06-28cc3200/mpthreadport: Make mutex statically allocated.Damien George
Reduced the need for the FreeRTOS heap to allocate the mutex.
2016-06-28cc3200: Use xTaskCreateStatic instead of osi_TaskCreate.Damien George
This allows to statically allocate the TCB (thread control block) and thread stack in the BSS segment, reducing the need for dynamic memory allocation.
2016-06-28py/mpthread: Include mpstate.h when defining GIL macros.Damien George
2016-06-28tests/thread: Make sure that thread tests don't rely on floating point.Damien George
2016-06-28tests/thread: Make stack-size test run correctly and reliable on uPy.Damien George
2016-06-28py/nlrsetjmp: Update to take into account new location of nlr_top.Damien George
It's now accessed via the MP_STATE_THREAD macro.
2016-06-28py/nlrthumb: Convert NLR thumb funcs from asm to C with inline-asm.Damien George
Now only the bits that really need to be written in assembler are written in it, otherwise C is used. This means that the assembler code no longer needs to know about the global state structure which makes it much easier to maintain.
2016-06-28cc3200: Fix call to new exception to be _msg instead of _arg1.Damien George
2016-06-28py/modthread: Allow to properly set the stack limit of a thread.Damien George
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-28cc3200: Add basic threading capabilities.Damien George
Can create a new thread and run it. Does not use the GIL at this point.
2016-06-28cc3200: Define our own FreeRTOS heap so it can go in a special segment.Damien George
2016-06-28cc3200: Update FreeRTOS to v9.0.0.Damien George
This is a pristine copy (actually a subset of files) of upstream FreeRTOS v9.0.0. Modifications to the previous version of FreeRTOS (v8.1.2) included addition of __attribute__ ((section (".boot"))) to the following functions: pxPortInitialiseStack prvTaskExitError prvPortStartFirstTask xPortStartScheduler vPortSetupTimerInterrupt xTaskGenericCreate vTaskStartScheduler prvInitialiseTCBVariables prvInitialiseTaskLists prvAllocateTCBAndStack This attribute will need to be reinstated on a case-by-case basis because some of the above functions are now removed/changed.
2016-06-28py/mpthread.h: Move GIL macros outside MICROPY_PY_THREAD block.Damien George
The GIL macros are needed even if threading is not enabled.
2016-06-28unix/modtime: Release the GIL when sleeping.Damien George
2016-06-28py/modthread: Make Lock objects work when GIL is enabled.Damien George
2016-06-28py: Don't use gc or qstr mutex when the GIL is enabled.Damien George
There is no need since the GIL already makes gc and qstr operations atomic.
2016-06-28py: Implement a simple global interpreter lock.Damien George
This makes the VM/runtime thread safe, at the cost of not being able to run code in parallel.
2016-06-28py: Make interning of qstrs thread safe.Damien George
2016-06-28tests/thread: Add test for concurrent mutating of user instance.Damien George
2016-06-28tests/thread: Add test for concurrent interning of strings.Damien George
Qstr code accesses global state and needs to be made thread safe.
2016-06-28tests/thread: Add tests that mutate shared objects.Damien George
Tests concurrent mutating access to: list, dict, set, bytearray.
2016-06-28tests/thread: Rename thread_stress_XXX.py to stress_XXX.py.Damien George
2016-06-28unix/mpthreadport: Suppress compiler warning about unused arguments.Damien George
2016-06-28unix/gccollect: Provide declaration of exported function.Damien George
2016-06-28unix/mpthreadport: Use SA_SIGINFO for GC signal handler.Damien George
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-28py/gc: Fix GC+thread bug where ptr gets lost because it's not computed.Damien George
GC_EXIT() can cause a pending thread (waiting on the mutex) to be scheduled right away. This other thread may trigger a garbage collection. If the pointer to the newly-allocated block (allocated by the original thread) is not computed before the switch (so it's just left as a block number) then the block will be wrongly reclaimed. This patch makes sure the pointer is computed before allowing any thread switch to occur.
2016-06-28unix: Implement garbage collection with threading.Damien George
This patch allows any given thread to do a proper garbage collection and scan all the pointers of all active threads.
2016-06-28py/modthread: Call mp_thread_start/mp_thread_finish around threads.Damien George
So the underlying thread implementation can do any necessary bookkeeping.
2016-06-28py/modthread: Be more careful with root pointers when creating a thread.Damien George
2016-06-28unix/file: If write syscall returns because of EINTR then try again.Damien George
As per PEP-475.
2016-06-28py/gc: Fix 2 cases of concurrent access to ATB and FTB.Damien George
2016-06-28py/modthread: Satisfy unused-args warning.Damien George
2016-06-28tests/thread: Add tests for running GC within a thread, and heap stress.Damien George
2016-06-28py/gc: Make memory manager and garbage collector thread safe.Damien George
By using a single, global mutex, all memory-related functions (alloc, free, realloc, collect, etc) are made thread safe. This means that only one thread can be in such a function at any one time.
2016-06-28py/modthread: Add with-context capabilities to lock object.Damien George
2016-06-28py/modthread: Implement lock object, for creating a mutex.Damien George
2016-06-28py/modthread: Add exit() function.Damien George
Simply raises the SystemExit exception.
2016-06-28py/modthread: Add stack_size() function.Damien George
2016-06-28py/modthread: Properly cast concrete exception pointer to an object.Damien George
2016-06-28unix: Add basic thread support using pthreads.Damien George
Has the ability to create new threads.
2016-06-28py: Add basic _thread module, with ability to start a new thread.Damien George
2016-06-28py: Add MP_STATE_THREAD to hold state specific to a given thread.Damien George
2016-06-28tests/thread: Remove need to sleep to wait for completion in some tests.Damien George
Use a lock and a counter instead, and busy wait for all threads to complete. This makes test run faster and they no longer rely on the time module.
2016-06-28tests: Add 3 more tests for _thread module.Damien George
2016-06-28tests: Add tests for _thread module.Damien George
Includes functionality and stress tests.
2016-06-27unix: Fix Makefile to handle gc-sections linker flags on Mac OS.Martin Müller
The linker flag --gc-sections is not available on the linker used on Mac OS X which results in an error when linking micropython on Mac OS X. Therefore move this option to the LDFLAGS_ARCH variable on non Darwin systems. According to http://stackoverflow.com/a/17710056 the equivalent to --gc-sections is -dead_strip thus this option is used for the LDFLAGS_ARCH on Darwin systems.
2016-06-26drivers/display/ssd1306: Add width arg and support 64px wide displays.Radomir Dopieralski
In particular, the WeMOS D1 Mini board comes with a shield that has a 64x48 OLED display. This patch makes it display properly, with the upper left pixel being at (0, 0) and not (32, 0). I tried to do this with the configuration commands, but there doesn't seem to be a command that would set the column offset (there is one for the line offset, though).
2016-06-26esp8266/main.c: Clear the command line history when (re)booting.Robert HH
Not clearing the command line history sometimes results in strange output when going back after a reset.
2016-06-26docs/library: Fix typo in docs for usocket.listen().Martin Müller