Changeset 6fa476f7 in mainline


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.

Location:
generic
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • generic/include/mm/as.h

    rf3ac636 r6fa476f7  
    115115extern as_area_t *as_area_create(as_t *as, int flags, size_t size, __address base);
    116116extern __address as_area_resize(as_t *as, __address address, size_t size, int flags);
    117 int as_area_send(task_id_t id, __address base, size_t size, int flags);
     117int as_area_send(task_id_t id, __address base);
    118118extern void as_set_mapping(as_t *as, __address page, __address frame);
    119119extern int as_page_fault(__address page);
  • generic/include/mm/as_arg.h

    rf3ac636 r6fa476f7  
    4646        void *base;
    4747       
     48        /*
     49         * The following members are filled only by acceptor.
     50         */
    4851        unsigned long size;     /**< Size of memory being sent/accepted must match. */
    4952        int flags;              /**< Address space area flags of sender and acceptor must match. */
  • generic/include/syscall/syscall.h

    rf3ac636 r6fa476f7  
    4141        SYS_AS_AREA_CREATE,
    4242        SYS_AS_AREA_RESIZE,
    43         SYS_AS_AREA_SHARE_APPROVE,
    44         SYS_AS_AREA_SHARE_PERFORM,
     43        SYS_AS_AREA_ACCEPT,
     44        SYS_AS_AREA_SEND,
    4545        SYS_IPC_CALL_SYNC_FAST,
    4646        SYS_IPC_CALL_SYNC,
  • 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.