Changeset 250717cc in mainline for init/init.c


Ignore:
Timestamp:
2006-05-16T09:30:42Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ec153a0
Parents:
51d6f80
Message:

Add services.h to codify service numbers.
Assign codes for PCI, keyboard and frame buffer services.

Rename ipc_answer() to ipc_answer_fast() and add the basic
slower variant and call it ipc_answer(). Add some doxygen comments.

Remove unused bits from the libpci library.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • init/init.c

    r51d6f80 r250717cc  
    2929#include "version.h"
    3030#include <ipc.h>
     31#include <services.h>
    3132#include <stdio.h>
    3233#include <unistd.h>
     
    4041#include <ddi.h>
    4142#include <string.h>
     43#include <errno.h>
    4244#include <kbd.h>
    4345
     
    203205                callid = ipc_wait_for_call(&data, NULL);
    204206                printf("Received ping\n");
    205                 ipc_answer(callid, 0, 0, 0);
     207                ipc_answer_fast(callid, 0, 0, 0);
    206208        }
    207209//      callid = ipc_wait_for_call(&data, NULL);
     
    301303
    302304        printf("Test: Starting connect...\n");
    303         while ((phoneid = ipc_connect_me_to(PHONE_NS, 30, 60)) < 0) {
     305        while ((phoneid = ipc_connect_me_to(PHONE_NS, SERVICE_KEYBOARD, 0)) < 0) {
    304306        };
    305307       
     
    314316        printf("Test: Hangin up\n");
    315317        ipc_hangup(phoneid);
     318}
     319
     320static void test_pci()
     321{
     322        int phone;
     323        while ((phone = ipc_connect_me_to(PHONE_NS, SERVICE_PCI, 0)) < 0)
     324                ;
     325        printf("Connected to PCI service through phone %d.\n", phone);
    316326}
    317327
     
    355365//      test_slam();
    356366//      test_as_send();
     367        test_pci();
    357368        test_kbd();
    358369
     
    378389
    379390        int i;
    380        
     391
    381392        for (i = 0; i < 50000000; i++)
    382393                ;
     
    401412        printf("Main thread exiting.\n");
    402413*/
     414
    403415        return 0;
    404416}
Note: See TracChangeset for help on using the changeset viewer.