Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171737358
D8618.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8618.diff
View Options
Index: sys/kern/kern_clocksource.c
===================================================================
--- sys/kern/kern_clocksource.c
+++ sys/kern/kern_clocksource.c
@@ -665,6 +665,7 @@
statperiod = SBT_1S / stathz;
profperiod = SBT_1S / profhz;
ET_LOCK();
+ printf("CALLOUT: time when starting: %lx\n", sbinuptime());
configtimer(1);
ET_UNLOCK();
}
Index: sys/kern/kern_timeout.c
===================================================================
--- sys/kern/kern_timeout.c
+++ sys/kern/kern_timeout.c
@@ -416,6 +416,31 @@
}
SYSINIT(start_softclock, SI_SUB_SOFTINTR, SI_ORDER_FIRST, start_softclock, NULL);
+static void
+test_callout(void *arg)
+{
+
+ printf("CALLOUT: %s fired at %lx\n", (const char *)arg, sbinuptime());
+}
+
+static void
+test_callouts(void *dummy)
+{
+ static struct callout c1, c2, c4, c10;
+
+ printf("CALLOUT: uptime at test start: %lx\n", sbinuptime());
+
+ callout_init(&c1, 1);
+ callout_init(&c2, 1);
+ callout_init(&c4, 1);
+ callout_init(&c10, 1);
+ callout_reset(&c1, hz, test_callout, "1 second");
+ callout_reset(&c2, 2 * hz, test_callout, "2 second");
+ callout_reset(&c4, 4 * hz, test_callout, "4 second");
+ callout_reset(&c10, 10 * hz, test_callout, "10 second");
+}
+SYSINIT(test_callouts, SI_SUB_SOFTINTR, SI_ORDER_SECOND, test_callouts, NULL);
+
#define CC_HASH_SHIFT 8
static inline u_int
@@ -981,6 +1006,8 @@
spinlock_exit();
#endif
#endif
+ if (cold && to_sbt == 0)
+ to_sbt = sbinuptime();
if ((flags & C_HARDCLOCK) == 0)
to_sbt += tick_sbt;
} else
Index: sys/kern/subr_sleepqueue.c
===================================================================
--- sys/kern/subr_sleepqueue.c
+++ sys/kern/subr_sleepqueue.c
@@ -386,7 +386,7 @@
MPASS(TD_ON_SLEEPQ(td));
MPASS(td->td_sleepqueue == NULL);
MPASS(wchan != NULL);
- if (cold)
+ if (cold && td == &thread0)
panic("timed sleep before timers are working");
KASSERT(td->td_sleeptimo == 0, ("td %d %p td_sleeptimo %jx",
td->td_tid, td, (uintmax_t)td->td_sleeptimo));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 14, 4:02 AM (21 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38885609
Default Alt Text
D8618.diff (1 KB)
Attached To
Mode
D8618: Permit timed sleeps before timers are working.
Attached
Detach File
Event Timeline
Log In to Comment