Changeset 7c3fb9b in mainline for uspace/lib/c


Ignore:
Timestamp:
2018-05-17T08:29:01Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6ff23ff
Parents:
fac0ac7
git-author:
Jiri Svoboda <jiri@…> (2018-05-16 17:28:17)
git-committer:
Jiri Svoboda <jiri@…> (2018-05-17 08:29:01)
Message:

Fix block comment formatting (ccheck).

Location:
uspace/lib/c
Files:
29 edited

Legend:

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

    rfac0ac7 r7c3fb9b  
    5555static inline void atomic_inc(atomic_t *val)
    5656{
    57         /* On real hardware the increment has to be done
    58            as an atomic action. */
     57        /*
     58         * On real hardware the increment has to be done
     59         * as an atomic action.
     60         */
    5961
    6062        val->count++;
     
    6365static inline void atomic_dec(atomic_t *val)
    6466{
    65         /* On real hardware the decrement has to be done
    66            as an atomic action. */
     67        /*
     68         * On real hardware the decrement has to be done
     69         * as an atomic action.
     70         */
    6771
    6872        val->count++;
     
    7175static inline atomic_count_t atomic_postinc(atomic_t *val)
    7276{
    73         /* On real hardware both the storing of the previous
    74            value and the increment have to be done as a single
    75            atomic action. */
     77        /*
     78         * On real hardware both the storing of the previous
     79         * value and the increment have to be done as a single
     80         * atomic action.
     81         */
    7682
    7783        atomic_count_t prev = val->count;
     
    8389static inline atomic_count_t atomic_postdec(atomic_t *val)
    8490{
    85         /* On real hardware both the storing of the previous
    86            value and the decrement have to be done as a single
    87            atomic action. */
     91        /*
     92         * On real hardware both the storing of the previous
     93         * value and the decrement have to be done as a single
     94         * atomic action.
     95         */
    8896
    8997        atomic_count_t prev = val->count;
  • uspace/lib/c/arch/amd64/include/libarch/fibril_context.h

    rfac0ac7 r7c3fb9b  
    1 /* Copyright (c) 2014 Jakub Jermar
     1/*
     2 * Copyright (c) 2014 Jakub Jermar
    23 * All rights reserved.
    34 *
     
    4546
    4647typedef struct context {
    47         /* We include only registers that must be preserved
     48        /*
     49         * We include only registers that must be preserved
    4850         * during function call.
    4951         */
  • uspace/lib/c/arch/arm32/include/libarch/fibril_context.h

    rfac0ac7 r7c3fb9b  
    1 /* Copyright (c) 2014 Jakub Jermar
     1/*
     2 * Copyright (c) 2014 Jakub Jermar
    23 * All rights reserved.
    34 *
  • uspace/lib/c/arch/ia32/include/libarch/fibril_context.h

    rfac0ac7 r7c3fb9b  
    1 /* Copyright (c) 2014 Jakub Jermar
     1/*
     2 * Copyright (c) 2014 Jakub Jermar
    23 * All rights preserved.
    34 *
  • uspace/lib/c/arch/ia64/include/libarch/fibril_context.h

    rfac0ac7 r7c3fb9b  
    1 /* Copyright (c) 2014 Jakub Jermar
     1/*
     2 * Copyright (c) 2014 Jakub Jermar
    23 * All rights preserved.
    34 *
  • uspace/lib/c/arch/mips32/include/libarch/atomic.h

    rfac0ac7 r7c3fb9b  
    5050#define atomic_predec(x)  atomic_add(x, -1)
    5151
    52 /* Atomic addition of immediate value.
     52/** Atomic addition of immediate value.
    5353 *
    5454 * @param val Memory location to which will be the immediate value added.
  • uspace/lib/c/arch/mips32/include/libarch/fibril_context.h

    rfac0ac7 r7c3fb9b  
    1 /* Copyright (c) 2014 Jakub Jermar
     1/*
     2 * Copyright (c) 2014 Jakub Jermar
    23 * All rights reserved.
    34 *
  • uspace/lib/c/arch/mips32/include/libarch/tls.h

    rfac0ac7 r7c3fb9b  
    4646#define CONFIG_TLS_VARIANT_1
    4747
    48 /* I did not find any specification (neither MIPS nor PowerPC), but
     48/*
     49 * I did not find any specification (neither MIPS nor PowerPC), but
    4950 * as I found it
    5051 * - it uses Variant II
  • uspace/lib/c/arch/ppc32/include/libarch/fibril_context.h

    rfac0ac7 r7c3fb9b  
    1 /* Copyright (c) 2014 Jakub Jermar
     1/*
     2 * Copyright (c) 2014 Jakub Jermar
    23 * All rights reserved.
    34 *
  • uspace/lib/c/arch/riscv64/include/libarch/atomic.h

    rfac0ac7 r7c3fb9b  
    5757static inline void atomic_inc(atomic_t *val)
    5858{
    59         /* On real hardware the increment has to be done
    60            as an atomic action. */
     59        /*
     60         * On real hardware the increment has to be done
     61         * as an atomic action.
     62         */
    6163
    6264        val->count++;
     
    6567static inline void atomic_dec(atomic_t *val)
    6668{
    67         /* On real hardware the decrement has to be done
    68            as an atomic action. */
     69        /*
     70         * On real hardware the decrement has to be done
     71         * as an atomic action.
     72         */
    6973
    7074        val->count++;
     
    7377static inline atomic_count_t atomic_postinc(atomic_t *val)
    7478{
    75         /* On real hardware both the storing of the previous
    76            value and the increment have to be done as a single
    77            atomic action. */
     79        /*
     80         * On real hardware both the storing of the previous
     81         * value and the increment have to be done as a single
     82         * atomic action.
     83         */
    7884
    7985        atomic_count_t prev = val->count;
     
    8591static inline atomic_count_t atomic_postdec(atomic_t *val)
    8692{
    87         /* On real hardware both the storing of the previous
    88            value and the decrement have to be done as a single
    89            atomic action. */
     93        /*
     94         * On real hardware both the storing of the previous
     95         * value and the decrement have to be done as a single
     96         * atomic action.
     97         */
    9098
    9199        atomic_count_t prev = val->count;
  • uspace/lib/c/arch/riscv64/include/libarch/fibril_context.h

    rfac0ac7 r7c3fb9b  
    1 /* Copyright (c) 2016 Martin Decky
     1/*
     2 * Copyright (c) 2016 Martin Decky
    23 * All rights reserved.
    34 *
  • uspace/lib/c/arch/sparc64/include/libarch/fibril_context.h

    rfac0ac7 r7c3fb9b  
    1 /* Copyright (c) 2014 Jakub Jermar
     1/*
     2 * Copyright (c) 2014 Jakub Jermar
    23 * All rights reserved.
    34 *
  • uspace/lib/c/generic/async.c

    rfac0ac7 r7c3fb9b  
    12051205        assert(fibril_connection);
    12061206
    1207         /* Why doing this?
     1207        /*
     1208         * Why doing this?
    12081209         * GCC 4.1.0 coughs on fibril_connection-> dereference.
    12091210         * GCC 4.1.1 happilly puts the rdhwr instruction in delay slot.
  • uspace/lib/c/generic/double_to_str.c

    rfac0ac7 r7c3fb9b  
    102102        ac = a * c;
    103103
    104         /* Denote 32 bit parts of x a y as: x == a b, y == c d. Then:
     104        /*
     105         * Denote 32 bit parts of x a y as: x == a b, y == c d. Then:
    105106         *        a  b
    106107         *  *     c  d
     
    280281            (rest + digit_val_diff < w_dist || rest - w_dist < w_dist - rest);
    281282
    282         /* Of the shortest strings pick the one that is closest to the actual
    283            floating point number. */
     283        /*
     284         * Of the shortest strings pick the one that is closest to the actual
     285         * floating point number.
     286         */
    284287        while (next_closer) {
    285288                assert('0' < buf[len - 1]);
     
    571574         *  |0 0  ..  0 1|0 0   ..  0 0| == one == 1.0
    572575         *  |      0     |0 0   ..  0 1| == w_err == 1 * 2^w_scaled.e
    573         */
     576         */
    574577        assert(alpha <= w_scaled.exponent && w_scaled.exponent <= gamma);
    575578        assert(0 != w_scaled.significand);
     
    589592        one.exponent = w_scaled.exponent;
    590593
    591         /* Extract the integral part of w_scaled.
    592            w_scaled / one == w_scaled >> -one.e */
     594        /*
     595         * Extract the integral part of w_scaled.
     596         * w_scaled / one == w_scaled >> -one.e
     597         */
    593598        uint32_t int_part = (uint32_t)(w_scaled.significand >> (-one.exponent));
    594599
    595         /* Fractional part of w_scaled.
    596            w_scaled % one == w_scaled & (one.f - 1) */
     600        /*
     601         * Fractional part of w_scaled.
     602         * w_scaled % one == w_scaled & (one.f - 1)
     603         */
    597604        uint64_t frac_part = w_scaled.significand & (one.significand - 1);
    598605
  • uspace/lib/c/generic/elf/elf.c

    rfac0ac7 r7c3fb9b  
    9696        assert(elf_is_valid(hdr));
    9797
    98         /* There are two legal options for a HelenOS ELF file.
     98        /*
     99         * There are two legal options for a HelenOS ELF file.
    99100         * Either the file is ET_DYN (shared library or PIE), and the base is
    100101         * (required to be) at vaddr 0. Or the file is ET_EXEC (non-relocatable)
  • uspace/lib/c/generic/elf/elf_mod.c

    rfac0ac7 r7c3fb9b  
    189189        }
    190190
    191         /* Read program header table.
     191        /*
     192         * Read program header table.
    192193         * Normally, there are very few program headers, so don't bother
    193194         * with allocating memory dynamically.
     
    239240                }
    240241
    241                 /* Attempt to allocate a span of memory large enough for the
     242                /*
     243                 * Attempt to allocate a span of memory large enough for the
    242244                 * shared object.
    243245                 */
  • uspace/lib/c/generic/getopt.c

    rfac0ac7 r7c3fb9b  
    11/*      $NetBSD: getopt_long.c,v 1.21.4.1 2008/01/09 01:34:14 matt Exp $        */
    22
    3 /*-
     3/*
    44 * Copyright (c) 2000 The NetBSD Foundation, Inc.
    55 * All rights reserved.
     
    4141#include <str.h>
    4242
    43 /* HelenOS Port : We're incorporating only the modern getopt_long with wrappers
     43/*
     44 * HelenOS Port : We're incorporating only the modern getopt_long with wrappers
    4445 * to keep legacy getopt() usage from breaking. All references to REPLACE_GETOPT
    45  * are dropped, we just include the code */
     46 * are dropped, we just include the code
     47 */
    4648
    4749int     opterr = 1;             /* if error message should be printed */
     
    8183/* Error messages */
    8284
    83 /* HelenOS Port: Calls to warnx() were eliminated (as we have no stderr that
     85/*
     86 * HelenOS Port: Calls to warnx() were eliminated (as we have no stderr that
    8487 * may be redirected) and replaced with printf. As such, error messages now
    85  * end in a newline */
     88 * end in a newline
     89 */
    8690
    8791static const char recargchar[] = "option requires an argument -- %c\n";
  • uspace/lib/c/generic/ieee_double.c

    rfac0ac7 r7c3fb9b  
    9898                        ret.pos_val.exponent = raw_exponent - exponent_bias;
    9999
    100                         /* The predecessor is closer to val than the successor
     100                        /*
     101                         * The predecessor is closer to val than the successor
    101102                         * if val is a normal value of the form 2^k (hence
    102103                         * raw_significand == 0) with the only exception being
  • uspace/lib/c/generic/io/io.c

    rfac0ac7 r7c3fb9b  
    105105void __stdio_init(void)
    106106{
    107         /* The first three standard file descriptors are assigned for compatibility.
     107        /*
     108         * The first three standard file descriptors are assigned for compatibility.
    108109         * This will probably be removed later.
    109110         */
  • uspace/lib/c/generic/io/vsnprintf.c

    rfac0ac7 r7c3fb9b  
    7070
    7171        if (left == 1) {
    72                 /* We have only one free byte left in buffer
     72                /*
     73                 * We have only one free byte left in buffer
    7374                 * -> store trailing zero
    7475                 */
     
    7980
    8081        if (left <= size) {
    81                 /* We do not have enough space for the whole string
     82                /*
     83                 * We do not have enough space for the whole string
    8284                 * with the trailing zero => print only a part
    8385                 * of string
     
    9294                }
    9395
    94                 /* Put trailing zero at end, but not count it
     96                /*
     97                 * Put trailing zero at end, but not count it
    9598                 * into data->len so it could be rewritten next time
    9699                 */
     
    104107        data->len += size;
    105108
    106         /* Put trailing zero at end, but not count it
     109        /*
     110         * Put trailing zero at end, but not count it
    107111         * into data->len so it could be rewritten next time
    108112         */
     
    140144
    141145                if (left == 1) {
    142                         /* We have only one free byte left in buffer
     146                        /*
     147                         * We have only one free byte left in buffer
    143148                         * -> store trailing zero
    144149                         */
     
    154159        }
    155160
    156         /* Put trailing zero at end, but not count it
     161        /*
     162         * Put trailing zero at end, but not count it
    157163         * into data->len so it could be rewritten next time
    158164         */
  • uspace/lib/c/generic/rtld/module.c

    rfac0ac7 r7c3fb9b  
    353353                rtld->tls_align = max(rtld->tls_align, m->tls_align);
    354354
    355                 /* We are allocating spans "backwards", here,
     355                /*
     356                 * We are allocating spans "backwards", here,
    356357                 * as described in U. Drepper's paper.
    357358                 */
     
    361362        }
    362363
    363         /* We are in negative offsets. In order for the alignments to
     364        /*
     365         * We are in negative offsets. In order for the alignments to
    364366         * be correct, "zero" offset (i.e. the total size) must be aligned
    365367         * to the strictest alignment present.
  • uspace/lib/c/generic/str.c

    rfac0ac7 r7c3fb9b  
    202202                return EINVAL;
    203203
    204         /* Unsigned version of ch (bit operations should only be done
    205            on unsigned types). */
     204        /*
     205         * Unsigned version of ch (bit operations should only be done
     206         * on unsigned types).
     207         */
    206208        uint32_t cc = (uint32_t) ch;
    207209
     
    12221224 * @param ch      Character to insert to.
    12231225 * @param pos     Character index where to insert.
    1224  @ @param max_pos Characters in the buffer.
     1226 * @param max_pos Characters in the buffer.
    12251227 *
    12261228 * @return True if the insertion was sucessful, false if the position
     
    15311533                return EINVAL;
    15321534
    1533         /* Check whether we are at the end of
    1534            the string in strict mode */
     1535        /*
     1536         * Check whether we are at the end of
     1537         * the string in strict mode
     1538         */
    15351539        if ((strict) && (*lendptr != 0))
    15361540                return EINVAL;
     
    15781582                return EINVAL;
    15791583
    1580         /* Check whether we are at the end of
    1581            the string in strict mode */
     1584        /*
     1585         * Check whether we are at the end of
     1586         * the string in strict mode
     1587         */
    15821588        if ((strict) && (*lendptr != 0))
    15831589                return EINVAL;
     
    16251631                return EINVAL;
    16261632
    1627         /* Check whether we are at the end of
    1628            the string in strict mode */
     1633        /*
     1634         * Check whether we are at the end of
     1635         * the string in strict mode
     1636         */
    16291637        if ((strict) && (*lendptr != 0))
    16301638                return EINVAL;
     
    16711679                return EINVAL;
    16721680
    1673         /* Check whether we are at the end of
    1674            the string in strict mode */
     1681        /*
     1682         * Check whether we are at the end of
     1683         * the string in strict mode
     1684         */
    16751685        if ((strict) && (*lendptr != 0))
    16761686                return EINVAL;
     
    17111721                return EINVAL;
    17121722
    1713         /* Check whether we are at the end of
    1714            the string in strict mode */
     1723        /*
     1724         * Check whether we are at the end of
     1725         * the string in strict mode
     1726         */
    17151727        if ((strict) && (*lendptr != 0))
    17161728                return EINVAL;
  • uspace/lib/c/generic/str_error.c

    rfac0ac7 r7c3fb9b  
    4141#define NOERR_LEN  64
    4242
    43 /* The arrays below are automatically generated from the same file that
     43/*
     44 * The arrays below are automatically generated from the same file that
    4445 * errno.h constants are generated from. Triple-include of the same list
    4546 * with redefinitions of __errno() macro are used to ensure that the
     
    7374static int find_errno(errno_t e)
    7475{
    75         /* Just a dumb linear search.
     76        /*
     77         * Just a dumb linear search.
    7678         * There are too few entries to warrant anything smarter.
    7779         */
  • uspace/lib/c/generic/strtol.c

    rfac0ac7 r7c3fb9b  
    5757}
    5858
    59 /* FIXME: workaround for GCC "optimizing" the overflow check
     59/*
     60 * FIXME: workaround for GCC "optimizing" the overflow check
    6061 * into soft-emulated 128b multiplication using `__multi3`,
    6162 * which we don't currently implement.
     
    139140
    140141        if (endptr != NULL) {
    141                 /* Move the pointer to the end of the number,
     142                /*
     143                 * Move the pointer to the end of the number,
    142144                 * in case it isn't there already.
    143145                 */
  • uspace/lib/c/generic/vfs/inbox.c

    rfac0ac7 r7c3fb9b  
    6565static LIST_INITIALIZE(inb_list);
    6666
    67 /* Inserts a named file into the inbox.
     67/** Inserts a named file into the inbox.
    6868 *
    6969 * If a file with the same name is already present, it overwrites it and returns
     
    118118}
    119119
    120 /* Retrieve a file with this name.
     120/** Retrieve a file with this name.
    121121 *
    122122 * @param name Name of the entry.
     
    138138}
    139139
    140 /* Writes names of entries that are currently set into an array provided by the
     140/** Writes names of entries that are currently set into an array provided by the
    141141 * user.
    142142 *
  • uspace/lib/c/generic/vol.c

    rfac0ac7 r7c3fb9b  
    236236
    237237/** Erase partition (to the extent where we will consider it not containing
    238  * a file system. */
     238 * a file system.
     239 */
    239240errno_t vol_part_empty(vol_t *vol, service_id_t sid)
    240241{
  • uspace/lib/c/include/getopt.h

    rfac0ac7 r7c3fb9b  
    11/*      $NetBSD: getopt.h,v 1.10.6.1 2008/05/18 12:30:09 yamt Exp $     */
    22
    3 /*-
     3/*
    44 * Copyright (c) 2000 The NetBSD Foundation, Inc.
    55 * All rights reserved.
  • uspace/lib/c/include/io/pixelmap.h

    rfac0ac7 r7c3fb9b  
    5454        PIXELMAP_EXTEND_SIDES,
    5555
    56         /* If outside of a pixmap, return closest pixel from the edge,
     56        /*
     57         * If outside of a pixmap, return closest pixel from the edge,
    5758         * with alpha = 0
    5859         */
  • uspace/lib/c/include/wchar.h

    rfac0ac7 r7c3fb9b  
    2727 */
    2828
    29 /* Authors:
     29/*
     30 * Authors:
    3031 *      Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com>
    3132 */
Note: See TracChangeset for help on using the changeset viewer.