From: Terje O. <os...@gm...> - 2004-11-13 23:12:51
|
Vincenzo Ciancia <vincenzo_mlRE.MOVE@...> writes: > > On Saturday 13 November 2004 19:51, Terje Oseberg wrote: > > I'll definitely download what you've done and check it out as soon as > > I get a chance. > > The trouble with ocaml is that you have to create threads in ocaml land > when you want those to be able to interrupt the ocaml runtime using > leave_blocking_section() from C. At least this is what I understood > from some post around from Xavier Leroy. > > Since I didn't want to rewrite the entire libfuse in ocaml (but I am > more and more thinking that it's the right way to proceed) I a setup in > which: > > the ocaml main loop calls C to obtain fuse commands, then spawns a > thread for each command. Each thread calls C again to process the > command, and when it's time, a C "non blocking" fuse filesystem > callback is called, which in turn calls back ocaml to implement the > filesystem operation, calling "leave_blocking_section()" before doing > so. > > It seemed to work well at the beginning but it segfaults soon or later. > I will try to understand what's going on, or else the only viable > alternative I see is to rewrite libfuse or to use your asynchronous > interface to avoid all this calling C calling ocaml. > > bye > > Vincenzo Actually this sounds like the whole reason I'm trying to build the asynchronous interface. Basically I want to utilize all the fuse library processing, but on remote machines connected over a socket. I don't want to reimplement the FUSE library on the remote machines. I like the current fuse operations interface, but these remote machines might be quite remote and therefor quite slow. I'd really appreciate someone looking over my code and also your input to help make sure that I'm creating something that's generic and useful to everyone. Terje |