Changeset 0a866eeb in mainline for uspace/lib/net/generic


Ignore:
Timestamp:
2010-10-08T19:45:11Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c69d327
Parents:
d52fbaf
Message:

Fix packet_get_copy() and socket_destroy_core() to use the remote packet
interfaces.

Fix packet_client.h to declare the remote packet interfaces and create
packet_local.h for the use by the packet server (or later possibly also by the
bundle build).

Location:
uspace/lib/net/generic
Files:
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/generic/packet_client.c

    rd52fbaf r0a866eeb  
    4141#include <sys/mman.h>
    4242
     43#include <packet_client.h>
     44
    4345#include <net_messages.h>
    4446#include <packet/packet.h>
    4547#include <packet/packet_header.h>
    46 #include <packet/packet_client.h>
    4748
    4849int packet_copy_data(packet_t packet, const void * data, size_t length)
     
    181182
    182183        // get a new packet
    183         copy = packet_get_4_local(phone, PACKET_DATA_LENGTH(packet),
     184        copy = packet_get_4_remote(phone, PACKET_DATA_LENGTH(packet),
    184185            PACKET_MAX_ADDRESS_LENGTH(packet), packet->max_prefix,
    185186            PACKET_MIN_SUFFIX(packet));
     
    199200                return copy;
    200201        } else {
    201                 pq_release_local(phone, copy->packet_id);
     202                pq_release_remote(phone, copy->packet_id);
    202203                return NULL;
    203204        }
  • uspace/lib/net/generic/packet_remote.c

    rd52fbaf r0a866eeb  
    4444
    4545#include <net_messages.h>
     46#include <packet_client.h>
     47#include <packet_remote.h>
     48
    4649#include <packet/packet.h>
    47 #include <packet/packet_client.h>
    4850#include <packet/packet_header.h>
    49 #include <packet_remote.h>
    5051
    5152/** Obtain the packet from the packet server as the shared memory block.
  • uspace/lib/net/generic/socket_core.c

    rd52fbaf r0a866eeb  
    4747#include <adt/int_map.h>
    4848#include <packet/packet.h>
    49 #include <packet/packet_client.h>
     49#include <packet_client.h>
     50#include <packet_remote.h>
    5051#include <net/modules.h>
    5152#include <socket_core.h>
     
    9192        // release all received packets
    9293        while((packet_id = dyn_fifo_pop(&socket->received)) >= 0){
    93                 pq_release_local(packet_phone, packet_id);
     94                pq_release_remote(packet_phone, packet_id);
    9495        }
    9596        dyn_fifo_destroy(&socket->received);
Note: See TracChangeset for help on using the changeset viewer.