accurate serial timestamp

From: Anindha Parthy
Date: Mon Oct 30 2006 - 06:51:58 EST


Hello,

I would like to take a high accuracy timestamp whenever data is
received on the serial port.

I think the best place to do this is in the tty_flip_buffer_push
method of the tty_io.c file.

2652 void tty_flip_buffer_push(struct tty_struct *tty)
2653 {
2654 if (tty->low_latency)
2655 flush_to_ldisc((void *) tty);
2656 else
2657 schedule_delayed_work(&tty->flip.work, 1);
2658 }

I would buffer the timestamps, and access them using an ioctl.

Is this the best way of doing this?

I am currently using the 2.6.15 kernel.

Regards,

Anindha
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/