This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I've made a tftp file system. Relatively straightforward w/eCos. Mounting this device at /tftp, I can read/write files using the following path syntax: /tftp/10.0.0.106/filename... This adds tftp client get/set to my app without modifying the app. However, tftp_client_put() needs to be done at close() time and FILEIO_MUTEX_LOCK(fdlock) is held when co_close() is invoked. fo_sync() is not invoked when the application (which I can't really modify) calls close(). With the attached patch, I no longer get the deadlock, but I don't quite understand this code or API contract well enough to know how and why the FILEIO_MUTEX_LOCK(fdlock) should be held. Would it be possible to rewrite io/fileio/current/src/fd.cxx not to hold FILEIO_MUTEX_LOCK() during fo_close() without breaking something? Should close() invoke fsync()? -- Øyvind Harboe http://www.zylin.com - eCos ARM & FPGA developer kit
Attachment:
flushproblems.txt
Description: Text document
-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |