Changeset 61eb2ce2 in mainline for uspace/srv/fs


Ignore:
Timestamp:
2023-02-05T22:03:19Z (3 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b596d0d
Parents:
07700ed
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-05 22:01:46)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-05 22:03:19)
Message:

Make hash table operations immutable, because global mutable state is evil

Location:
uspace/srv/fs
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/cdfs/cdfs_ops.c

    r07700ed r61eb2ce2  
    323323
    324324/** Nodes hash table operations */
    325 static hash_table_ops_t nodes_ops = {
     325static const hash_table_ops_t nodes_ops = {
    326326        .hash = nodes_hash,
    327327        .key_hash = nodes_key_hash,
  • uspace/srv/fs/exfat/exfat_idx.c

    r07700ed r61eb2ce2  
    149149}
    150150
    151 static hash_table_ops_t uph_ops = {
     151static const hash_table_ops_t uph_ops = {
    152152        .hash = pos_hash,
    153153        .key_hash = pos_key_hash,
     
    195195}
    196196
    197 static hash_table_ops_t uih_ops = {
     197static const hash_table_ops_t uih_ops = {
    198198        .hash = idx_hash,
    199199        .key_hash = idx_key_hash,
  • uspace/srv/fs/fat/fat_idx.c

    r07700ed r61eb2ce2  
    149149}
    150150
    151 static hash_table_ops_t uph_ops = {
     151static const hash_table_ops_t uph_ops = {
    152152        .hash = pos_hash,
    153153        .key_hash = pos_key_hash,
     
    195195}
    196196
    197 static hash_table_ops_t uih_ops = {
     197static const hash_table_ops_t uih_ops = {
    198198        .hash = idx_hash,
    199199        .key_hash = idx_key_hash,
  • uspace/srv/fs/locfs/locfs_ops.c

    r07700ed r61eb2ce2  
    9595}
    9696
    97 static hash_table_ops_t services_ops = {
     97static const hash_table_ops_t services_ops = {
    9898        .hash = services_hash,
    9999        .key_hash = services_key_hash,
  • uspace/srv/fs/mfs/mfs_ops.c

    r07700ed r61eb2ce2  
    123123}
    124124
    125 static hash_table_ops_t open_nodes_ops = {
     125static const hash_table_ops_t open_nodes_ops = {
    126126        .hash = open_nodes_hash,
    127127        .key_hash = open_nodes_key_hash,
  • uspace/srv/fs/tmpfs/tmpfs_ops.c

    r07700ed r61eb2ce2  
    189189
    190190/** TMPFS nodes hash table operations. */
    191 hash_table_ops_t nodes_ops = {
     191const hash_table_ops_t nodes_ops = {
    192192        .hash = nodes_hash,
    193193        .key_hash = nodes_key_hash,
  • uspace/srv/fs/udf/udf_idx.c

    r07700ed r61eb2ce2  
    7878}
    7979
    80 static hash_table_ops_t udf_idx_ops = {
     80static const hash_table_ops_t udf_idx_ops = {
    8181        .hash = udf_idx_hash,
    8282        .key_hash = udf_idx_key_hash,
Note: See TracChangeset for help on using the changeset viewer.