Changeset 085bd54 in mainline for console/gcons.c


Ignore:
Timestamp:
2006-06-06T15:16:08Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63bb83e
Parents:
d7eafd8
Message:

Revised ipc. Now it is preferrable to use only functions from async.h, they
take care of correct buffering, waiting for answers etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • console/gcons.c

    rd7eafd8 r085bd54  
    7676static void vp_switch(int vp)
    7777{
    78         nsend_call(fbphone,FB_VIEWPORT_SWITCH, vp);
     78        async_msg(fbphone,FB_VIEWPORT_SWITCH, vp);
    7979}
    8080
     
    9191static void clear(void)
    9292{
    93         nsend_call(fbphone, FB_CLEAR, 0);
     93        async_msg(fbphone, FB_CLEAR, 0);
    9494       
    9595}
     
    9797static void set_style(int fgcolor, int bgcolor)
    9898{
    99         nsend_call_2(fbphone, FB_SET_STYLE, fgcolor, bgcolor);
     99        async_msg_2(fbphone, FB_SET_STYLE, fgcolor, bgcolor);
    100100}
    101101
     
    103103static void tran_putch(char c, int row, int col)
    104104{
    105         nsend_call_3(fbphone, FB_TRANS_PUTCHAR, c, row, col);
     105        async_msg_3(fbphone, FB_TRANS_PUTCHAR, c, row, col);
    106106}
    107107
     
    115115        vp_switch(cstatus_vp[consnum]);
    116116        if (ic_pixmaps[state] != -1)
    117                 nsend_call_2(fbphone, FB_VP_DRAW_PIXMAP, cstatus_vp[consnum], ic_pixmaps[state]);
     117                async_msg_2(fbphone, FB_VP_DRAW_PIXMAP, cstatus_vp[consnum], ic_pixmaps[state]);
    118118
    119119        if (state != CONS_DISCONNECTED && state != CONS_KERNEL && state != CONS_DISCONNECTED_SEL) {
     
    239239        memcpy(shm, logo, size);
    240240        /* Send area */
    241         rc = sync_send_2(fbphone, FB_PREPARE_SHM, (ipcarg_t)shm, 0, NULL, NULL);
     241        rc = async_req_2(fbphone, FB_PREPARE_SHM, (ipcarg_t)shm, 0, NULL, NULL);
    242242        if (rc)
    243243                goto exit;
    244         rc = sync_send_3(fbphone, IPC_M_AS_AREA_SEND, (ipcarg_t)shm, 0, PROTO_READ, NULL, NULL, NULL);
     244        rc = async_req_3(fbphone, IPC_M_AS_AREA_SEND, (ipcarg_t)shm, 0, PROTO_READ, NULL, NULL, NULL);
    245245        if (rc)
    246246                goto drop;
    247247        /* Draw logo */
    248         nsend_call_2(fbphone, FB_DRAW_PPM, x, y);
     248        async_msg_2(fbphone, FB_DRAW_PPM, x, y);
    249249drop:
    250250        /* Drop area */
    251         nsend_call(fbphone, FB_DROP_SHM, 0);
     251        async_msg(fbphone, FB_DROP_SHM, 0);
    252252exit:       
    253253        /* Remove area */
     
    298298        memcpy(shm, data, size);
    299299        /* Send area */
    300         rc = sync_send_2(fbphone, FB_PREPARE_SHM, (ipcarg_t)shm, 0, NULL, NULL);
     300        rc = async_req_2(fbphone, FB_PREPARE_SHM, (ipcarg_t)shm, 0, NULL, NULL);
    301301        if (rc)
    302302                goto exit;
    303         rc = sync_send_3(fbphone, IPC_M_AS_AREA_SEND, (ipcarg_t)shm, 0, PROTO_READ, NULL, NULL, NULL);
     303        rc = async_req_3(fbphone, IPC_M_AS_AREA_SEND, (ipcarg_t)shm, 0, PROTO_READ, NULL, NULL, NULL);
    304304        if (rc)
    305305                goto drop;
    306306
    307307        /* Obtain pixmap */
    308         rc = sync_send(fbphone, FB_SHM2PIXMAP, 0, NULL);
     308        rc = async_req(fbphone, FB_SHM2PIXMAP, 0, NULL);
    309309        if (rc < 0)
    310310                goto drop;
     
    312312drop:
    313313        /* Drop area */
    314         nsend_call(fbphone, FB_DROP_SHM, 0);
     314        async_msg(fbphone, FB_DROP_SHM, 0);
    315315exit:       
    316316        /* Remove area */
Note: See TracChangeset for help on using the changeset viewer.