Changeset 01ff41c in mainline for init/init.c


Ignore:
Timestamp:
2006-05-27T22:28:25Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7f5b37a
Parents:
7f9cd77
Message:

Added functions to async framework for reasonable sending asynchronous
messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • init/init.c

    r7f9cd77 r01ff41c  
    4444#include <kbd.h>
    4545#include <ipc/fb.h>
     46#include <async.h>
    4647
    4748int a;
     
    319320}
    320321
     322static void test_async_kbd()
     323{
     324        int res;
     325        ipcarg_t result;
     326        ipc_call_t kbddata;
     327        int phoneid;
     328        aid_t aid;
     329
     330        printf("Test: Starting connect...\n");
     331        while ((phoneid = ipc_connect_me_to(PHONE_NS, SERVICE_KEYBOARD, 0)) < 0) {
     332        };
     333       
     334        printf("Test: Connected: %d\n", res);
     335        printf("Test: pinging.\n");
     336        while (1) {
     337                aid = async_send_2(phoneid, KBD_GETCHAR, 0, 0, &kbddata);
     338                async_wait_for(aid, NULL);
     339                printf("%c", IPC_GET_ARG1(kbddata));
     340        }
     341       
     342        printf("Test: Hangin up\n");
     343        ipc_hangup(phoneid);
     344}
     345
    321346static void test_pci()
    322347{
     
    393418//      test_hangup();
    394419//      test_slam();
    395         test_as_area_send();
     420//      test_as_area_send();
    396421//      test_pci();
    397         test_kbd();
     422//      test_kbd();
     423        test_async_kbd();
    398424//      test_fb();
    399425
Note: See TracChangeset for help on using the changeset viewer.