You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/04/20 06:19:18 UTC
[2/4] incubator-mynewt-core git commit: Merge branch 'develop' of
https://github.com/neelnatu/incubator-mynewt-larva into develop
Merge branch 'develop' of https://github.com/neelnatu/incubator-mynewt-larva into develop
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/3eb0cfba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/3eb0cfba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/3eb0cfba
Branch: refs/heads/develop
Commit: 3eb0cfbacdea19e7e3dd8ef11b13405bdaf46e12
Parents: dd96f36 f6bc99f
Author: Neel Natu <ne...@nahannisys.com>
Authored: Tue Apr 19 18:27:36 2016 -0700
Committer: Neel Natu <ne...@nahannisys.com>
Committed: Tue Apr 19 18:27:36 2016 -0700
----------------------------------------------------------------------
fs/nffs/src/nffs_cache.c | 85 ++++++++++++++---
fs/nffs/src/nffs_gc.c | 34 +++++++
fs/nffs/src/nffs_priv.h | 6 +-
fs/nffs/src/nffs_restore.c | 141 +++++++++++++++++------------
fs/nffs/src/nffs_write.c | 32 ++++++-
fs/nffs/src/test/arch/sim/nffs_test.c | 1 -
libs/os/src/arch/sim/os_arch_sim.c | 45 +++++----
7 files changed, 242 insertions(+), 102 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3eb0cfba/libs/os/src/arch/sim/os_arch_sim.c
----------------------------------------------------------------------
diff --cc libs/os/src/arch/sim/os_arch_sim.c
index 7bcca4d,1d43ab2..50b6663
--- a/libs/os/src/arch/sim/os_arch_sim.c
+++ b/libs/os/src/arch/sim/os_arch_sim.c
@@@ -325,20 -297,8 +325,20 @@@ timer_handler(int sig
int ticks;
static struct timeval time_last;
- static int time_inited;
+ static int time_inited;
+ OS_ASSERT_CRITICAL();
+
+ /*
+ * Just record that this handler was called when the process was blocked.
+ * The handler will be called after sigsuspend() returns in the proper
+ * order.
+ */
+ if (suspended) {
+ sigaddset(&suspsigs, sig);
+ return;
+ }
+
if (!time_inited) {
gettimeofday(&time_last, NULL);
time_inited = 1;
@@@ -357,15 -323,9 +363,8 @@@
time_diff.tv_sec = 0;
time_diff.tv_usec %= OS_USEC_PER_TICK;
timersub(&time_now, &time_diff, &time_last);
- } else {
- /*
- * XXX time went backwards so just start afresh.
- */
- time_last = time_now;
- ticks = 0;
-
+ os_time_advance(ticks);
}
-
- os_time_advance(ticks);
}
static void