From 850c52ee1b4e91c6781d337bc129302697188f62 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 1 Sep 2017 23:58:40 +0200 Subject: 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. --- kern/timer_i.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'kern/timer_i.h') diff --git a/kern/timer_i.h b/kern/timer_i.h index 40e97f1b..bbe07f9b 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 */ -- cgit v1.2.3