Changeset 90f5d64 in mainline for fb/main.c


Ignore:
Timestamp:
2006-06-03T14:54:51Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dc5a0fe1
Parents:
0861786
Message:

AS_AREA_CACHEABLE not needed anymore for sharing.
Added icons to console.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fb/main.c

    r0861786 r90f5d64  
    4040#include "main.h"
    4141
    42 void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area,
    43                        size_t maxsize)
     42void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area)
    4443{
    4544        void *dest;
    4645
    47         if (*area) {
    48                 ipc_answer_fast(callid, ELIMIT, 0, 0);
    49                 return;
     46        dest = as_get_mappable_page(IPC_GET_ARG2(*call));
     47        if (ipc_answer_fast(callid, 0, (sysarg_t)dest, 0) == 0) {
     48                if (*area)
     49                        as_area_destroy(*area);
     50                *area = dest;
    5051        }
    51         if (IPC_GET_ARG2(*call) > ALIGN_UP(maxsize, PAGE_SIZE)) {
    52                 ipc_answer_fast(callid, EINVAL, 0, 0);
    53                 return;
    54         }
    55        
    56         dest = as_get_mappable_page(maxsize);
    57         if (ipc_answer_fast(callid, 0, (sysarg_t)dest, 0) == 0)
    58                 *area = dest;
    5952}
    6053
Note: See TracChangeset for help on using the changeset viewer.