Changeset ad9178bf in mainline


Ignore:
Timestamp:
2023-10-27T18:20:03Z (6 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, topic/msim-upgrade, topic/simplify-dev-export
Children:
694ca3d6
Parents:
55c5cb05
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-27 18:14:50)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-27 18:20:03)
Message:

Deduplicate ADT

Files:
8 deleted
2 edited
17 moved

Legend:

Unmodified
Added
Removed
  • common/adt/hash_table.c

    r55c5cb05 rad9178bf  
    5252#include <adt/list.h>
    5353#include <assert.h>
    54 #include <member.h>
    5554#include <stdlib.h>
    5655#include <str.h>
  • common/include/adt/hash.h

    r55c5cb05 rad9178bf  
    3535#define _LIBC_ADT_HASH_H_
    3636
     37#include <stddef.h>
    3738#include <stdint.h>
    38 #include <types/common.h>
    3939
    4040/** Produces a uniform hash affecting all output bits from the skewed input. */
     
    7878static inline size_t hash_mix(size_t hash)
    7979{
    80 #ifdef __32_BITS__
    81         return hash_mix32(hash);
    82 #elif defined(__64_BITS__)
    83         return hash_mix64(hash);
    84 #else
    85 #error Unknown size_t size - cannot select proper hash mix function.
    86 #endif
     80        if (sizeof(long) == 4)
     81                return hash_mix32(hash);
     82        else
     83                return hash_mix64(hash);
    8784}
    8885
  • kernel/generic/meson.build

    r55c5cb05 rad9178bf  
    3636
    3737generic_src += files(
     38        'common/adt/bitmap.c',
     39        'common/adt/hash_table.c',
     40        'common/adt/list.c',
     41        'common/adt/odict.c',
    3842        'common/stdc/calloc.c',
    3943        'common/stdc/ctype.c',
     
    4448        'common/strtol.c',
    4549
    46         'src/adt/bitmap.c',
    47         'src/adt/hash_table.c',
    48         'src/adt/list.c',
    49         'src/adt/odict.c',
    5050        'src/cap/cap.c',
    5151        'src/console/chardev.c',
  • uspace/lib/c/meson.build

    r55c5cb05 rad9178bf  
    6161
    6262src += files(
     63        'common/adt/checksum.c',
     64        'common/adt/circ_buf.c',
     65        'common/adt/list.c',
     66        'common/adt/hash_table.c',
     67        'common/adt/odict.c',
     68        'common/adt/prodcons.c',
    6369        'common/stdc/ctype.c',
    6470        'common/stdc/mem.c',
     
    143149        'generic/loader.c',
    144150        'generic/getopt.c',
    145         'generic/adt/checksum.c',
    146         'generic/adt/circ_buf.c',
    147         'generic/adt/list.c',
    148         'generic/adt/hash_table.c',
    149         'generic/adt/odict.c',
    150         'generic/adt/prodcons.c',
    151151        'generic/time.c',
    152152        'generic/tmpfile.c',
Note: See TracChangeset for help on using the changeset viewer.