diff options
author | Damien George <damien.p.george@gmail.com> | 2014-07-01 14:28:40 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-07-01 14:28:40 +0100 |
commit | 5fc580475f5eba8248de86a4148090e63f777372 (patch) | |
tree | 5261ef47c946e0db2b619829513945889e7e4ab6 /py/gc.c | |
parent | aa47f3968bdb46c67b6150eb7637d1cbd1e76767 (diff) | |
parent | f0b29729aa086892a2dc6640a9fe619bb723e5fa (diff) | |
download | micropython-5fc580475f5eba8248de86a4148090e63f777372.tar.gz micropython-5fc580475f5eba8248de86a4148090e63f777372.zip |
Merge branch 'dhylands-preserve-except'
Diffstat (limited to 'py/gc.c')
-rw-r--r-- | py/gc.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -172,6 +172,10 @@ void gc_unlock(void) { gc_lock_depth--; } +bool gc_is_locked(void) { + return gc_lock_depth != 0; +} + #define VERIFY_PTR(ptr) ( \ (ptr & (BYTES_PER_BLOCK - 1)) == 0 /* must be aligned on a block */ \ && ptr >= (machine_uint_t)gc_pool_start /* must be above start of pool */ \ |