You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2017/02/25 04:21:45 UTC

incubator-mynewt-core git commit: MYNEWT-630: Connection supervision timeout with high throughput

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop c5c9b6e2e -> f34f225dd


MYNEWT-630: Connection supervision timeout with high throughput

The issue was found to be an error in the os scheduler code.
If the PendSV handler was interrupted at a certain point when
we were checking to see if a context switch could occur, the
code is os_sched would think no context switch was necessary.

This is now fixed and the high throughput test has been running
for quite some time now with no disconnect.


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

Branch: refs/heads/develop
Commit: f34f225ddc1b87cf49a5dde17dd5e4ea6f8169a0
Parents: c5c9b6e
Author: William San Filippo <wi...@runtime.io>
Authored: Fri Feb 24 20:19:42 2017 -0800
Committer: William San Filippo <wi...@runtime.io>
Committed: Fri Feb 24 20:19:42 2017 -0800

----------------------------------------------------------------------
 kernel/os/src/os_sched.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f34f225d/kernel/os/src/os_sched.c
----------------------------------------------------------------------
diff --git a/kernel/os/src/os_sched.c b/kernel/os/src/os_sched.c
index 0cbe615..bb710ba 100644
--- a/kernel/os/src/os_sched.c
+++ b/kernel/os/src/os_sched.c
@@ -83,16 +83,11 @@ err:
 void
 os_sched_ctx_sw_hook(struct os_task *next_t)
 {
-    if (g_current_task == next_t) {
-        return;
-    }
-
     next_t->t_ctx_sw_cnt++;
     g_current_task->t_run_time += g_os_time - g_os_last_ctx_sw_time;
     g_os_last_ctx_sw_time = g_os_time;
 }
 
-
 /**
  * os sched get current task
  *
@@ -143,9 +138,7 @@ os_sched(struct os_task *next_t)
         next_t = os_sched_next_task();
     }
 
-    if (next_t != g_current_task) {
-        os_arch_ctx_sw(next_t);
-    }
+    os_arch_ctx_sw(next_t);
 
     OS_EXIT_CRITICAL(sr);
 }