All of lore.kernel.org
 help / color / mirror / Atom feed
* [Adeos-main] do_gettimeofday in ADEOS ISR
@ 2005-08-02 22:40 Hannes Mayer
  2005-08-03  8:03 ` Philippe Gerum
  0 siblings, 1 reply; 5+ messages in thread
From: Hannes Mayer @ 2005-08-02 22:40 UTC (permalink / raw)
  To: adeos-main

Hi all!

I was just wondering if calling do_gettimeofday in an ADEOS interrupt
handler might cause any problems whatsoever ?

My ISR:
flags = adeos_critical_enter (NULL);
[...]
do_gettimeofday()
[...]
adeos_critical_exit (flags);

I saw that the code for do_gettimeofday is different in kernel 2.4 and
kernel 2.6:

Kernel 2.4:
void do_gettimeofday(struct timeval *tv) {
[...]
read_lock_irqsave(&xtime_lock, flags);
[...]
read_unlock_irqrestore(&xtime_lock, flags);

Kernel 2.6:
void do_gettimeofday(struct timeval *tv) {
[...]
do {
[...]
seq = read_seqbegin(&xtime_lock);
[...]
} while (read_seqretry(&xtime_lock, seq));

Well, read_lock_irqsave in 2.4 looks like a possible source for trouble,
while read_seqbegin in 2.6 doesn't do anything with interrupts, right ?

Thanks for all comments!

Best regards,
Hannes.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-08-22 14:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-02 22:40 [Adeos-main] do_gettimeofday in ADEOS ISR Hannes Mayer
2005-08-03  8:03 ` Philippe Gerum
2005-08-17 20:22   ` Hannes Mayer
2005-08-22 14:08     ` Philippe Gerum
2005-08-22 14:16       ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.