Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
b20611b2
Commit
b20611b2
authored
Jul 09, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4c142f02
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
include/wendelin/bigfile/file.h
include/wendelin/bigfile/file.h
+11
-0
No files found.
include/wendelin/bigfile/file.h
View file @
b20611b2
...
@@ -52,12 +52,23 @@ struct bigfile_ops {
...
@@ -52,12 +52,23 @@ struct bigfile_ops {
/* loadblk is called to load file block into memory.
/* loadblk is called to load file block into memory.
*
*
* NOTE loadblk is called from SIGSEGV signal handler context.
* NOTE loadblk is called from SIGSEGV signal handler context.
* XXX loadblk -> !mmap_read ?
*
*
* len(buf) must be = file->blksize.
* len(buf) must be = file->blksize.
* @return 0 - ok !0 - fail
* @return 0 - ok !0 - fail
*/
*/
int
(
*
loadblk
)
(
BigFile
*
file
,
blk_t
blk
,
void
*
buf
);
int
(
*
loadblk
)
(
BigFile
*
file
,
blk_t
blk
,
void
*
buf
);
/* mmap_read is called to mmap read-only file[offset +len) into @addr.
*
* XXX mmap_read -> !loadblk ?
* NOTE offset and len are in bytes, not pages.
*
* @addr NULL - mmap at anywhere, !NULL - mmap exactly at addr.
* @return !NULL - mapped there, NULL - error.
*/
void
*
(
*
mmap_read
)(
BigFile
*
file
,
void
*
addr
,
off_t
pgoffset
,
size_t
len
);
/* storeblk is called to store file block from memory.
/* storeblk is called to store file block from memory.
*
*
* NOTE contrary to loadblk, storeblk is called from regular context.
* NOTE contrary to loadblk, storeblk is called from regular context.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment