|
|
Subscribe / Log in / New account

Driver porting: The seq_file interface

Driver porting: The seq_file interface

Posted Dec 14, 2013 15:15 UTC (Sat) by Lieta (guest, #94383)
In reply to: Driver porting: The seq_file interface by iw2lsi
Parent article: Driver porting: The seq_file interface

I think it calls stop at the end of every page (4 KB), followed by the start.
At the end of file it calls stop, then start, followed by one more stop.
So it works like this:
.start
.stop
---PAGE---
.start
.stop
---PAGE---
...
.stop
.start
.stop
---EOF---
Special case is when the file is empty. Then there are just two calls (not 4): one .start one .stop.


to post comments

Driver porting: The seq_file interface

Posted Dec 14, 2013 15:23 UTC (Sat) by Lieta (guest, #94383) [Link]

...
.stop(A)
.start
.stop(B)
---EOF---
There is a problem to differ the .stop(A) from .stop(B) when you have to return some resource (e.g. semaphore), that has been taken in .start, back at the end of sequence. The position counter is equal in both (A) and (B), because you are at EOF.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds