Core dump issue

Though I do not use readcond() now I think your analysis is bright.

I thought the buffer size 300 should be enough for the data before because I know that the max size of the data will not exceed 200. But now I find that sometimes it did make some mistakes though I am not sure whether it overflew or something else happened.

I should consider more when I use the readcond() next time.

Thank you Tim!

I didn’t use io_notify because I have to read the GPS fast (100hz) and I don’t know whether it will slow down the program using io_notify.

One more problem, when I record the data in the textfile, I lost some of the data. For example, the GPS is sending data at 100Hz rate which means there will be 100 rows per second. However usually I only got 93 rows or less of data in the textfile. Maybe it is still not fast enough when reading the data or maybe it is something about the serial port buffer?

The serial driver has some buffer, but if your program is busy like when going a printf on a slow device (VGA) or writting to a slow device (hd), the real time behavior could be affected.

io_notify at say 19200 is not a problem at all.

You could increase devc-ser8250`s buffer with -I and activate the chips hardware FIFO with -t.

You have to make your code more resilient.