aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/nil/ports/AVR/nilcore.h2
-rw-r--r--os/rt/ports/AVR/chcore.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/os/nil/ports/AVR/nilcore.h b/os/nil/ports/AVR/nilcore.h
index c8636ebb0..28d06ce1e 100644
--- a/os/nil/ports/AVR/nilcore.h
+++ b/os/nil/ports/AVR/nilcore.h
@@ -187,7 +187,7 @@ struct port_intctx {
(tp)->ctxp->r3 = (int)pf >> 8; \
(tp)->ctxp->r4 = (int)arg; \
(tp)->ctxp->r5 = (int)arg >> 8; \
- (tp)->ctxp->pcx = 0; \
+ (tp)->ctxp->pcx = (int)_port_thread_start >> 16; \
(tp)->ctxp->pcl = (int)_port_thread_start >> 8; \
(tp)->ctxp->pch = (int)_port_thread_start; \
}
diff --git a/os/rt/ports/AVR/chcore.h b/os/rt/ports/AVR/chcore.h
index b119f0635..c9ba077d2 100644
--- a/os/rt/ports/AVR/chcore.h
+++ b/os/rt/ports/AVR/chcore.h
@@ -164,7 +164,7 @@ struct context {
tp->p_ctx.sp->r3 = (int)pf >> 8; \
tp->p_ctx.sp->r4 = (int)arg; \
tp->p_ctx.sp->r5 = (int)arg >> 8; \
- tp->p_ctx.sp->pcx = 0; \
+ tp->p_ctx.sp->pcx = (int)_port_thread_start >> 16; \
tp->p_ctx.sp->pcl = (int)_port_thread_start >> 8; \
tp->p_ctx.sp->pch = (int)_port_thread_start; \
}