Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1424 → Rev 1423

/kernel/trunk/generic/src/ddi/ddi.c
65,7 → 65,7
cap_t caps;
task_t *t;
int flags;
mem_backend_data_t backend_data = { .d1 = (__native) pf, .d2 = (__native) pages };
count_t i;
/*
* Make sure the caller is authorised to make this syscall.
98,11 → 98,10
spinlock_lock(&t->lock);
spinlock_unlock(&tasks_lock);
flags = AS_AREA_READ;
flags = AS_AREA_DEVICE | AS_AREA_READ;
if (writable)
flags |= AS_AREA_WRITE;
if (!as_area_create(t->as, flags, pages * PAGE_SIZE, vp, AS_AREA_ATTR_NONE,
&phys_backend, &backend_data)) {
if (!as_area_create(t->as, flags, pages * PAGE_SIZE, vp, AS_AREA_ATTR_NONE, NULL, NULL)) {
/*
* The address space area could not have been created.
* We report it using ENOMEM.
112,10 → 111,10
return ENOMEM;
}
/*
* Mapping is created on-demand during page fault.
*/
/* Initialize page tables. */
for (i = 0; i < pages; i++)
as_set_mapping(t->as, vp + i * PAGE_SIZE, pf + i * FRAME_SIZE);
 
spinlock_unlock(&t->lock);
interrupts_restore(ipl);
return 0;