Changeset 83b1d61 in mainline for fb/main.c


Ignore:
Timestamp:
2006-06-02T13:30:37Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bb51e9a8
Parents:
bd929cfb
Message:

Added mmap, munmap calls.
Added possibility to access framebuffer using shared memory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fb/main.c

    rbd929cfb r83b1d61  
    3131#include <sysinfo.h>
    3232#include <async.h>
     33#include <as.h>
     34#include <align.h>
     35#include <errno.h>
    3336
    3437#include "fb.h"
    3538#include "sysio.h"
    3639#include "ega.h"
     40#include "main.h"
     41
     42void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area,
     43                       size_t maxsize)
     44{
     45        void *dest;
     46
     47        if (*area) {
     48                ipc_answer_fast(callid, ELIMIT, 0, 0);
     49                return;
     50        }
     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;
     59}
    3760
    3861int main(int argc, char *argv[])
Note: See TracChangeset for help on using the changeset viewer.