Commit ded803b0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent cfe546ee
......@@ -258,7 +258,7 @@ error _Conn::__pin1(PinReq *req) {
// if virtmem dirtied the page - it will ask us to remmap it again after commit or abort.
bool do_pin= true;
error err;
if (mmap->vma != NULL) {
if (mmap->vma != nil) {
virt_lock();
BigFileH *virt_fileh = mmap->vma->fileh;
TODO (mmap->fileh->blksize != virt_fileh->ramh->ram->pagesize);
......@@ -268,7 +268,7 @@ error _Conn::__pin1(PinReq *req) {
if (do_pin)
err = mmap->_remmapblk(req->blk, req->at);
if (mmap->vma != NULL)
if (mmap->vma != nil)
virt_unlock();
// on error don't need to continue with other mappings - all fileh and
......@@ -450,7 +450,7 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
return make_pair(nil, E(err));
}
if (vma != NULL) {
if (vma != nil) {
if (vma->mmap_overlay_server != nil)
panic("vma is already associated with overlay server");
if (!(vma->addr_start == 0 && vma->addr_stop == 0))
......@@ -480,9 +480,12 @@ error _Mapping::unmap() {
// XXX locking
// XXX make sure mmap cannot be XXX
if (mmap->vma != nil) {
}
error err = mm::unmap(mmap->mem_start, mmap->mem_stop - mmap->mem_start);
mmap->mem_start = NULL;
mmap->mem_stop = NULL;
mmap->mem_start = nil;
mmap->mem_stop = nil;
// XXX clear other fields?
//f->_mmaps.remove(mmap);
......
......@@ -145,7 +145,7 @@ tuple<uint8_t*, error> map(int prot, int flags, os::File f, off_t offset, size_t
if (flags & MAP_FIXED)
panic("MAP_FIXED not allowed for map - use map_into");
addr = ::mmap(NULL, size, prot, flags, f->fd(), offset);
addr = ::mmap(nil, size, prot, flags, f->fd(), offset);
if (addr == MAP_FAILED)
return make_tuple(nil, os::_pathError("mmap", f->name(), errno));
......
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