<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/mpthread.h, branch encoding</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=encoding</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=encoding'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-07-06T18:16:25+00:00</updated>
<entry>
<title>Add license to some obvious files.</title>
<updated>2020-07-06T18:16:25+00:00</updated>
<author>
<name>Diego Elio Pettenò</name>
<email>flameeyes@flameeyes.com</email>
</author>
<published>2020-06-03T22:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=34b4993d63a6b576f29d624385c681f679b4124c'/>
<id>urn:sha1:34b4993d63a6b576f29d624385c681f679b4124c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: Unify header guard usage.</title>
<updated>2017-07-18T01:57:39+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-29T21:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=299bc625864b9e624ed599c94a5f95870516139a'/>
<id>urn:sha1:299bc625864b9e624ed599c94a5f95870516139a</id>
<content type='text'>
The code conventions suggest using header guards, but do not define how
those should look like and instead point to existing files. However, not
all existing files follow the same scheme, sometimes omitting header guards
altogether, sometimes using non-standard names, making it easy to
accidentally pick a "wrong" example.

This commit ensures that all header files of the MicroPython project (that
were not simply copied from somewhere else) follow the same pattern, that
was already present in the majority of files, especially in the py folder.

The rules are as follows.

Naming convention:
* start with the words MICROPY_INCLUDED
* contain the full path to the file
* replace special characters with _

In addition, there are no empty lines before #ifndef, between #ifndef and
one empty line before #endif. #endif is followed by a comment containing
the name of the guard macro.

py/grammar.h cannot use header guards by design, since it has to be
included multiple times in a single C file. Several other files also do not
need header guards as they are only used internally and guaranteed to be
included only once:
* MICROPY_MPHALPORT_H
* mpconfigboard.h
* mpconfigport.h
* mpthreadport.h
* pin_defs_*.h
* qstrdefs*.h
</content>
</entry>
<entry>
<title>py/mpthread: Include mpstate.h when defining GIL macros.</title>
<updated>2016-06-28T10:28:52+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-31T14:25:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=77e37ff98bec1ccf6af6edf3efcad26b54da0c47'/>
<id>urn:sha1:77e37ff98bec1ccf6af6edf3efcad26b54da0c47</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/modthread: Allow to properly set the stack limit of a thread.</title>
<updated>2016-06-28T10:28:51+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-30T15:56:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=df95f52583e0f5e3f2a74f7461bb00e2f24b3079'/>
<id>urn:sha1:df95f52583e0f5e3f2a74f7461bb00e2f24b3079</id>
<content type='text'>
We rely on the port setting and adjusting the stack size so there is
enough room to recover from hitting the stack limit.
</content>
</entry>
<entry>
<title>py/mpthread.h: Move GIL macros outside MICROPY_PY_THREAD block.</title>
<updated>2016-06-28T10:28:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-27T12:44:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e90b6ce0b5af51ef195aa98dad35a185b77c5075'/>
<id>urn:sha1:e90b6ce0b5af51ef195aa98dad35a185b77c5075</id>
<content type='text'>
The GIL macros are needed even if threading is not enabled.
</content>
</entry>
<entry>
<title>py: Implement a simple global interpreter lock.</title>
<updated>2016-06-28T10:28:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-26T10:42:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4cec63a9dbed86c4332b9e7fcd56d092046193e4'/>
<id>urn:sha1:4cec63a9dbed86c4332b9e7fcd56d092046193e4</id>
<content type='text'>
This makes the VM/runtime thread safe, at the cost of not being able to
run code in parallel.
</content>
</entry>
<entry>
<title>py/modthread: Call mp_thread_start/mp_thread_finish around threads.</title>
<updated>2016-06-28T10:28:49+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-04T09:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9172c0cb252faa47f56e61f67ceb213012631de2'/>
<id>urn:sha1:9172c0cb252faa47f56e61f67ceb213012631de2</id>
<content type='text'>
So the underlying thread implementation can do any necessary bookkeeping.
</content>
</entry>
<entry>
<title>py/gc: Make memory manager and garbage collector thread safe.</title>
<updated>2016-06-28T10:28:49+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-04-25T15:28:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c93d9caa8b8be81f7e6faf9f2ca2ad16d4942ab8'/>
<id>urn:sha1:c93d9caa8b8be81f7e6faf9f2ca2ad16d4942ab8</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>py/modthread: Implement lock object, for creating a mutex.</title>
<updated>2016-06-28T10:28:49+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-04-25T11:21:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=801d1b3803e4c8070a8bea6ee4f563a799d010b7'/>
<id>urn:sha1:801d1b3803e4c8070a8bea6ee4f563a799d010b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/modthread: Add stack_size() function.</title>
<updated>2016-06-28T10:28:48+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-04-25T09:02:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=707f98f207d85b1de9814e90254d52a78ac19739'/>
<id>urn:sha1:707f98f207d85b1de9814e90254d52a78ac19739</id>
<content type='text'>
</content>
</entry>
</feed>
