You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by st...@apache.org on 2015/11/17 23:53:43 UTC

incubator-mynewt-larva git commit: fix accounting of os_sched()

Repository: incubator-mynewt-larva
Updated Branches:
  refs/heads/master add35d612 -> a73a7e819


fix accounting of os_sched()


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/a73a7e81
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/a73a7e81
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/a73a7e81

Branch: refs/heads/master
Commit: a73a7e8199e8317824acfbcb4c60e20f77b821b8
Parents: add35d6
Author: Sterling Hughes <st...@apache.org>
Authored: Tue Nov 17 14:53:37 2015 -0800
Committer: Sterling Hughes <st...@apache.org>
Committed: Tue Nov 17 14:53:37 2015 -0800

----------------------------------------------------------------------
 libs/os/src/os_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/a73a7e81/libs/os/src/os_sched.c
----------------------------------------------------------------------
diff --git a/libs/os/src/os_sched.c b/libs/os/src/os_sched.c
index 0589e81..944f0f6 100644
--- a/libs/os/src/os_sched.c
+++ b/libs/os/src/os_sched.c
@@ -116,7 +116,7 @@ os_sched_ctx_sw_hook(struct os_task *next_t)
     }
 
     next_t->t_ctx_sw_cnt++;
-    next_t->t_run_time += g_os_time - g_os_last_ctx_sw_time;
+    g_current_task->t_run_time += g_os_time - g_os_last_ctx_sw_time;
     g_os_last_ctx_sw_time = g_os_time;
 }