xiaoxiang781216 commented on PR #10602: URL: https://github.com/apache/nuttx/pull/10602#issuecomment-1719935387
> > > You apparently seem focused on avoiding a clean context switch (which I believe is the correct, clean, flexible solution). > > > > > > @patacongo My main argument againts hooks you described above (various notifications, events, signal handlers etc.) is that it would lead to additional requirements for user application (different from how `fopencookie` is used in GNU/Linux). I havent had time to go through all code you suggested (graphics etc) so maybe I am missing something. But I think we should keep it in simple `fseak`, `fputs` etc operations. > > The marshaled data should be indisguishable from a direct function (provided an intermediate marshaling/de-marshaling,. > > My main argument against this approach is that I have not heard any solution that will actually work in all conditions and build modes. @patacongo I think @michallenc initial design may confuse you. stdio is a pure userspace library, the implementation of fopencookie or fmemopen doesn't need involve any kernel stuff: it's enough to add the callback(read/write/seek/close) to struct file_struct(FILE). So, I would suggest you read the manual from: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html https://man7.org/linux/man-pages/man3/fopencookie.3.html -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org