Changeset c0d814a in mainline for kernel/generic/src/sysinfo/sysinfo.c


Ignore:
Timestamp:
2025-04-10T20:02:30Z (4 days ago)
Author:
GitHub <noreply@…>
Children:
b8b031f
Parents:
a92290d (diff), 90dd8aee (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Wayne Thornton <wmthornton-dev@…> (2025-04-10 20:02:30)
git-committer:
GitHub <noreply@…> (2025-04-10 20:02:30)
Message:

Merge pull request #6 from HelenOS/master

Merge pending changes from downstream helenos/master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/sysinfo/sysinfo.c

    ra92290d rc0d814a  
    5757
    5858/** Sysinfo lock */
    59 static MUTEX_INITIALIZE(sysinfo_lock, MUTEX_ACTIVE);
     59static IRQ_SPINLOCK_INITIALIZE(sysinfo_lock);
    6060
    6161/** Sysinfo item constructor
     
    327327{
    328328        /* Protect sysinfo tree consistency */
    329         mutex_lock(&sysinfo_lock);
     329        irq_spinlock_lock(&sysinfo_lock, true);
    330330
    331331        if (root == NULL)
     
    340340        }
    341341
    342         mutex_unlock(&sysinfo_lock);
     342        irq_spinlock_unlock(&sysinfo_lock, true);
    343343}
    344344
     
    360360{
    361361        /* Protect sysinfo tree consistency */
    362         mutex_lock(&sysinfo_lock);
     362        irq_spinlock_lock(&sysinfo_lock, true);
    363363
    364364        if (root == NULL)
     
    374374        }
    375375
    376         mutex_unlock(&sysinfo_lock);
     376        irq_spinlock_unlock(&sysinfo_lock, true);
    377377}
    378378
     
    390390{
    391391        /* Protect sysinfo tree consistency */
    392         mutex_lock(&sysinfo_lock);
     392        irq_spinlock_lock(&sysinfo_lock, true);
    393393
    394394        if (root == NULL)
     
    404404        }
    405405
    406         mutex_unlock(&sysinfo_lock);
     406        irq_spinlock_unlock(&sysinfo_lock, true);
    407407}
    408408
     
    425425{
    426426        /* Protect sysinfo tree consistency */
    427         mutex_lock(&sysinfo_lock);
     427        irq_spinlock_lock(&sysinfo_lock, true);
    428428
    429429        if (root == NULL)
     
    439439        }
    440440
    441         mutex_unlock(&sysinfo_lock);
     441        irq_spinlock_unlock(&sysinfo_lock, true);
    442442}
    443443
     
    452452{
    453453        /* Protect sysinfo tree consistency */
    454         mutex_lock(&sysinfo_lock);
     454        irq_spinlock_lock(&sysinfo_lock, true);
    455455
    456456        if (root == NULL)
     
    463463                printf("Could not set sysinfo item %s.\n", name);
    464464
    465         mutex_unlock(&sysinfo_lock);
     465        irq_spinlock_unlock(&sysinfo_lock, true);
    466466}
    467467
     
    479479{
    480480        /* Protect sysinfo tree consistency */
    481         mutex_lock(&sysinfo_lock);
     481        irq_spinlock_lock(&sysinfo_lock, true);
    482482
    483483        if (root == NULL)
     
    498498        }
    499499
    500         mutex_unlock(&sysinfo_lock);
     500        irq_spinlock_unlock(&sysinfo_lock, true);
    501501}
    502502
     
    596596         * while we are dumping it
    597597         */
    598         mutex_lock(&sysinfo_lock);
     598        irq_spinlock_lock(&sysinfo_lock, true);
    599599
    600600        if (root == NULL)
     
    603603                sysinfo_dump_internal(root, 0);
    604604
    605         mutex_unlock(&sysinfo_lock);
     605        irq_spinlock_unlock(&sysinfo_lock, true);
    606606}
    607607
     
    695695                 * are reading it.
    696696                 */
    697                 mutex_lock(&sysinfo_lock);
     697                irq_spinlock_lock(&sysinfo_lock, true);
    698698                ret = sysinfo_get_item(path, NULL, dry_run);
    699                 mutex_unlock(&sysinfo_lock);
     699                irq_spinlock_unlock(&sysinfo_lock, true);
    700700        }
    701701
     
    806806                 * are reading it.
    807807                 */
    808                 mutex_lock(&sysinfo_lock);
     808                irq_spinlock_lock(&sysinfo_lock, true);
    809809                ret = sysinfo_get_keys(path, NULL, dry_run);
    810                 mutex_unlock(&sysinfo_lock);
     810                irq_spinlock_unlock(&sysinfo_lock, true);
    811811        }
    812812
Note: See TracChangeset for help on using the changeset viewer.