<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/modthread.c, branch 3.0.0-beta.1</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=3.0.0-beta.1</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=3.0.0-beta.1'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-09-26T01:59:11+00:00</updated>
<entry>
<title>py: Add config option to print warnings/errors to stderr.</title>
<updated>2017-09-26T01:59:11+00:00</updated>
<author>
<name>David Lechner</name>
<email>david@lechnology.com</email>
</author>
<published>2017-09-25T01:15:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=62849b7010abffb7b0a9c9875930efe7cb77519c'/>
<id>urn:sha1:62849b7010abffb7b0a9c9875930efe7cb77519c</id>
<content type='text'>
This adds a new configuration option to print runtime warnings and errors to
stderr. On Unix, CPython prints warnings and unhandled exceptions to stderr,
so the unix port here is configured to use this option.

The unix port already printed unhandled exceptions on the main thread to
stderr. This patch fixes unhandled exceptions on other threads and warnings
(issue #2838) not printing on stderr.

Additionally, a couple tests needed to be fixed to handle this new behavior.
This is done by also capturing stderr when running tests.
</content>
</entry>
<entry>
<title>py: Add verbose debug compile-time flag MICROPY_DEBUG_VERBOSE.</title>
<updated>2017-08-15T01:53:36+00:00</updated>
<author>
<name>Stefan Naumann</name>
<email>me@stefannaumann.de</email>
</author>
<published>2017-07-24T16:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ace9fb54053c29574bdf81ffacc5ddcf9d4b45d9'/>
<id>urn:sha1:ace9fb54053c29574bdf81ffacc5ddcf9d4b45d9</id>
<content type='text'>
It enables all the DEBUG_printf outputs in the py/ source code.
</content>
</entry>
<entry>
<title>py/modthread: Raise RuntimeError in release() if lock is not acquired.</title>
<updated>2017-06-14T04:43:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-06-14T04:43:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e374cfff80c37b96b03d4438e475e405b03e6d61'/>
<id>urn:sha1:e374cfff80c37b96b03d4438e475e405b03e6d61</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Convert mp_uint_t to size_t for tuple/list accessors.</title>
<updated>2017-03-29T01:56:17+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-25T08:35:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6213ad7f466df12c734dc527993bbb46c9d9eb5c'/>
<id>urn:sha1:6213ad7f466df12c734dc527993bbb46c9d9eb5c</id>
<content type='text'>
This patch changes mp_uint_t to size_t for the len argument of the
following public facing C functions:

mp_obj_tuple_get
mp_obj_list_get
mp_obj_get_array

These functions take a pointer to the len argument (to be filled in by the
function) and callers of these functions should update their code so the
type of len is changed to size_t.  For ports that don't use nan-boxing
there should be no change in generate code because the size of the type
remains the same (word sized), and in a lot of cases there won't even be a
compiler warning if the type remains as mp_uint_t.

The reason for this change is to standardise on the use of size_t for
variables that count memory (or memory related) sizes/lengths.  It helps
builds that use nan-boxing.
</content>
</entry>
<entry>
<title>py: Use mp_raise_TypeError/mp_raise_ValueError helpers where possible.</title>
<updated>2017-03-28T11:37:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-28T11:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=94c41bb06f6482ece0717c5bd63266b8da063caa'/>
<id>urn:sha1:94c41bb06f6482ece0717c5bd63266b8da063caa</id>
<content type='text'>
Saves 168 bytes on bare-arm.
</content>
</entry>
<entry>
<title>py: Move locals/globals dicts to the thread-specific state.</title>
<updated>2017-03-06T06:01:56+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-27T12:56:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=05fe66f68a1cf1b7587c55149472ab7bca843631'/>
<id>urn:sha1:05fe66f68a1cf1b7587c55149472ab7bca843631</id>
<content type='text'>
Each threads needs to have its own private references to its current
locals/globals dicts, otherwise functions running within different
contexts (eg imported from different files) can behave very strangely.
</content>
</entry>
<entry>
<title>py/modthread: Use system-provided mutexs for _thread locks.</title>
<updated>2017-02-15T00:28:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-05T23:47:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=234f07f16cc845128658cc0b39ac681cae5a8fba'/>
<id>urn:sha1:234f07f16cc845128658cc0b39ac681cae5a8fba</id>
<content type='text'>
It's more efficient using the system mutexs instead of synthetic ones with
a busy-wait loop.  The system can do proper scheduling and blocking of the
threads waiting on the mutex.
</content>
</entry>
<entry>
<title>py: Use mp_raise_msg helper function where appropriate.</title>
<updated>2016-10-17T01:17:37+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-17T01:17:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7d0d7215d2575a2d36d34c9a13b58cade0610a28'/>
<id>urn:sha1:7d0d7215d2575a2d36d34c9a13b58cade0610a28</id>
<content type='text'>
Saves the following number of bytes of code space: 176 for bare-arm, 352
for minimal, 272 for unix x86-64, 140 for stmhal, 120 for esp8266.
</content>
</entry>
<entry>
<title>py: Add mp_raise_OSError(errno) helper function.</title>
<updated>2016-10-07T02:31:59+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-07T02:31:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3a0a7717304cc34a4d6ef55f767666c918c185b5'/>
<id>urn:sha1:3a0a7717304cc34a4d6ef55f767666c918c185b5</id>
<content type='text'>
This is an often used code pattern, and its use reduces code size of the
core by about 100 bytes.
</content>
</entry>
<entry>
<title>all: Remove 'name' member from mp_obj_module_t struct.</title>
<updated>2016-09-21T14:23:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-09-21T00:52:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=93c4a6a3f70e389b466fbc7a4f1ad2e1df87c93f'/>
<id>urn:sha1:93c4a6a3f70e389b466fbc7a4f1ad2e1df87c93f</id>
<content type='text'>
One can instead lookup __name__ in the modules dict to get the value.
</content>
</entry>
</feed>
