Changeset 6fa476f7 in mainline for generic/src/mm/as.c


Ignore:
Timestamp:
2006-04-26T17:03:15Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a9e8b39
Parents:
f3ac636
Message:

Rename SYS_AS_AREA_SHARE_APPROVE and SYS_AS_AREA_SHARE_PERFORM, resp., to
SYS_AS_AREA_ACCEPT and SYS_AS_AREA_SEND, resp. in syscall_t.

Fix prototype of as_area_send() to take only base address of the address
space area as a parameter and read size and flags from the address space
area found at this base address.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/mm/as.c

    rf3ac636 r6fa476f7  
    292292 * @param id Task ID of the accepting task.
    293293 * @param base Base address of the source address space area.
    294  * @param size Size of the source address space area.
    295  * @param flags Flags of the source address space area.
    296294 *
    297295 * @return 0 on success or ENOENT if there is no such task or
     
    301299 *         address space area.
    302300 */
    303 int as_area_send(task_id_t id, __address base, size_t size, int flags)
     301int as_area_send(task_id_t id, __address base)
    304302{
    305303        ipl_t ipl;
     
    308306        as_t *as;
    309307        __address dst_base;
     308        int flags;
     309        size_t size;
     310        as_area_t *area;
    310311       
    311312        ipl = interrupts_disable();
     
    334335                return EPERM;
    335336        }
     337       
     338        spinlock_lock(&AS->lock);
     339        area = find_area_and_lock(AS, base);
     340        if (!area) {
     341                /*
     342                 * Could not find the source address space area.
     343                 */
     344                spinlock_unlock(&t->lock);
     345                spinlock_unlock(&AS->lock);
     346                interrupts_restore(ipl);
     347                return ENOENT;
     348        }
     349        size = area->pages * PAGE_SIZE;
     350        flags = area->flags;
     351        spinlock_unlock(&area->lock);
     352        spinlock_unlock(&AS->lock);
    336353
    337354        if ((t->accept_arg.task_id != TASK->taskid) || (t->accept_arg.size != size) ||
     
    880897        }
    881898
    882         return (__native) as_area_send(arg.task_id, (__address) arg.base, arg.size, arg.flags);
    883 }
     899        return (__native) as_area_send(arg.task_id, (__address) arg.base);
     900}
Note: See TracChangeset for help on using the changeset viewer.