summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* tests/thread: Add test for concurrent mutating of user instance.Damien George2016-06-28
|
* tests/thread: Add test for concurrent interning of strings.Damien George2016-06-28
| | | | Qstr code accesses global state and needs to be made thread safe.
* tests/thread: Add tests that mutate shared objects.Damien George2016-06-28
| | | | Tests concurrent mutating access to: list, dict, set, bytearray.
* tests/thread: Rename thread_stress_XXX.py to stress_XXX.py.Damien George2016-06-28
|
* unix/mpthreadport: Suppress compiler warning about unused arguments.Damien George2016-06-28
|
* unix/gccollect: Provide declaration of exported function.Damien George2016-06-28
|
* unix/mpthreadport: Use SA_SIGINFO for GC signal handler.Damien George2016-06-28
| | | | | | 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.
* py/gc: Fix GC+thread bug where ptr gets lost because it's not computed.Damien George2016-06-28
| | | | | | | | | | | 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.
* unix: Implement garbage collection with threading.Damien George2016-06-28
| | | | | This patch allows any given thread to do a proper garbage collection and scan all the pointers of all active threads.
* py/modthread: Call mp_thread_start/mp_thread_finish around threads.Damien George2016-06-28
| | | | So the underlying thread implementation can do any necessary bookkeeping.
* py/modthread: Be more careful with root pointers when creating a thread.Damien George2016-06-28
|
* unix/file: If write syscall returns because of EINTR then try again.Damien George2016-06-28
| | | | As per PEP-475.
* py/gc: Fix 2 cases of concurrent access to ATB and FTB.Damien George2016-06-28
|
* py/modthread: Satisfy unused-args warning.Damien George2016-06-28
|
* tests/thread: Add tests for running GC within a thread, and heap stress.Damien George2016-06-28
|
* py/gc: Make memory manager and garbage collector thread safe.Damien George2016-06-28
| | | | | | 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.
* py/modthread: Add with-context capabilities to lock object.Damien George2016-06-28
|
* py/modthread: Implement lock object, for creating a mutex.Damien George2016-06-28
|
* py/modthread: Add exit() function.Damien George2016-06-28
| | | | Simply raises the SystemExit exception.
* py/modthread: Add stack_size() function.Damien George2016-06-28
|
* py/modthread: Properly cast concrete exception pointer to an object.Damien George2016-06-28
|
* unix: Add basic thread support using pthreads.Damien George2016-06-28
| | | | Has the ability to create new threads.
* py: Add basic _thread module, with ability to start a new thread.Damien George2016-06-28
|
* py: Add MP_STATE_THREAD to hold state specific to a given thread.Damien George2016-06-28
|
* tests/thread: Remove need to sleep to wait for completion in some tests.Damien George2016-06-28
| | | | | | 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.
* tests: Add 3 more tests for _thread module.Damien George2016-06-28
|
* tests: Add tests for _thread module.Damien George2016-06-28
| | | | Includes functionality and stress tests.
* unix: Fix Makefile to handle gc-sections linker flags on Mac OS.Martin Müller2016-06-27
| | | | | | | | | 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.
* drivers/display/ssd1306: Add width arg and support 64px wide displays.Radomir Dopieralski2016-06-26
| | | | | | | | | | 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).
* esp8266/main.c: Clear the command line history when (re)booting.Robert HH2016-06-26
| | | | | Not clearing the command line history sometimes results in strange output when going back after a reset.
* docs/library: Fix typo in docs for usocket.listen().Martin Müller2016-06-26
|
* lib/libm: Remove unused definition of "one".Damien George2016-06-25
|
* lib/libm: Format code to pass gcc v6.1.1 warning.Damien George2016-06-25
| | | | | | gcc 6.1.1 warns when indentation is misleading, and in this case the formatting of the code really is misleading. So adjust the formatting to be clear of the meaning of the code.
* windows/msvc: Include machine_pinbase.c in build and enable umachine modulestijn2016-06-25
| | | | Fixes linker errors since [ad229477] and adds the umachine module so tests pass.
* tests/btree1: Add testcase for iterating btree object directly.Paul Sokolovsky2016-06-24
|
* extmod/modbtree: Cleverly implement "for key in btree:" syntax.Paul Sokolovsky2016-06-23
| | | | | I.e. make it work like btree.keys(), while still not using a separate iterator type.
* tests/extmod: Add "btree" module test.Paul Sokolovsky2016-06-21
|
* extmod/modbtree: Implement keys(), values(), items() iterators.Paul Sokolovsky2016-06-20
| | | | | Each takes optional args of starting key, ending key, and flags (ending key inclusive, reverse order).
* tests: Add a testcase for machine.PinBase class.Paul Sokolovsky2016-06-19
|
* docs/conf.py: Exclude cmath from modindex for wipy.Paul Sokolovsky2016-06-19
|
* extmod/modlwip: Store a chain of incoming pbufs, instead of only one.Paul Sokolovsky2016-06-19
| | | | | | | | | | | | | | | | | | | | | | Storing a chain of pbuf was an original design of @pfalcon's lwIP socket module. The problem with storing just one, like modlwip does is that "peer closed connection" notification is completely asynchronous and out of band. So, there may be following sequence of actions: 1. pbuf #1 arrives, and stored in a socket. 2. pbuf #2 arrives, and rejected, which causes lwIP to put it into a queue to re-deliver later. 3. "Peer closed connection" is signaled, and socket is set at such status. 4. pbuf #1 is processed. 5. There's no stored pbufs in teh socket, and socket status is "peer closed connection", so EOF is returned to a client. 6. pbuf #2 gets redelivered. Apparently, there's no easy workaround for this, except to queue all incoming pbufs in a socket. This may lead to increased memory pressure, as number of pending packets would be regulated only by TCP/IP flow control, whereas with previous setup lwIP had a global overlook of number packets waiting for redelivery and could regulate them centrally.
* py/objtype: Inherit protocol vtable from base class only if it exists.Paul Sokolovsky2016-06-19
|
* extmod/machine_pinbase: Fix nanbox build.Paul Sokolovsky2016-06-19
| | | | | MP_ROM_PTR() is only for data structures initialization, code should use MP_OBJ_FROM_PTR().
* unix/modmachine: Enable time_pulse_us() function.Paul Sokolovsky2016-06-19
|
* py/mphal.h: If virtpin API is used, automagically include its header.Paul Sokolovsky2016-06-19
|
* py/objtype: instance: Inherit protocol vtable from a base class.Paul Sokolovsky2016-06-19
| | | | | | | This allows to define an abstract base class which would translate C-level protocol to Python method calls, and any subclass inheriting from it will support this feature. This in particular actually enables recently introduced machine.PinBase class.
* unix/modmachine: Include PinBase class.Paul Sokolovsky2016-06-18
|
* extmod/machine_pinbase: Implementation of PinBase class.Paul Sokolovsky2016-06-18
| | | | | | | Allows to translate C-level pin API to Python-level pin API. In other words, allows to implement a pin class and Python which will be usable for efficient C-coded algorithms, like bitbanging SPI/I2C, time_pulse, etc.
* docs/sys: print_exception: Fixes/clarifications.Paul Sokolovsky2016-06-18
|
* docs/select: Add an article.Paul Sokolovsky2016-06-18
|