Changeset b77ce84 in mainline for uspace/lib


Ignore:
Timestamp:
2011-04-13T17:27:52Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
34e8bab, a0a134b
Parents:
8b4ce802 (diff), 17279ead (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/lib
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/mips32/include/atomic.h

    r8b4ce802 rb77ce84  
    7070                "       sc %0, %1\n"
    7171                "       beq %0, %4, 1b\n"       /* if the atomic operation failed, try again */
    72                 /*      nop     */              /* nop is inserted automatically by compiler */
    7372                "       nop\n"
    7473                : "=&r" (tmp),
  • uspace/lib/c/generic/adt/measured_strings.c

    r8b4ce802 rb77ce84  
    7474        new->length = length;
    7575        new->value = ((uint8_t *) new) + sizeof(measured_string_t);
    76         // append terminating zero explicitly - to be safe
     76        /* Append terminating zero explicitly - to be safe */
    7777        memcpy(new->value, string, new->length);
    7878        new->value[new->length] = '\0';
  • uspace/lib/c/generic/async.c

    r8b4ce802 rb77ce84  
    15861586 * @param dst     Address of the beginning of the destination buffer.
    15871587 * @param size    Size of the destination buffer.
     1588 * @param flags   Flags to control the data transfer.
    15881589 *
    15891590 * @return Zero on success or a negative error code from errno.h.
    15901591 *
    15911592 */
    1592 int async_data_read_start(int phoneid, void *dst, size_t size)
    1593 {
    1594         return async_req_2_0(phoneid, IPC_M_DATA_READ, (sysarg_t) dst,
    1595             (sysarg_t) size);
     1593int
     1594async_data_read_start_generic(int phoneid, void *dst, size_t size, int flags)
     1595{
     1596        return async_req_3_0(phoneid, IPC_M_DATA_READ, (sysarg_t) dst,
     1597            (sysarg_t) size, (sysarg_t) flags);
    15961598}
    15971599
     
    16831685 * @param src     Address of the beginning of the source buffer.
    16841686 * @param size    Size of the source buffer.
     1687 * @param flags   Flags to control the data transfer.
    16851688 *
    16861689 * @return Zero on success or a negative error code from errno.h.
    16871690 *
    16881691 */
    1689 int async_data_write_start(int phoneid, const void *src, size_t size)
    1690 {
    1691         return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (sysarg_t) src,
    1692             (sysarg_t) size);
     1692int
     1693async_data_write_start_generic(int phoneid, const void *src, size_t size,
     1694    int flags)
     1695{
     1696        return async_req_3_0(phoneid, IPC_M_DATA_WRITE, (sysarg_t) src,
     1697            (sysarg_t) size, (sysarg_t) flags);
    16931698}
    16941699
  • uspace/lib/c/generic/vfs/vfs.c

    r8b4ce802 rb77ce84  
    378378       
    379379        req = async_send_1(vfs_phone, VFS_IN_READ, fildes, &answer);
    380         rc = async_data_read_start(vfs_phone, (void *)buf, nbyte);
     380        rc = async_data_read_start_generic(vfs_phone, (void *) buf, nbyte,
     381            IPC_XF_RESTRICT);
    381382        if (rc != EOK) {
    382383                vfs_exchange_end(vfs_phone);
     
    407408       
    408409        req = async_send_1(vfs_phone, VFS_IN_WRITE, fildes, &answer);
    409         rc = async_data_write_start(vfs_phone, (void *)buf, nbyte);
     410        rc = async_data_write_start_generic(vfs_phone, (void *) buf, nbyte,
     411            IPC_XF_RESTRICT);
    410412        if (rc != EOK) {
    411413                vfs_exchange_end(vfs_phone);
  • uspace/lib/c/include/async.h

    r8b4ce802 rb77ce84  
    341341
    342342extern aid_t async_data_read(int, void *, size_t, ipc_call_t *);
    343 extern int async_data_read_start(int, void *, size_t);
     343#define async_data_read_start(p, buf, len) \
     344        async_data_read_start_generic((p), (buf), (len), IPC_XF_NONE)
     345
     346extern int async_data_read_start_generic(int, void *, size_t, int);
    344347extern bool async_data_read_receive(ipc_callid_t *, size_t *);
    345348extern int async_data_read_finalize(ipc_callid_t, const void *, size_t);
     
    380383            (arg4), (answer))
    381384
    382 extern int async_data_write_start(int, const void *, size_t);
     385#define async_data_write_start(p, buf, len) \
     386        async_data_write_start_generic((p), (buf), (len), IPC_XF_NONE)
     387
     388extern int async_data_write_start_generic(int, const void *, size_t, int);
    383389extern bool async_data_write_receive(ipc_callid_t *, size_t *);
    384390extern int async_data_write_finalize(ipc_callid_t, void *, size_t);
  • uspace/lib/drv/generic/driver.c

    r8b4ce802 rb77ce84  
    4747#include <stdlib.h>
    4848#include <str.h>
     49#include <str_error.h>
    4950#include <ctype.h>
    5051#include <errno.h>
     
    402403                            get_remote_method(rem_iface, iface_method_idx);
    403404                        if (iface_method_ptr == NULL) {
    404                                 // the interface has not such method
     405                                /* The interface has not such method */
    405406                                printf("%s: driver_connection_gen error - "
    406407                                    "invalid interface method.", driver->name);
     
    655656int ddf_driver_main(driver_t *drv)
    656657{
     658        int rc;
     659
    657660        /*
    658661         * Remember the driver structure - driver_ops will be called by generic
     
    668671       
    669672        /*
    670          * Register driver by device manager with generic handler for incoming
    671          * connections.
     673         * Register driver with device manager using generic handler for
     674         * incoming connections.
    672675         */
    673         devman_driver_register(driver->name, driver_connection);
    674        
     676        rc = devman_driver_register(driver->name, driver_connection);
     677        if (rc != EOK) {
     678                printf("Error: Failed to register driver with device manager "
     679                    "(%s).\n", (rc == EEXISTS) ? "driver already started" :
     680                    str_error(rc));
     681               
     682                return 1;
     683        }
     684       
     685        /* Return success from the task since server has started. */
     686        rc = task_retval(0);
     687        if (rc != EOK)
     688                return 1;
     689
    675690        async_manager();
    676691       
  • uspace/lib/net/generic/generic.c

    r8b4ce802 rb77ce84  
    106106                return EBADMEM;
    107107
    108         // request the address
     108        /* Request the address */
    109109        message_id = async_send_1(phone, (sysarg_t) message,
    110110            (sysarg_t) device_id, NULL);
     
    112112        async_wait_for(message_id, &result);
    113113
    114         // if not successful
     114        /* If not successful */
    115115        if ((string == EOK) && (result != EOK)) {
    116                 // clear the data
     116                /* Clear the data */
    117117                free(*address);
    118118                free(*data);
     
    242242                return EBADMEM;
    243243
    244         // request the translation
     244        /* Request the translation */
    245245        message_id = async_send_3(phone, (sysarg_t) message,
    246246            (sysarg_t) device_id, (sysarg_t) count, (sysarg_t) service, NULL);
     
    249249        async_wait_for(message_id, &result);
    250250
    251         // if not successful
     251        /* If not successful */
    252252        if ((string == EOK) && (result != EOK)) {
    253                 // clear the data
     253                /* Clear the data */
    254254                free(*translation);
    255255                free(*data);
  • uspace/lib/net/generic/net_checksum.c

    r8b4ce802 rb77ce84  
    5252uint16_t compact_checksum(uint32_t sum)
    5353{
    54         // shorten to the 16 bits
     54        /* Shorten to the 16 bits */
    5555        while (sum >> 16)
    5656                sum = (sum & 0xffff) + (sum >> 16);
     
    7272        size_t index;
    7373
    74         // sum all the 16 bit fields
     74        /* Sum all the 16 bit fields */
    7575        for (index = 0; index + 1 < length; index += 2)
    7676                seed += (data[index] << 8) + data[index + 1];
    7777
    78         // last odd byte with zero padding
     78        /* Last odd byte with zero padding */
    7979        if (index + 1 == length)
    8080                seed += data[index] << 8;
     
    9494        size_t index;
    9595
    96         // process full bytes
     96        /* Process full bytes */
    9797        while (length >= 8) {
    98                 // add the data
     98                /* Add the data */
    9999                seed ^= (*data) << 24;
    100100               
    101                 // for each added bit
     101                /* For each added bit */
    102102                for (index = 0; index < 8; ++index) {
    103                         // if the first bit is set
     103                        /* If the first bit is set */
    104104                        if (seed & 0x80000000) {
    105                                 // shift and divide the checksum
     105                                /* Shift and divide the checksum */
    106106                                seed = (seed << 1) ^ ((uint32_t) CRC_DIVIDER_BE);
    107107                        } else {
    108                                 // shift otherwise
     108                                /* Shift otherwise */
    109109                                seed <<= 1;
    110110                        }
    111111                }
    112112               
    113                 // move to the next byte
     113                /* Move to the next byte */
    114114                ++data;
    115115                length -= 8;
    116116        }
    117117
    118         // process the odd bits
     118        /* Process the odd bits */
    119119        if (length > 0) {
    120                 // add the data with zero padding
     120                /* Add the data with zero padding */
    121121                seed ^= ((*data) & (0xff << (8 - length))) << 24;
    122122               
    123                 // for each added bit
     123                /* For each added bit */
    124124                for (index = 0; index < length; ++index) {
    125                         // if the first bit is set
     125                        /* If the first bit is set */
    126126                        if (seed & 0x80000000) {
    127                                 // shift and divide the checksum
     127                                /* Shift and divide the checksum */
    128128                                seed = (seed << 1) ^ ((uint32_t) CRC_DIVIDER_BE);
    129129                        } else {
    130                                 // shift otherwise
     130                                /* Shift otherwise */
    131131                                seed <<= 1;
    132132                        }
     
    148148        size_t index;
    149149
    150         // process full bytes
     150        /* Process full bytes */
    151151        while (length >= 8) {
    152                 // add the data
     152                /* Add the data */
    153153                seed ^= (*data);
    154154               
    155                 // for each added bit
     155                /* For each added bit */
    156156                for (index = 0; index < 8; ++index) {
    157                         // if the last bit is set
     157                        /* If the last bit is set */
    158158                        if (seed & 1) {
    159                                 // shift and divide the checksum
     159                                /* Shift and divide the checksum */
    160160                                seed = (seed >> 1) ^ ((uint32_t) CRC_DIVIDER_LE);
    161161                        } else {
    162                                 // shift otherwise
     162                                /* Shift otherwise */
    163163                                seed >>= 1;
    164164                        }
    165165                }
    166166               
    167                 // move to the next byte
     167                /* Move to the next byte */
    168168                ++data;
    169169                length -= 8;
    170170        }
    171171
    172         // process the odd bits
     172        /* Process the odd bits */
    173173        if (length > 0) {
    174                 // add the data with zero padding
     174                /* Add the data with zero padding */
    175175                seed ^= (*data) >> (8 - length);
    176176               
    177177                for (index = 0; index < length; ++index) {
    178                         // if the last bit is set
     178                        /* If the last bit is set */
    179179                        if (seed & 1) {
    180                                 // shift and divide the checksum
     180                                /* Shift and divide the checksum */
    181181                                seed = (seed >> 1) ^ ((uint32_t) CRC_DIVIDER_LE);
    182182                        } else {
    183                                 // shift otherwise
     183                                /* Shift otherwise */
    184184                                seed >>= 1;
    185185                        }
     
    198198uint16_t flip_checksum(uint16_t checksum)
    199199{
    200         // flip, zero is returned as 0xFFFF (not flipped)
     200        /* Flip, zero is returned as 0xFFFF (not flipped) */
    201201        checksum = ~checksum;
    202202        return checksum ? checksum : IP_CHECKSUM_ZERO;
     
    216216uint16_t ip_checksum(uint8_t *data, size_t length)
    217217{
    218         // compute, compact and flip the data checksum
     218        /* Compute, compact and flip the data checksum */
    219219        return flip_checksum(compact_checksum(compute_checksum(0, data,
    220220            length)));
  • uspace/lib/net/generic/packet_client.c

    r8b4ce802 rb77ce84  
    267267                return NULL;
    268268
    269         // get a new packet
     269        /* Get a new packet */
    270270        copy = packet_get_4_remote(phone, PACKET_DATA_LENGTH(packet),
    271271            PACKET_MAX_ADDRESS_LENGTH(packet), packet->max_prefix,
     
    274274                return NULL;
    275275
    276         // get addresses
     276        /* Get addresses */
    277277        addrlen = packet_get_addr(packet, &src, &dest);
    278         // copy data
     278        /* Copy data */
    279279        if ((packet_copy_data(copy, packet_get_data(packet),
    280280            PACKET_DATA_LENGTH(packet)) == EOK) &&
    281             // copy addresses if present
     281            /* Copy addresses if present */
    282282            ((addrlen <= 0) ||
    283283            (packet_set_addr(copy, src, dest, addrlen) == EOK))) {
  • uspace/lib/net/il/ip_client.c

    r8b4ce802 rb77ce84  
    124124
    125125        // TODO IPv6
    126 /*      case AF_INET6:
     126#if 0
     127        case AF_INET6:
    127128                if (addrlen != sizeof(struct sockaddr_in6))
    128129                        return EINVAL;
     
    130131                address_in6 = (struct sockaddr_in6 *) addr;
    131132                return EOK;
    132 */
     133#endif
    133134
    134135        default:
     
    159160        size_t padding;
    160161
    161         // compute the padding if IP options are set
    162         // multiple of 4 bytes
     162        /*
     163         * Compute the padding if IP options are set
     164         * multiple of 4 bytes
     165         */
    163166        padding =  ipopt_length % 4;
    164167        if (padding) {
     
    167170        }
    168171
    169         // prefix the header
     172        /* Prefix the header */
    170173        data = (uint8_t *) packet_prefix(packet, sizeof(ip_header_t) + padding);
    171174        if (!data)
    172175                return ENOMEM;
    173176
    174         // add the padding
     177        /* Add the padding */
    175178        while (padding--)
    176179                data[sizeof(ip_header_t) + padding] = IPOPT_NOOP;
    177180
    178         // set the header
     181        /* Set the header */
    179182        header = (ip_header_t *) data;
    180183        header->header_length = IP_COMPUTE_HEADER_LENGTH(sizeof(ip_header_t) +
  • uspace/lib/net/tl/icmp_client.c

    r8b4ce802 rb77ce84  
    8181                *mtu = header->un.frag.mtu;
    8282
    83         // remove debug dump
     83        /* Remove debug dump */
    8484#ifdef CONFIG_DEBUG
    8585        printf("ICMP error %d (%d) in packet %d\n", header->type, header->code,
  • uspace/lib/net/tl/socket_core.c

    r8b4ce802 rb77ce84  
    9191        int packet_id;
    9292
    93         // if bound
     93        /* If bound */
    9494        if (socket->port) {
    95                 // release the port
     95                /* Release the port */
    9696                socket_port_release(global_sockets, socket);
    9797        }
    9898       
    99         // release all received packets
     99        /* Release all received packets */
    100100        while ((packet_id = dyn_fifo_pop(&socket->received)) >= 0)
    101101                pq_release_remote(packet_phone, packet_id);
     
    166166        int rc;
    167167
    168         // create a wrapper
     168        /* Create a wrapper */
    169169        socket_ref = malloc(sizeof(*socket_ref));
    170170        if (!socket_ref)
     
    172172
    173173        *socket_ref = socket;
    174         // add the wrapper
     174        /* Add the wrapper */
    175175        rc = socket_port_map_add(&socket_port->map, key, key_length,
    176176            socket_ref);
     
    206206        int rc;
    207207
    208         // create a wrapper
     208        /* Create a wrapper */
    209209        socket_port = malloc(sizeof(*socket_port));
    210210        if (!socket_port)
     
    221221                goto fail;
    222222       
    223         // register the incomming port
     223        /* Register the incoming port */
    224224        rc = socket_ports_add(global_sockets, port, socket_port);
    225225        if (rc < 0)
     
    277277               
    278278                address_in = (struct sockaddr_in *) addr;
    279                 // find the socket
     279                /* Find the socket */
    280280                socket = socket_cores_find(local_sockets, socket_id);
    281281                if (!socket)
    282282                        return ENOTSOCK;
    283283               
    284                 // bind a free port?
     284                /* Bind a free port? */
    285285                if (address_in->sin_port <= 0)
    286286                        return socket_bind_free_port(global_sockets, socket,
    287287                             free_ports_start, free_ports_end, last_used_port);
    288288               
    289                 // try to find the port
     289                /* Try to find the port */
    290290                socket_port = socket_ports_find(global_sockets,
    291291                    ntohs(address_in->sin_port));
    292292                if (socket_port) {
    293                         // already used
     293                        /* Already used */
    294294                        return EADDRINUSE;
    295295                }
    296296               
    297                 // if bound
     297                /* If bound */
    298298                if (socket->port) {
    299                         // release the port
     299                        /* Release the port */
    300300                        socket_port_release(global_sockets, socket);
    301301                }
     
    333333        int index;
    334334
    335         // from the last used one
     335        /* From the last used one */
    336336        index = last_used_port;
    337337       
     
    339339                ++index;
    340340               
    341                 // til the range end
     341                /* Till the range end */
    342342                if (index >= free_ports_end) {
    343                         // start from the range beginning
     343                        /* Start from the range beginning */
    344344                        index = free_ports_start - 1;
    345345                        do {
    346346                                ++index;
    347                                 // til the last used one
     347                                /* Till the last used one */
    348348                                if (index >= last_used_port) {
    349                                         // none found
     349                                        /* None found */
    350350                                        return ENOTCONN;
    351351                                }
    352352                        } while (socket_ports_find(global_sockets, index));
    353353                       
    354                         // found, break immediately
     354                        /* Found, break immediately */
    355355                        break;
    356356                }
     
    376376
    377377        count = 0;
    378 //      socket_id = socket_globals.last_id;
     378#if 0
     379        socket_id = socket_globals.last_id;
     380#endif
    379381        do {
    380382                if (count < SOCKET_ID_TRIES) {
     
    384386                        socket_id = 1;
    385387                        ++count;
    386                 // only this branch for last_id
     388                /* Only this branch for last_id */
    387389                } else {
    388390                        if (socket_id < INT_MAX) {
    389391                                ++ socket_id;
    390 /*                      } else if(socket_globals.last_id) {
    391 *                               socket_globals.last_id = 0;
    392 *                               socket_id = 1;
    393 */                      } else {
     392#if 0
     393                        } else if(socket_globals.last_id) {
     394                                socket_globals.last_id = 0;
     395                                socket_id = 1;
     396#endif
     397                        } else {
    394398                                return ELIMIT;
    395399                        }
     
    425429                return EINVAL;
    426430       
    427         // store the socket
     431        /* Store the socket */
    428432        if (*socket_id <= 0) {
    429433                positive = (*socket_id == 0);
     
    441445                return ENOMEM;
    442446       
    443         // initialize
     447        /* Initialize */
    444448        socket->phone = app_phone;
    445449        socket->port = -1;
     
    493497        int accepted_id;
    494498
    495         // find the socket
     499        /* Find the socket */
    496500        socket = socket_cores_find(local_sockets, socket_id);
    497501        if (!socket)
    498502                return ENOTSOCK;
    499503       
    500         // destroy all accepted sockets
     504        /* Destroy all accepted sockets */
    501505        while ((accepted_id = dyn_fifo_pop(&socket->accepted)) >= 0)
    502506                socket_destroy(packet_phone, accepted_id, local_sockets,
     
    535539        next_packet = pq_next(packet);
    536540        if (!next_packet) {
    537                 // write all if only one fragment
     541                /* Write all if only one fragment */
    538542                rc = data_reply(packet_get_data(packet),
    539543                    packet_get_data_length(packet));
    540544                if (rc != EOK)
    541545                        return rc;
    542                 // store the total length
     546                /* Store the total length */
    543547                *length = packet_get_data_length(packet);
    544548        } else {
    545                 // count the packet fragments
     549                /* Count the packet fragments */
    546550                fragments = 1;
    547551                next_packet = pq_next(packet);
     
    549553                        ++fragments;
    550554               
    551                 // compute and store the fragment lengths
     555                /* Compute and store the fragment lengths */
    552556                lengths = (size_t *) malloc(sizeof(size_t) * fragments +
    553557                    sizeof(size_t));
     
    565569                }
    566570               
    567                 // write the fragment lengths
     571                /* Write the fragment lengths */
    568572                rc = data_reply(lengths, sizeof(int) * (fragments + 1));
    569573                if (rc != EOK) {
     
    573577                next_packet = packet;
    574578               
    575                 // write the fragments
     579                /* Write the fragments */
    576580                for (index = 0; index < fragments; ++index) {
    577581                        rc = data_reply(packet_get_data(next_packet),
     
    584588                }
    585589               
    586                 // store the total length
     590                /* Store the total length */
    587591                *length = lengths[fragments];
    588592                free(lengths);
     
    636640                return;
    637641       
    638         // find ports
     642        /* Find ports */
    639643        socket_port = socket_ports_find(global_sockets, socket->port);
    640644        if (socket_port) {
    641                 // find the socket
     645                /* Find the socket */
    642646                socket_ref = socket_port_map_find(&socket_port->map,
    643647                    socket->key, socket->key_length);
     
    646650                        --socket_port->count;
    647651                       
    648                         // release if empty
     652                        /* Release if empty */
    649653                        if (socket_port->count <= 0) {
    650                                 // destroy the map
     654                                /* Destroy the map */
    651655                                socket_port_map_destroy(&socket_port->map, free);
    652                                 // release the port
     656                                /* Release the port */
    653657                                socket_ports_exclude(global_sockets,
    654658                                    socket->port, free);
    655659                        } else {
    656                                 // remove
     660                                /* Remove */
    657661                                socket_port_map_exclude(&socket_port->map,
    658662                                    socket->key, socket->key_length, free);
     
    685689        int rc;
    686690
    687         // find ports
     691        /* Find ports */
    688692        socket_port = socket_ports_find(global_sockets, port);
    689693        if (!socket_port)
    690694                return ENOENT;
    691695       
    692         // add the socket
     696        /* Add the socket */
    693697        rc = socket_port_add_core(socket_port, socket, key, key_length);
    694698        if (rc != EOK)
  • uspace/lib/net/tl/tl_common.c

    r8b4ce802 rb77ce84  
    255255        int length;
    256256
    257         // detach the first packet and release the others
     257        /* Detach the first packet and release the others */
    258258        next = pq_detach(packet);
    259259        if (next)
     
    262262        length = packet_get_addr(packet, &src, NULL);
    263263        if ((length > 0) && (!error) && (icmp_phone >= 0) &&
    264             // set both addresses to the source one (avoids the source address
    265             // deletion before setting the destination one)
     264            /*
     265             * Set both addresses to the source one (avoids the source address
     266             * deletion before setting the destination one)
     267             */
    266268            (packet_set_addr(packet, src, src, (size_t) length) == EOK)) {
    267269                return EOK;
     
    299301                return EINVAL;
    300302
    301         // get the data length
     303        /* Get the data length */
    302304        if (!async_data_write_receive(&callid, &length))
    303305                return EINVAL;
    304306
    305         // get a new packet
     307        /* Get a new packet */
    306308        *packet = packet_get_4_remote(packet_phone, length, dimension->addr_len,
    307309            prefix + dimension->prefix, dimension->suffix);
     
    309311                return ENOMEM;
    310312
    311         // allocate space in the packet
     313        /* Allocate space in the packet */
    312314        data = packet_suffix(*packet, length);
    313315        if (!data) {
     
    316318        }
    317319
    318         // read the data into the packet
     320        /* Read the data into the packet */
    319321        rc = async_data_write_finalize(callid, data, length);
    320322        if (rc != EOK) {
     
    323325        }
    324326       
    325         // set the packet destination address
     327        /* Set the packet destination address */
    326328        rc = packet_set_addr(*packet, NULL, (uint8_t *) addr, addrlen);
    327329        if (rc != EOK) {
  • uspace/lib/packet/generic/packet_server.c

    r8b4ce802 rb77ce84  
    112112    size_t max_content, size_t max_suffix)
    113113{
    114         // clear the packet content
     114        /* Clear the packet content */
    115115        bzero(((void *) packet) + sizeof(packet_t),
    116116            packet->length - sizeof(packet_t));
    117117       
    118         // clear the packet header
     118        /* Clear the packet header */
    119119        packet->order = 0;
    120120        packet->metric = 0;
     
    151151        assert(fibril_mutex_is_locked(&ps_globals.lock));
    152152
    153         // already locked
     153        /* Already locked */
    154154        packet = (packet_t *) mmap(NULL, length, PROTO_READ | PROTO_WRITE,
    155155            MAP_SHARED | MAP_ANONYMOUS, 0, 0);
  • uspace/lib/softint/generic/multiplication.c

    r8b4ce802 rb77ce84  
    109109         * result does not fit in signed one */
    110110        if (SOFTINT_CHECK_OF && ((t2 < t1) || (t2 & (1ull << 63)))) {
    111                 // error, overflow
     111                /* Error, overflow */
    112112                return (neg ? INT64_MIN : INT64_MAX);
    113113        }
Note: See TracChangeset for help on using the changeset viewer.