Changeset 61eb2ce2 in mainline for uspace/srv/ns


Ignore:
Timestamp:
2023-02-05T22:03:19Z (2 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/ns
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ns/service.c

    r07700ed r61eb2ce2  
    112112
    113113/** Operations for service hash table. */
    114 static hash_table_ops_t service_hash_table_ops = {
     114static const hash_table_ops_t service_hash_table_ops = {
    115115        .hash = service_hash,
    116116        .key_hash = service_key_hash,
     
    121121
    122122/** Operations for interface hash table. */
    123 static hash_table_ops_t iface_hash_table_ops = {
     123static const hash_table_ops_t iface_hash_table_ops = {
    124124        .hash = iface_hash,
    125125        .key_hash = iface_key_hash,
  • uspace/srv/ns/task.c

    r07700ed r61eb2ce2  
    8080
    8181/** Operations for task hash table. */
    82 static hash_table_ops_t task_hash_table_ops = {
     82static const hash_table_ops_t task_hash_table_ops = {
    8383        .hash = task_hash,
    8484        .key_hash = task_key_hash,
     
    131131
    132132/** Operations for task hash table. */
    133 static hash_table_ops_t p2i_ops = {
     133static const hash_table_ops_t p2i_ops = {
    134134        .hash = p2i_hash,
    135135        .key_hash = p2i_key_hash,
Note: See TracChangeset for help on using the changeset viewer.