summaryrefslogtreecommitdiff
path: root/py/stackctrl.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-07-01 02:13:42 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-07-01 02:14:08 +0300
commitcaa7334141e6d67ab6f3064b250e6729095ae56c (patch)
tree8100c9c8d828aa51a1a3f0bbbb958e9f5c549ff7 /py/stackctrl.c
parente95b6b5e0761d8fa40cc31d62888e503812db72a (diff)
stackctrl: Add "mp_" prefix.
Diffstat (limited to 'py/stackctrl.c')
-rw-r--r--py/stackctrl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/py/stackctrl.c b/py/stackctrl.c
index aef9bad9e..724d54a1b 100644
--- a/py/stackctrl.c
+++ b/py/stackctrl.c
@@ -35,12 +35,12 @@
// Stack top at the start of program
char *stack_top;
-void stack_ctrl_init() {
+void mp_stack_ctrl_init() {
volatile int stack_dummy;
stack_top = (char*)&stack_dummy;
}
-uint stack_usage() {
+uint mp_stack_usage() {
// Assumes descending stack
volatile int stack_dummy;
return stack_top - (char*)&stack_dummy;
@@ -48,14 +48,14 @@ uint stack_usage() {
#if MICROPY_STACK_CHECK
-uint stack_limit = 10240;
+static uint stack_limit = 10240;
-void stack_set_limit(uint limit) {
+void mp_stack_set_limit(uint limit) {
stack_limit = limit;
}
-void stack_check() {
- if (stack_usage() >= stack_limit) {
+void mp_stack_check() {
+ if (mp_stack_usage() >= stack_limit) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_RuntimeError, "maximum recursion depth exceeded"));
}
}