summaryrefslogtreecommitdiff
path: root/kern/timer_i.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-09-01 23:58:40 +0200
committerRichard Braun <rbraun@sceen.net>2017-09-01 23:58:40 +0200
commit850c52ee1b4e91c6781d337bc129302697188f62 (patch)
tree3cf906e75053a0693966efded88a4be769378809 /kern/timer_i.h
parentfe715443e82b068a0b061f1b8ed3c01a96b1e4ba (diff)
kern/timer: make timer time reads non atomic
This makes such accesses on 32-bits processor without 64-bits atomic instruction too cumbersome for what it's worth.
Diffstat (limited to 'kern/timer_i.h')
-rw-r--r--kern/timer_i.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/kern/timer_i.h b/kern/timer_i.h
index 40e97f1..bbe07f9 100644
--- a/kern/timer_i.h
+++ b/kern/timer_i.h
@@ -29,12 +29,7 @@
* (c) cpu_data
* (a) atomic
*
- * (*) The ticks member represents the expiration date. It may be read without
- * locking the timer, in which case it must be accessed atomically. It
- * may only be updated when the timer is locked though, so reads at such
- * times don't need to be atomic.
- *
- * (**) The cpu member is used to determine which lock serializes access to
+ * (*) The cpu member is used to determine which lock serializes access to
* the structure. It must be accessed atomically, but updated while the
* timer is locked.
*/
@@ -44,12 +39,12 @@ struct timer {
struct work work;
};
- uint64_t ticks; /* (c,a,*) */
+ uint64_t ticks; /* (c) */
timer_fn_t fn;
- unsigned int cpu; /* (c,a,**) */
- unsigned short state; /* (c) */
- unsigned short flags; /* (c) */
- struct thread *joiner; /* (c) */
+ unsigned int cpu; /* (c,a,*) */
+ unsigned short state; /* (c) */
+ unsigned short flags; /* (c) */
+ struct thread *joiner; /* (c) */
};
#endif /* _KERN_TIMER_I_H */