Changeset 46b881c in mainline for uspace/srv/hid/fb/ega.c


Ignore:
Timestamp:
2011-01-29T11:36:41Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b6931a, 8add9ca5
Parents:
e26a4633 (diff), ffa2c8ef (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

IPC/async: strictly isolate the use of low-level IPC methods (ipc_*) and async framework methods (async_*) in user code, do not allow a mixture of both in a single source file

Benefits for future plans

  • The async framework could use different communication style under the hood, but keeping the same high-level API
  • The async framework can be integrated more tightly with sessions without potential problems of intermixing session-aware async methods with session-unaware low-level methods in user code
  • The async_serialize_start()/_end() can be deprecated more easily
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/fb/ega.c

    re26a4633 r46b881c  
    3939#include <align.h>
    4040#include <async.h>
    41 #include <ipc/ipc.h>
    4241#include <errno.h>
    4342#include <stdio.h>
     
    4645#include <as.h>
    4746#include <ipc/fb.h>
    48 #include <ipc/ipc.h>
    4947#include <ipc/ns.h>
    5048#include <ipc/services.h>
     
    262260       
    263261        if (client_connected) {
    264                 ipc_answer_0(iid, ELIMIT);
     262                async_answer_0(iid, ELIMIT);
    265263                return;
    266264        }
     
    268266        /* Accept connection */
    269267        client_connected = 1;
    270         ipc_answer_0(iid, EOK);
     268        async_answer_0(iid, EOK);
    271269       
    272270        while (true) {
     
    296294                case IPC_M_PHONE_HUNGUP:
    297295                        client_connected = 0;
    298                         ipc_answer_0(callid, EOK);
     296                        async_answer_0(callid, EOK);
    299297                       
    300298                        /* Exit thread */
     
    332330                        break;
    333331                case FB_GET_CSIZE:
    334                         ipc_answer_2(callid, EOK, scr_width, scr_height);
     332                        async_answer_2(callid, EOK, scr_width, scr_height);
    335333                        continue;
    336334                case FB_GET_COLOR_CAP:
    337                         ipc_answer_1(callid, EOK, FB_CCAP_INDEXED);
     335                        async_answer_1(callid, EOK, FB_CCAP_INDEXED);
    338336                        continue;
    339337                case FB_CLEAR:
     
    440438                        retval = EINVAL;
    441439                }
    442                 ipc_answer_0(callid, retval);
     440                async_answer_0(callid, retval);
    443441        }
    444442}
Note: See TracChangeset for help on using the changeset viewer.