Commit 4c142f02 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c7062e4d
...@@ -49,17 +49,28 @@ typedef struct BigFile BigFile; ...@@ -49,17 +49,28 @@ typedef struct BigFile BigFile;
/* bigfile_ops defines interface that BigFile implementations must provide. */ /* bigfile_ops defines interface that BigFile implementations must provide. */
struct bigfile_ops { struct bigfile_ops {
/* load/store file block to/from memory. /* loadblk is called to load file block into memory.
* NOTE len(buf) must be = file->blksize
* *
* NOTE loadblk is called from SIGSEGV signal handler context.
*
* len(buf) must be = file->blksize.
* @return 0 - ok !0 - fail * @return 0 - ok !0 - fail
*/ */
// XXX loadblk - called from SIGSEGV context;
// storeblk - called from usual context
int (*loadblk) (BigFile *file, blk_t blk, void *buf); int (*loadblk) (BigFile *file, blk_t blk, void *buf);
/* storeblk is called to store file block from memory.
*
* NOTE contrary to loadblk, storeblk is called from regular context.
*
* len(buf) must be = file->blksize.
* @return 0 - ok !0 - fail
*/
int (*storeblk) (BigFile *file, blk_t blk, const void *buf); int (*storeblk) (BigFile *file, blk_t blk, const void *buf);
/* release file */ /* release is called to release resources associated with file.
*
* The file is not otherwise used at the time of and past release call.
*/
void (*release) (BigFile *file); void (*release) (BigFile *file);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment