Changeset 09ab0a9a in mainline for uspace/lib/c/generic


Ignore:
Timestamp:
2018-09-13T12:05:53Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cc74cb5
Parents:
b2aaaa0
git-author:
Jiri Svoboda <jiri@…> (2018-09-13 07:09:46)
git-committer:
Jiri Svoboda <jiri@…> (2018-09-13 12:05:53)
Message:

Fix vertical spacing with new Ccheck revision.

Location:
uspace/lib/c/generic
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/adt/hash_table.c

    rb2aaaa0 r09ab0a9a  
    6060#define HT_MAX_LOAD     2
    6161
    62 
    6362static size_t round_up_size(size_t);
    6463static bool alloc_table(size_t, list_t **);
     
    7372        /* no-op */
    7473}
    75 
    7674
    7775/** Create chained hash table.
     
    205203}
    206204
    207 
    208205/** Insert item into a hash table if not already present.
    209206 *
     
    413410}
    414411
    415 
    416412/** Shrinks the table if the table is only sparely populated. */
    417413static inline void shrink_if_needed(hash_table_t *h)
     
    473469}
    474470
    475 
    476471/** @}
    477472 */
  • uspace/lib/c/generic/adt/odict.c

    rb2aaaa0 r09ab0a9a  
    265265                }
    266266        }
    267 
    268267
    269268        odlink->color = odc_red;
  • uspace/lib/c/generic/crt/entry.c

    rb2aaaa0 r09ab0a9a  
    6666        __libc_main(pcb);
    6767}
    68 
  • uspace/lib/c/generic/ddi.c

    rb2aaaa0 r09ab0a9a  
    4848#include <libarch/config.h>
    4949#include "private/libc.h"
    50 
    5150
    5251/** Map a piece of physical memory to task.
  • uspace/lib/c/generic/device/clock_dev.c

    rb2aaaa0 r09ab0a9a  
    103103/** @}
    104104 */
    105 
  • uspace/lib/c/generic/device/pio_window.c

    rb2aaaa0 r09ab0a9a  
    6060/** @}
    6161 */
    62 
  • uspace/lib/c/generic/double_to_str.c

    rb2aaaa0 r09ab0a9a  
    5252static const int gamma = -32;
    5353
    54 
    5554/** Returns true if the most-significant bit of num.significand is set. */
    5655static bool is_normalized(fp_num_t num)
     
    8079        return num;
    8180}
    82 
    8381
    8482/** Returns x * y with an error of less than 0.5 ulp. */
     
    130128}
    131129
    132 
    133130/** Returns a - b. Both must have the same exponent. */
    134131static fp_num_t subtract(fp_num_t a, fp_num_t b)
     
    144141        return result;
    145142}
    146 
    147143
    148144/** Returns the interval [low, high] of numbers that convert to binary val. */
     
    248244        *scaled_upper_bound = upper_scaled;
    249245}
    250 
    251246
    252247/** Rounds the last digit of buf so that it is closest to the converted number.*/
     
    299294}
    300295
    301 
    302296/** Generates the shortest accurate decimal string representation.
    303297 *
     
    478472}
    479473
    480 
    481474/** Converts a non-special double into its shortest accurate string
    482475 *  representation.
     
    698691        }
    699692}
    700 
    701693
    702694/** Converts a non-special double into its string representation.
     
    792784        return len;
    793785}
    794 
  • uspace/lib/c/generic/elf/elf.c

    rb2aaaa0 r09ab0a9a  
    111111/** @}
    112112 */
    113 
  • uspace/lib/c/generic/getopt.c

    rb2aaaa0 r09ab0a9a  
    5353char    *optarg;                /* argument associated with option */
    5454
    55 
    5655#define IGNORE_FIRST    (*options == '-' || *options == '+')
    5756#define PRINT_ERROR     ((opterr) && ((*options != ':') \
     
    9594static const char illoptchar[] = "unknown option -- %c\n";
    9695static const char illoptstring[] = "unknown option -- %s\n";
    97 
    9896
    9997/*
     
    461459#undef IDENTICAL_INTERPRETATION
    462460}
    463 
  • uspace/lib/c/generic/ieee_double.c

    rb2aaaa0 r09ab0a9a  
    113113        return ret;
    114114}
    115 
  • uspace/lib/c/generic/inet/host.c

    rb2aaaa0 r09ab0a9a  
    7575                goto have_host;
    7676        }
    77 
    7877
    7978        /* Try <hostname> */
  • uspace/lib/c/generic/io/io.c

    rb2aaaa0 r09ab0a9a  
    421421}
    422422
    423 
    424423static int _fclose_nofree(FILE *stream)
    425424{
     
    651650        return (total_read / size);
    652651}
    653 
    654652
    655653/** Write to a stream.
  • uspace/lib/c/generic/io/printf_core.c

    rb2aaaa0 r09ab0a9a  
    4949#include <wchar.h>
    5050
    51 
    5251/** show prefixes 0x or 0 */
    5352#define __PRINTF_FLAG_PREFIX       0x00000001
     
    7978/** don't print trailing zeros in the fractional part */
    8079#define __PRINTF_FLAG_NOFRACZEROS  0x00000200
    81 
    8280
    8381/**
     
    125123static const char invalch = U_SPECIAL;
    126124
    127 
    128 
    129125/** Unformatted double number string representation. */
    130126typedef struct {
     
    139135} double_str_t;
    140136
    141 
    142 
    143137/** Returns the sign character or 0 if no sign should be printed. */
    144138static int get_sign_char(bool negative, uint32_t flags)
     
    166160        return count;
    167161}
    168 
    169162
    170163/** Print one or more characters without adding newline.
     
    634627        counter += ret;
    635628
    636 
    637629        /* Trailing padding. */
    638630        if (flags & __PRINTF_FLAG_LEFTALIGNED) {
     
    698690}
    699691
    700 
    701692/** Format and print the double string repressentation according
    702693 *  to the %f specifier.
     
    825816        return counter;
    826817}
    827 
    828818
    829819/** Convert, format and print a double according to the %f specifier.
     
    934924}
    935925
    936 
    937926/** Format and print the double string repressentation according
    938927 *  to the %e specifier.
     
    10381027        return counter;
    10391028}
    1040 
    10411029
    10421030/** Convert, format and print a double according to the %e specifier.
     
    11131101}
    11141102
    1115 
    11161103/** Convert, format and print a double according to the %g specifier.
    11171104 *
     
    11931180        }
    11941181}
    1195 
    11961182
    11971183/** Convert, format and print a double according to the specifier.
  • uspace/lib/c/generic/loader.c

    rb2aaaa0 r09ab0a9a  
    207207}
    208208
    209 
    210209/** Set command-line arguments for the program.
    211210 *
  • uspace/lib/c/generic/loc.c

    rb2aaaa0 r09ab0a9a  
    8686}
    8787
    88 
    8988static void clone_session(fibril_mutex_t *mtx, async_sess_t *src,
    9089    async_sess_t **dst)
     
    546545        return retval;
    547546}
    548 
    549547
    550548loc_object_type_t loc_id_probe(service_id_t handle)
  • uspace/lib/c/generic/ns.c

    rb2aaaa0 r09ab0a9a  
    155155}
    156156
    157 
    158157errno_t ns_ping(void)
    159158{
  • uspace/lib/c/generic/pio_trace.c

    rb2aaaa0 r09ab0a9a  
    4040#include <ddi.h>
    4141#include <str.h>
    42 
    4342
    4443typedef struct {
     
    9089}
    9190
    92 
    9391void pio_trace_log(const volatile void *r, uint64_t val, bool write)
    9492{
  • uspace/lib/c/generic/power_of_ten.c

    rb2aaaa0 r09ab0a9a  
    143143};
    144144
    145 
    146145/**
    147146 * Returns the smallest precomputed power of 10 such that
     
    185184        assert(false);
    186185}
    187 
  • uspace/lib/c/generic/private/fibril.h

    rb2aaaa0 r09ab0a9a  
    131131extern void fibril_rmutex_unlock(fibril_rmutex_t *);
    132132
    133 
    134133#endif
  • uspace/lib/c/generic/rtld/module.c

    rb2aaaa0 r09ab0a9a  
    204204        str_cpy(name_buf + 5, NAME_BUF_SIZE - 5, name);
    205205
    206 
    207206        DPRINTF("filename:'%s'\n", name_buf);
    208207
  • uspace/lib/c/generic/rtld/symbol.c

    rb2aaaa0 r09ab0a9a  
    182182        return sym; /* Symbol found */
    183183}
    184 
    185184
    186185/** Find the definition of a symbol.
  • uspace/lib/c/generic/stdio.c

    rb2aaaa0 r09ab0a9a  
    172172}
    173173
    174 
    175174/** @}
    176175 */
  • uspace/lib/c/generic/str.c

    rb2aaaa0 r09ab0a9a  
    10161016}
    10171017
    1018 
    10191018/** Convert wide string to new string.
    10201019 *
     
    10641063        return str;
    10651064}
    1066 
    10671065
    10681066/** Convert string to wide string.
     
    12931291        return true;
    12941292}
    1295 
    12961293
    12971294/** Duplicate string.
  • uspace/lib/c/generic/thread/fibril.c

    rb2aaaa0 r09ab0a9a  
    283283         */
    284284
    285 
    286285        if (!locked)
    287286                futex_lock(&fibril_futex);
     
    330329
    331330        futex_lock(&ipc_lists_futex);
    332 
    333331
    334332        _ipc_waiter_t *w = list_pop(&ipc_waiter_list, _ipc_waiter_t, link);
  • uspace/lib/c/generic/thread/fibril_synch.c

    rb2aaaa0 r09ab0a9a  
    126126        }
    127127}
    128 
    129128
    130129static void check_fibril_for_deadlock(fibril_owner_info_t *oi, fibril_t *fib)
  • uspace/lib/c/generic/thread/mpsc.c

    rb2aaaa0 r09ab0a9a  
    181181        _mpsc_push(q, q->close_node);
    182182}
    183 
  • uspace/lib/c/generic/thread/rcu.c

    rb2aaaa0 r09ab0a9a  
    8181#include "../private/fibril.h"
    8282
    83 
    8483/** RCU sleeps for RCU_SLEEP_MS before polling an active RCU reader again. */
    8584#define RCU_SLEEP_MS        10
     
    9089#define RCU_GROUP_A         (size_t)(0 | RCU_NESTING_INC)
    9190#define RCU_GROUP_B         (size_t)(1 | RCU_NESTING_INC)
    92 
    9391
    9492/** Fibril local RCU data. */
     
    118116} blocked_fibril_t;
    119117
    120 
    121118/** Fibril local RCU data. */
    122119static fibril_local fibril_rcu_data_t fibril_rcu = {
     
    142139};
    143140
    144 
    145141static void wait_for_readers(size_t reader_group);
    146142static void force_mb_in_all_threads(void);
     
    154150static bool is_in_reader_section(size_t nesting_cnt);
    155151static size_t get_other_group(size_t group);
    156 
    157152
    158153/** Registers a fibril so it may start using RCU read sections.
     
    409404}
    410405
    411 
    412406static bool is_preexisting_reader(const fibril_rcu_data_t *fib, size_t group)
    413407{
     
    435429}
    436430
    437 
    438 
    439431/** @}
    440432 */
  • uspace/lib/c/generic/time.c

    rb2aaaa0 r09ab0a9a  
    380380}
    381381
    382 
    383382/** Which day the week-based year starts on.
    384383 *
  • uspace/lib/c/generic/ubsan.c

    rb2aaaa0 r09ab0a9a  
    228228        ubsan_panic();
    229229}
    230 
  • uspace/lib/c/generic/uuid.c

    rb2aaaa0 r09ab0a9a  
    181181}
    182182
    183 
    184183/** @}
    185184 */
  • uspace/lib/c/generic/vbd.c

    rb2aaaa0 r09ab0a9a  
    358358}
    359359
    360 
    361360/** @}
    362361 */
  • uspace/lib/c/generic/vfs/vfs.c

    rb2aaaa0 r09ab0a9a  
    397397}
    398398
    399 
    400399/** Return a list of currently available file system types
    401400 *
     
    746745}
    747746
    748 
    749747/** Open a file handle for I/O
    750748 *
Note: See TracChangeset for help on using the changeset viewer.