Allow subset reads in prefetch_contains and prefetch_offset

This commit is contained in:
Alex Young
2014-02-27 14:54:18 +00:00
parent fa8023cf69
commit 666b60ae1c

View File

@@ -56,14 +56,6 @@ int prefetch_is_full( struct prefetch *prefetch ){
} }
} }
int prefetch_contains( struct prefetch* prefetch, uint64_t from, uint32_t len ){
NULLCHECK( prefetch );
return from == prefetch->from && len == prefetch->len;
}
char *prefetch_offset( struct prefetch* prefetch, uint64_t from ){
return prefetch->buffer;
}
/*
int prefetch_contains( struct prefetch *prefetch, uint64_t from, uint32_t len ){ int prefetch_contains( struct prefetch *prefetch, uint64_t from, uint32_t len ){
NULLCHECK( prefetch ); NULLCHECK( prefetch );
return from >= prefetch->from && return from >= prefetch->from &&
@@ -74,4 +66,3 @@ char *prefetch_offset( struct prefetch *prefetch, uint64_t from ){
NULLCHECK( prefetch ); NULLCHECK( prefetch );
return prefetch->buffer + (from - prefetch->from); return prefetch->buffer + (from - prefetch->from);
} }
*/