Ignore:
Timestamp:
2011-06-01T08:43:42Z (14 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d6c1f1
Parents:
9e2e715 (diff), e51a514 (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:

Huuuuuge merge from development - all the work actually :)

File:
1 edited

Legend:

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

    r9e2e715 reb522e8  
    3838#include <async.h>
    3939#include <errno.h>
    40 #include <ipc/ipc.h>
    4140#include <ipc/packet.h>
    4241#include <sys/mman.h>
     
    6463 */
    6564static int
    66 packet_return(int phone, packet_ref packet, packet_id_t packet_id, size_t size)
     65packet_return(int phone, packet_t **packet, packet_id_t packet_id, size_t size)
    6766{
    6867        ipc_call_t answer;
     
    7271        message = async_send_1(phone, NET_PACKET_GET, packet_id, &answer);
    7372
    74         *packet = (packet_t) as_get_mappable_page(size);
     73        *packet = (packet_t *) as_get_mappable_page(size);
    7574        rc = async_share_in_start_0_0(phone, *packet, size);
    7675        if (rc != EOK) {
     
    8685        }
    8786       
    88         ipcarg_t result;
     87        sysarg_t result;
    8988        async_wait_for(message, &result);
    9089       
     
    10099 * @param[out] packet   The packet reference.
    101100 * @param[in] packet_id The packet identifier.
    102  * @returns             EOK on success.
    103  * @returns             EINVAL if the packet parameter is NULL.
    104  * @returns             Other error codes as defined for the NET_PACKET_GET_SIZE
     101 * @return              EOK on success.
     102 * @return              EINVAL if the packet parameter is NULL.
     103 * @return              Other error codes as defined for the NET_PACKET_GET_SIZE
    105104 *                      message.
    106  * @returns             Other error codes as defined for the packet_return()
     105 * @return              Other error codes as defined for the packet_return()
    107106 *                      function.
    108107 */
    109 int packet_translate_remote(int phone, packet_ref packet, packet_id_t packet_id)
     108int packet_translate_remote(int phone, packet_t **packet, packet_id_t packet_id)
    110109{
    111110        int rc;
     
    116115        *packet = pm_find(packet_id);
    117116        if (!*packet) {
    118                 ipcarg_t size;
     117                sysarg_t size;
    119118               
    120119                rc = async_req_1_1(phone, NET_PACKET_GET_SIZE, packet_id,
     
    127126        }
    128127        if ((*packet)->next) {
    129                 packet_t next;
     128                packet_t *next;
    130129               
    131130                return packet_translate_remote(phone, &next, (*packet)->next);
     
    145144 * @param[in] max_content The maximal content length in bytes.
    146145 * @param[in] max_suffix The maximal suffix length in bytes.
    147  * @returns             The packet reference.
    148  * @returns             NULL on error.
    149  */
    150 packet_t packet_get_4_remote(int phone, size_t max_content, size_t addr_len,
     146 * @return              The packet reference.
     147 * @return              NULL on error.
     148 */
     149packet_t *packet_get_4_remote(int phone, size_t max_content, size_t addr_len,
    151150    size_t max_prefix, size_t max_suffix)
    152151{
    153         ipcarg_t packet_id;
    154         ipcarg_t size;
     152        sysarg_t packet_id;
     153        sysarg_t size;
    155154        int rc;
    156155       
     
    161160       
    162161       
    163         packet_t packet = pm_find(packet_id);
     162        packet_t *packet = pm_find(packet_id);
    164163        if (!packet) {
    165164                rc = packet_return(phone, &packet, packet_id, size);
     
    177176 * @param[in] phone     The packet server module phone.
    178177 * @param[in] content   The maximal content length in bytes.
    179  * @returns             The packet reference.
    180  * @returns             NULL on error.
    181  */
    182 packet_t packet_get_1_remote(int phone, size_t content)
    183 {
    184         ipcarg_t packet_id;
    185         ipcarg_t size;
     178 * @return              The packet reference.
     179 * @return              NULL on error.
     180 */
     181packet_t *packet_get_1_remote(int phone, size_t content)
     182{
     183        sysarg_t packet_id;
     184        sysarg_t size;
    186185        int rc;
    187186       
     
    191190                return NULL;
    192191       
    193         packet_t packet = pm_find(packet_id);
     192        packet_t *packet = pm_find(packet_id);
    194193        if (!packet) {
    195194                rc = packet_return(phone, &packet, packet_id, size);
Note: See TracChangeset for help on using the changeset viewer.