From: Terje O. <os...@gm...> - 2004-11-13 22:56:14
|
Vincenzo Ciancia <vincenzo_mlRE.MOVE@...> writes: > > How do you send the reply from user code? I mean you should have a > separate type for responses depending on which operation was requested, > as in > > void async_read(unsigned long reqid,char * path,char * data,int > offset,int length) > { ... } > > and then in another thread: > > async_read_reply(reqid,data,length); > > the "data" argument is specific for read and write operations. > > Is this your idea for such an interface? > > V. Yes, exactly. I called them: do_read_request() and do_read_reply() I'm hoping to make sure that the code that I modify in the fuse library can be used to implement the current interface as well as the new asynchronous interface. I'd really like to get rid fo the data pointer in do_read_request() because it's not needed until there's a call to do_read_reply(), but I can't seem to figure out how to implement the synchronous interface using a do_read_request() without the data pointer. I'm thinking that maybe if the data pointer is NULL then it means that it's up to the handler to allocate the data buffer. Maybe if the asynchronous flag is set, then it will be assumed that the data pointer is NULL. I'll probably come up with a few working asynchronous fuse operations with everything hard coded into the library as a proof of concept and something people can look at, review, and give feedback on before I finalize on something. I'll be working on that next week and hopefully I can deliver it next week. Terje |