Exemplo n.º 1
0
int handle_page_fault(unsigned int address, int is_store)
{
    struct vm_address_space *space;
    const struct vm_area *area;
    int result = 0;

    if (address >= KERNEL_BASE)
        space = &kernel_address_space;
    else
        space = current_thread()->proc->space;

    rwlock_lock_read(&space->mut);
    area = lookup_area(&space->area_map, address);
    if (area == 0)
    {
        result = 0;
        goto error1;
    }

    result = soft_fault(space, area, address, is_store);

error1:
    rwlock_unlock_read(&space->mut);

    return result;
}
Exemplo n.º 2
0
/**
 * @brief	This function is not called from anywhere and may be removed.
 */
void neue_rlock(neue_t *neue) {

	if (neue) {
		rwlock_lock_read(&(neue->lock));
	}

	return;
}