Changeset b535aeb in mainline for uspace


Ignore:
Timestamp:
2010-03-20T22:02:05Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
37f527b
Parents:
39e8406 (diff), 4e9aaf5 (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:

Merge mainline changes.

Location:
uspace
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile

    r39e8406 rb535aeb  
    3030#
    3131
     32-include ../Makefile.common
    3233-include ../Makefile.config
    3334
  • uspace/app/Makefile.common

    r39e8406 rb535aeb  
    6060all: \
    6161    $(LIBC_PREFIX)/../../../version \
     62    $(LIBC_PREFIX)/../../../Makefile.common \
    6263    $(LIBC_PREFIX)/../../../Makefile.config \
    6364    $(LIBC_PREFIX)/../../../config.h \
    64     $(LIBC_PREFIX)/../../../config.defs \
    6565    $(LIBS) \
    6666    \
  • uspace/lib/Makefile.common

    r39e8406 rb535aeb  
    5050OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
    5151
     52-include $(USPACE_PREFIX)/../Makefile.common
    5253-include $(USPACE_PREFIX)/../Makefile.config
    5354include $(LIBC_PREFIX)/Makefile.toolchain
     
    5960all: \
    6061    $(LIBC_PREFIX)/../../../version \
     62    $(LIBC_PREFIX)/../../../Makefile.common \
    6163    $(LIBC_PREFIX)/../../../Makefile.config \
    6264    $(LIBC_PREFIX)/../../../config.h \
    63     $(LIBC_PREFIX)/../../../config.defs \
    6465    $(LIBS) \
    6566    \
  • uspace/lib/libc/Makefile

    r39e8406 rb535aeb  
    2828#
    2929
     30-include ../../../Makefile.common
    3031-include ../../../Makefile.config
    3132
  • uspace/lib/libc/Makefile.toolchain

    r39e8406 rb535aeb  
    5353AFLAGS =
    5454
    55 ## Cross-toolchain prefix
    56 #
    57 
    58 ifndef CROSS_PREFIX
    59         CROSS_PREFIX = /usr/local
    60 endif
    61 
    6255## Setup platform configuration
    6356#
    6457
     58-include $(LIBC_PREFIX)/../../../Makefile.common
    6559-include $(LIBC_PREFIX)/../../../Makefile.config
    66 -include $(LIBC_PREFIX)/../../../config.defs
    6760-include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.inc
    6861
    69 ## Simple detection of the host system
    70 #
    71 HOST = $(shell uname)
    72 
    73 ## On Solaris, some utilities have different names
    74 #
    75 ifeq ($(HOST),SunOS)
    76         BINUTILS_PREFIX = "g"
    77 else
    78         BINUTILS_PREFIX = ""
    79 endif
    80 
    81 ## Toolchain configuration
     62## Compilation options
    8263#
    8364
     
    8566
    8667ifeq ($(COMPILER),gcc_cross)
    87         CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc
    88         GCC = $(CC)
    89         AS = $(TOOLCHAIN_DIR)/$(TARGET)-as
    90         LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
    91         AR = $(TOOLCHAIN_DIR)/$(TARGET)-ar
    92         OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
    93         OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
    9468        CFLAGS = $(GCC_CFLAGS)
    9569        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     
    9771
    9872ifeq ($(COMPILER),gcc_native)
    99         CC = gcc
    100         GCC = $(CC)
    101         AS = $(BINUTILS_PREFIX)as
    102         LD = $(BINUTILS_PREFIX)ld
    103         AR = $(BINUTILS_PREFIX)ar
    104         OBJCOPY = $(BINUTILS_PREFIX)objcopy
    105         OBJDUMP = $(BINUTILS_PREFIX)objdump
    10673        CFLAGS = $(GCC_CFLAGS)
    10774        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     
    10976
    11077ifeq ($(COMPILER),icc)
    111         CC = icc
    112         GCC = gcc
    113         AS = as
    114         LD = ld
    115         AR = ar
    116         OBJCOPY = objcopy
    117         OBJDUMP = objdump
    11878        CFLAGS = $(ICC_CFLAGS)
    11979        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
     
    12181
    12282ifeq ($(COMPILER),clang)
    123         CC = clang
    124         GCC = gcc
    125         AS = $(BINUTILS_PREFIX)as
    126         LD = $(BINUTILS_PREFIX)ld
    127         AR = $(BINUTILS_PREFIX)ar
    128         OBJCOPY = $(BINUTILS_PREFIX)objcopy
    129         OBJDUMP = $(BINUTILS_PREFIX)objdump
    13083        CFLAGS = $(CLANG_CFLAGS)
    13184        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
  • uspace/lib/libc/arch/abs32le/Makefile.inc

    r39e8406 rb535aeb  
    2727#
    2828
    29 ## Toolchain configuration
    30 #
    31 
    32 ifeq ($(COMPILER),gcc_cross)
    33         TOOLCHAIN_DIR = $(CROSS_PREFIX)/$(CROSS_TARGET)/bin
    34        
    35         ifeq ($(CROSS_TARGET),arm32)
    36                 TARGET = arm-linux-gnu
    37         endif
    38        
    39         ifeq ($(CROSS_TARGET),ia32)
    40                 TARGET = i686-pc-linux-gnu
    41         endif
    42        
    43         ifeq ($(CROSS_TARGET),mips32)
    44                 TARGET = mipsel-linux-gnu
    45         endif
    46 endif
    47 
    4829ifeq ($(COMPILER),clang)
    4930        CLANG_ARCH = i386
  • uspace/lib/libc/arch/amd64/Makefile.inc

    r39e8406 rb535aeb  
    2727#
    2828
    29 ## Toolchain configuration
    30 #
    31 
    32 TARGET = amd64-linux-gnu
    3329CLANG_ARCH = x86_64
    34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/amd64/bin
    3530
    3631ARCH_SOURCES = \
  • uspace/lib/libc/arch/arm32/Makefile.inc

    r39e8406 rb535aeb  
    2828#
    2929
    30 ## Toolchain configuration
    31 #
    32 
    33 TARGET = arm-linux-gnu
    34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/arm32/bin
    35 
    3630ARCH_SOURCES = \
    3731        arch/$(UARCH)/src/entry.s \
  • uspace/lib/libc/arch/ia32/Makefile.inc

    r39e8406 rb535aeb  
    2727#
    2828
    29 ## Toolchain configuration
    30 #
    31 
    32 TARGET = i686-pc-linux-gnu
    3329CLANG_ARCH = i386
    34 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ia32/bin
    3530
    3631ARCH_SOURCES = \
  • uspace/lib/libc/arch/ia64/Makefile.inc

    r39e8406 rb535aeb  
    2727#
    2828
    29 ## Toolchain configuration
    30 #
    31 
    32 TARGET = ia64-pc-linux-gnu
    33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ia64/bin
    34 
    3529ARCH_SOURCES = \
    3630        arch/$(UARCH)/src/entry.s \
  • uspace/lib/libc/arch/mips32/Makefile.inc

    r39e8406 rb535aeb  
    2727#
    2828
    29 ## Toolchain configuration
    30 #
    31 
    32 TARGET = mipsel-linux-gnu
    33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips32/bin
    34 
    3529ARCH_SOURCES = \
    3630        arch/$(UARCH)/src/entry.s \
  • uspace/lib/libc/arch/mips32eb/Makefile.inc

    r39e8406 rb535aeb  
    2727#
    2828
    29 ## Toolchain configuration
    30 #
    31 
    32 TARGET = mips-linux-gnu
    33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/mips32eb/bin
    34 
    3529ARCH_SOURCES = \
    3630        arch/$(UARCH)/src/entry.s \
  • uspace/lib/libc/arch/ppc32/Makefile.inc

    r39e8406 rb535aeb  
    2727#
    2828
    29 ## Toolchain configuration
    30 #
    31 
    32 TARGET = ppc-linux-gnu
    33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/ppc32/bin
    34 
    3529ARCH_SOURCES = \
    3630        arch/$(UARCH)/src/entry.s \
  • uspace/lib/libc/arch/sparc64/Makefile.inc

    r39e8406 rb535aeb  
    2727#
    2828
    29 ## Toolchain configuration
    30 #
    31 
    32 TARGET = sparc64-linux-gnu
    33 TOOLCHAIN_DIR = $(CROSS_PREFIX)/sparc64/bin
    34 
    3529ARCH_SOURCES = \
    3630        arch/$(UARCH)/src/entry.s \
  • uspace/srv/Makefile.common

    r39e8406 rb535aeb  
    6464all: \
    6565    $(LIBC_PREFIX)/../../../version \
     66    $(LIBC_PREFIX)/../../../Makefile.common \
    6667    $(LIBC_PREFIX)/../../../Makefile.config \
    6768    $(LIBC_PREFIX)/../../../config.h \
    68     $(LIBC_PREFIX)/../../../config.defs \
    6969    $(LIBS) \
    7070    \
     
    7777        find . -name '*.o' -follow -exec rm \{\} \;
    7878
    79 build: 
     79build:
    8080
    8181-include $(DEPEND)
  • uspace/srv/hid/char_mouse/chardev.c

    r39e8406 rb535aeb  
    4848static int dev_phone;
    4949
    50 #define NAME "kbd"
     50#define NAME "char_mouse"
    5151
    5252int mouse_port_init(void)
  • uspace/srv/hid/char_mouse/proto/ps2.c

    r39e8406 rb535aeb  
    3636
    3737#include <stdio.h>
     38#include <mouse_port.h>
     39#include <char_mouse.h>
    3840#include <mouse_proto.h>
    39 #include <char_mouse.h>
    4041
    4142#define BUFSIZE 3
     43
     44#define PS2_MOUSE_OUT_INIT  0xf4
     45#define PS2_MOUSE_ACK       0xfa
    4246
    4347typedef struct {
     
    6771int mouse_proto_init(void)
    6872{
     73        mouse_port_write(PS2_MOUSE_OUT_INIT);
    6974        return 0;
    7075}
  • uspace/srv/hid/console/Makefile

    r39e8406 rb535aeb  
    3232.PHONY: all clean
    3333
    34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS)
     34all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS)
    3535        -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    3636        $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
  • uspace/srv/hid/fb/Makefile

    r39e8406 rb535aeb  
    3232.PHONY: all clean
    3333
    34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS)
     34all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS)
    3535        -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    3636        $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
  • uspace/srv/hid/kbd/Makefile

    r39e8406 rb535aeb  
    3232.PHONY: all clean
    3333
    34 all: $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBC_PREFIX)/../../../config.defs $(LIBS)
     34all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS)
    3535        -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    3636        $(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
  • uspace/srv/hw/char/i8042/i8042.c

    r39e8406 rb535aeb  
    6868#define i8042_KBD_TRANSLATE     0x40
    6969
    70 /* Mouse constants */
    71 #define MOUSE_OUT_INIT  0xf4
    72 #define MOUSE_ACK       0xfa
    7370
    7471enum {
     
    177174        async_set_interrupt_received(i8042_irq_handler);
    178175
    179         /* Disable kbd, enable mouse */
     176        /* Disable kbd and aux */
     177        wait_ready();
    180178        pio_write_8(&i8042->status, i8042_CMD_WRITE_CMDB);
    181179        wait_ready();
    182         pio_write_8(&i8042->status, i8042_CMD_WRITE_CMDB);
    183         wait_ready();
    184         pio_write_8(&i8042->data, i8042_KBD_DISABLE);
    185         wait_ready();
     180        pio_write_8(&i8042->data, i8042_KBD_DISABLE | i8042_AUX_DISABLE);
    186181
    187182        /* Flush all current IO */
    188183        while (pio_read_8(&i8042->status) & i8042_OUTPUT_FULL)
    189184                (void) pio_read_8(&i8042->data);
    190 
    191         i8042_port_write(DEVID_AUX, MOUSE_OUT_INIT);
    192185
    193186        i8042_kbd.cmds[0].addr = (void *) &((i8042_t *) i8042_kernel)->status;
     
    195188        ipc_register_irq(sysinfo_value("i8042.inr_a"), device_assign_devno(), 0, &i8042_kbd);
    196189        ipc_register_irq(sysinfo_value("i8042.inr_b"), device_assign_devno(), 0, &i8042_kbd);
    197 
     190        printf("i8042: registered for interrupts %d and %d\n",
     191            sysinfo_value("i8042.inr_a"), sysinfo_value("i8042.inr_b"));
     192
     193        wait_ready();
    198194        pio_write_8(&i8042->status, i8042_CMD_WRITE_CMDB);
    199195        wait_ready();
    200196        pio_write_8(&i8042->data, i8042_KBD_IE | i8042_KBD_TRANSLATE |
    201197            i8042_AUX_IE);
    202         wait_ready();
    203198
    204199        return 0;
     
    271266{
    272267        if (devid == DEVID_AUX) {
     268                wait_ready();
    273269                pio_write_8(&i8042->status, i8042_CMD_WRITE_AUX);
    274                 wait_ready();
    275         }
     270        }
     271        wait_ready();
    276272        pio_write_8(&i8042->data, data);
    277         wait_ready();
    278273}
    279274
  • uspace/srv/loader/Makefile

    r39e8406 rb535aeb  
    2828#
    2929
     30-include ../../../Makefile.common
    3031-include ../../../Makefile.config
    3132-include arch/$(UARCH)/Makefile.inc
  • uspace/srv/net/Makefile

    r39e8406 rb535aeb  
    2727#
    2828
     29include ../../../Makefile.common
    2930include ../../../Makefile.config
    3031
  • uspace/srv/net/app/echo/Makefile

    r39e8406 rb535aeb  
    3232STRUCTURES = $(NET_BASE)structures/
    3333
     34include ../../../../../Makefile.common
    3435include ../../../../../Makefile.config
    3536
  • uspace/srv/net/app/nettest1/Makefile

    r39e8406 rb535aeb  
    3232STRUCTURES = $(NET_BASE)structures/
    3333
     34include ../../../../../Makefile.common
    3435include ../../../../../Makefile.config
    3536
  • uspace/srv/net/app/nettest2/Makefile

    r39e8406 rb535aeb  
    3232STRUCTURES = $(NET_BASE)structures/
    3333
     34include ../../../../../Makefile.common
    3435include ../../../../../Makefile.config
    3536
  • uspace/srv/net/app/ping/Makefile

    r39e8406 rb535aeb  
    3232STRUCTURES = $(NET_BASE)structures/
    3333
     34include ../../../../../Makefile.common
    3435include ../../../../../Makefile.config
    3536
  • uspace/srv/net/il/ip/ip.c

    r39e8406 rb535aeb  
    895895        ip_pseudo_header_ref header;
    896896        size_t headerlen;
     897        device_id_t device_id;
    897898
    898899        *answer_count = 0;
     
    921922                case NET_IP_GET_ROUTE:
    922923                        ERROR_PROPAGATE(data_receive((void **) &addr, &addrlen));
    923                         ERROR_PROPAGATE(ip_get_route_req(0, IP_GET_PROTOCOL(call), addr, (socklen_t) addrlen, IPC_SET_DEVICE(answer), &header, &headerlen));
     924                        ERROR_PROPAGATE(ip_get_route_req(0, IP_GET_PROTOCOL(call), addr, (socklen_t) addrlen,
     925                            &device_id, &header, &headerlen));
     926                        *IPC_SET_DEVICE(answer) = device_id;
    924927                        *IP_SET_HEADERLEN(answer) = headerlen;
    925928                        *answer_count = 2;
  • uspace/srv/net/il/ip/ip_messages.h

    r39e8406 rb535aeb  
    8282 *  @param[out] answer The message answer structure.
    8383 */
    84 #define IP_SET_HEADERLEN(answer)        ((size_t *) &IPC_GET_ARG2(*answer))
     84#define IP_SET_HEADERLEN(answer)        (&IPC_GET_ARG2(*answer))
    8585
    8686/** Returns the network mask message parameter.
  • uspace/srv/net/messages.h

    r39e8406 rb535aeb  
    391391 *  @param[out] answer The message answer structure.
    392392 */
    393 #define IPC_SET_DEVICE(answer)  ((device_id_t *) &IPC_GET_ARG1(*answer))
     393#define IPC_SET_DEVICE(answer)  (&IPC_GET_ARG1(*answer))
    394394
    395395/** Sets the minimum address length in the message answer.
    396396 *  @param[out] answer The message answer structure.
    397397 */
    398 #define IPC_SET_ADDR(answer)            ((size_t *) &IPC_GET_ARG1(*answer))
     398#define IPC_SET_ADDR(answer)            (&IPC_GET_ARG1(*answer))
    399399
    400400/*@}*/
     
    407407 *  @param[out] answer The message answer structure.
    408408 */
    409 #define IPC_SET_PREFIX(answer)  ((size_t *) &IPC_GET_ARG2(*answer))
     409#define IPC_SET_PREFIX(answer)  (&IPC_GET_ARG2(*answer))
    410410
    411411/*@}*/
     
    418418 *  @param[out] answer The message answer structure.
    419419 */
    420 #define IPC_SET_CONTENT(answer) ((size_t *) &IPC_GET_ARG3(*answer))
     420#define IPC_SET_CONTENT(answer) (&IPC_GET_ARG3(*answer))
    421421
    422422/*@}*/
     
    429429 *  @param[out] answer The message answer structure.
    430430 */
    431 #define IPC_SET_SUFFIX(answer)  ((size_t *) &IPC_GET_ARG4(*answer))
     431#define IPC_SET_SUFFIX(answer)  (&IPC_GET_ARG4(*answer))
    432432
    433433/*@}*/
  • uspace/srv/net/net/Makefile

    r39e8406 rb535aeb  
    3232STRUCTURES = $(NET_BASE)structures/
    3333
     34include $(NET_BASE)../../../Makefile.common
    3435include $(NET_BASE)../../../Makefile.config
    3536
  • uspace/srv/net/net/start/Makefile

    r39e8406 rb535aeb  
    3232STRUCTURES = $(NET_BASE)structures/
    3333
     34include ../../../../../Makefile.common
    3435include ../../../../../Makefile.config
    3536
  • uspace/srv/net/netif/dp8390/Makefile

    r39e8406 rb535aeb  
    3232STRUCTURES = $(NET_BASE)structures/
    3333
     34include $(NET_BASE)../../../Makefile.common
    3435include $(NET_BASE)../../../Makefile.config
    3536
  • uspace/srv/net/netif/lo/Makefile

    r39e8406 rb535aeb  
    3232STRUCTURES = $(NET_BASE)structures/
    3333
     34include $(NET_BASE)../../../Makefile.common
    3435include $(NET_BASE)../../../Makefile.config
    3536
  • uspace/srv/net/socket/socket_messages.h

    r39e8406 rb535aeb  
    115115 *  @param[out] answer The message answer structure.
    116116 */
    117 #define SOCKET_SET_SOCKET_ID(answer)                    (int *) &IPC_GET_ARG1(answer)
     117#define SOCKET_SET_SOCKET_ID(answer)            &IPC_GET_ARG1(answer)
    118118
    119119/** Returns the socket identifier message parameter.
    120120 *  @param[in] call The message call structure.
    121121 */
    122 #define SOCKET_GET_SOCKET_ID(call)                      (int) IPC_GET_ARG1(call)
     122#define SOCKET_GET_SOCKET_ID(call)              (int) IPC_GET_ARG1(call)
    123123
    124124/** Sets the read data length in the message answer.
    125125 *  @param[out] answer The message answer structure.
    126126 */
    127 #define SOCKET_SET_READ_DATA_LENGTH(answer)     (int *) &IPC_GET_ARG1(answer)
     127#define SOCKET_SET_READ_DATA_LENGTH(answer)     &IPC_GET_ARG1(answer)
    128128
    129129/** Returns the read data length message parameter.
    130130 *  @param[in] call The message call structure.
    131131 */
    132 #define SOCKET_GET_READ_DATA_LENGTH(call)               (int) IPC_GET_ARG1(call)
     132#define SOCKET_GET_READ_DATA_LENGTH(call)       (int) IPC_GET_ARG1(call)
    133133
    134134/** Returns the backlog message parameter.
    135135 *  @param[in] call The message call structure.
    136136 */
    137 #define SOCKET_GET_BACKLOG(call)                                (int) IPC_GET_ARG2(call)
     137#define SOCKET_GET_BACKLOG(call)                (int) IPC_GET_ARG2(call)
    138138
    139139/** Returns the option level message parameter.
    140140 *  @param[in] call The message call structure.
    141141 */
    142 #define SOCKET_GET_OPT_LEVEL(call)                      (int) IPC_GET_ARG2(call)
     142#define SOCKET_GET_OPT_LEVEL(call)              (int) IPC_GET_ARG2(call)
    143143
    144144/** Returns the data fragment size message parameter.
     
    150150 *  @param[out] answer The message answer structure.
    151151 */
    152 #define SOCKET_SET_DATA_FRAGMENT_SIZE(answer)   (size_t *) &IPC_GET_ARG2(answer)
     152#define SOCKET_SET_DATA_FRAGMENT_SIZE(answer)   &IPC_GET_ARG2(answer)
    153153
    154154/** Sets the address length in the message answer.
    155155 *  @param[out] answer The message answer structure.
    156156 */
    157 #define SOCKET_SET_ADDRESS_LENGTH(answer)               (socklen_t *) &IPC_GET_ARG3(answer)
     157#define SOCKET_SET_ADDRESS_LENGTH(answer)       &IPC_GET_ARG3(answer)
    158158
    159159/** Returns the address length message parameter.
     
    165165 *  @param[out] answer The message answer structure.
    166166 */
    167 #define SOCKET_SET_HEADER_SIZE(answer)          (int *) &IPC_GET_ARG3(answer)
     167#define SOCKET_SET_HEADER_SIZE(answer)          &IPC_GET_ARG3(answer)
    168168
    169169/** Returns the header size message parameter.
    170170 *  @param[in] call The message call structure.
    171171 */
    172 #define SOCKET_GET_HEADER_SIZE(call)                    (int) IPC_GET_ARG3(call)
     172#define SOCKET_GET_HEADER_SIZE(call)            (size_t) IPC_GET_ARG3(call)
    173173
    174174/** Returns the flags message parameter.
    175175 *  @param[in] call The message call structure.
    176176 */
    177 #define SOCKET_GET_FLAGS(call)                          (int) IPC_GET_ARG4(call)
     177#define SOCKET_GET_FLAGS(call)                  (int) IPC_GET_ARG4(call)
    178178
    179179/** Returns the option name message parameter.
    180180 *  @param[in] call The message call structure.
    181181 */
    182 #define SOCKET_GET_OPT_NAME(call)                               (int) IPC_GET_ARG4(call)
     182#define SOCKET_GET_OPT_NAME(call)               (int) IPC_GET_ARG4(call)
    183183
    184184/** Returns the data fragments message parameter.
  • uspace/srv/net/tl/tcp/tcp.c

    r39e8406 rb535aeb  
    10601060        int app_phone = IPC_GET_PHONE(&call);
    10611061        struct sockaddr * addr;
     1062        int socket_id;
    10621063        size_t addrlen;
    10631064        fibril_rwlock_t lock;
     
    11041105                                        socket_data->local_sockets = &local_sockets;
    11051106                                        fibril_rwlock_write_lock(&lock);
    1106                                         *SOCKET_SET_SOCKET_ID(answer) = SOCKET_GET_SOCKET_ID(call);
    1107                                         res = socket_create(&local_sockets, app_phone, socket_data, SOCKET_SET_SOCKET_ID(answer));
     1107                                        socket_id = SOCKET_GET_SOCKET_ID(call);
     1108                                        res = socket_create(&local_sockets, app_phone, socket_data, &socket_id);
     1109                                        *SOCKET_SET_SOCKET_ID(answer) = socket_id;
    11081110                                        fibril_rwlock_write_unlock(&lock);
    11091111                                        if(res == EOK){
  • uspace/srv/net/tl/udp/udp.c

    r39e8406 rb535aeb  
    417417        int app_phone = IPC_GET_PHONE(&call);
    418418        struct sockaddr * addr;
     419        int socket_id;
    419420        size_t addrlen;
    420421        ipc_call_t answer;
     
    451452                                break;
    452453                        case NET_SOCKET:
    453                                 *SOCKET_SET_SOCKET_ID(answer) = SOCKET_GET_SOCKET_ID(call);
    454                                 res = socket_create(&local_sockets, app_phone, NULL, SOCKET_SET_SOCKET_ID(answer));
     454                                socket_id = SOCKET_GET_SOCKET_ID(call);
     455                                res = socket_create(&local_sockets, app_phone, NULL, &socket_id);
     456                                *SOCKET_SET_SOCKET_ID(answer) = socket_id;
     457                               
    455458                                if(res == EOK){
    456459                                        if(tl_get_ip_packet_dimension(udp_globals.ip_phone, &udp_globals.dimensions, DEVICE_INVALID_ID, &packet_dimension) == EOK){
Note: See TracChangeset for help on using the changeset viewer.