Ignore:
Timestamp:
2012-01-21T15:06:51Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ce7676c
Parents:
e86b8f0
Message:

Allow multiple tasks to register for loc category change events.
Open NIC devices via location service, discover using category change events.
Eliminate device_added driver entry point.
loc_service_get_name() should return fully qualified service name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/nil/nildummy/nildummy.c

    re86b8f0 r77a69ea  
    5353#include <packet_remote.h>
    5454#include <packet_client.h>
    55 #include <devman.h>
    5655#include <device/nic.h>
     56#include <loc.h>
    5757#include <nil_skel.h>
    5858#include "nildummy.h"
     
    115115 */
    116116static int nildummy_device_message(nic_device_id_t device_id,
    117     devman_handle_t handle, size_t mtu)
     117    service_id_t sid, size_t mtu)
    118118{
    119119        fibril_rwlock_write_lock(&nildummy_globals.devices_lock);
     
    123123            nildummy_devices_find(&nildummy_globals.devices, device_id);
    124124        if (device) {
    125                 if (device->handle != handle) {
     125                if (device->sid != sid) {
    126126                        printf("Device %d exists, handles do not match\n",
    127127                            device->device_id);
     
    158158       
    159159        device->device_id = device_id;
    160         device->handle = handle;
     160        device->sid = sid;
    161161        if (mtu > 0)
    162162                device->mtu = mtu;
     
    165165       
    166166        /* Bind the device driver */
    167         device->sess = devman_device_connect(EXCHANGE_SERIALIZE, handle,
     167        device->sess = loc_service_connect(EXCHANGE_SERIALIZE, sid,
    168168            IPC_FLAG_BLOCKING);
    169169        if (device->sess == NULL) {
Note: See TracChangeset for help on using the changeset viewer.