Ignore:
Timestamp:
2010-04-28T19:58:21Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
373acb4
Parents:
6e121b8
Message:

When taking sysinfo_lock, interrupts don't have to be disabled.

File:
1 edited

Legend:

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

    r6e121b8 rc6218327  
    104104/** Recursively find an item in sysinfo tree
    105105 *
    106  * Should be called with interrupts disabled
    107  * and sysinfo_lock held.
     106 * Should be called with sysinfo_lock held.
    108107 *
    109108 * @param name    Current sysinfo path suffix.
     
    170169/** Recursively create items in sysinfo tree
    171170 *
    172  * Should be called with interrupts disabled
    173  * and sysinfo_lock held.
     171 * Should be called with sysinfo_lock held.
    174172 *
    175173 * @param name     Current sysinfo path suffix.
     
    301299{
    302300        /* Protect sysinfo tree consistency */
    303         ipl_t ipl = interrupts_disable();
    304301        mutex_lock(&sysinfo_lock);
    305302       
     
    314311       
    315312        mutex_unlock(&sysinfo_lock);
    316         interrupts_restore(ipl);
    317313}
    318314
     
    334330{
    335331        /* Protect sysinfo tree consistency */
    336         ipl_t ipl = interrupts_disable();
    337332        mutex_lock(&sysinfo_lock);
    338333       
     
    348343       
    349344        mutex_unlock(&sysinfo_lock);
    350         interrupts_restore(ipl);
    351345}
    352346
     
    363357{
    364358        /* Protect sysinfo tree consistency */
    365         ipl_t ipl = interrupts_disable();
    366359        mutex_lock(&sysinfo_lock);
    367360       
     
    376369       
    377370        mutex_unlock(&sysinfo_lock);
    378         interrupts_restore(ipl);
    379371}
    380372
     
    396388{
    397389        /* Protect sysinfo tree consistency */
    398         ipl_t ipl = interrupts_disable();
    399390        mutex_lock(&sysinfo_lock);
    400391       
     
    409400       
    410401        mutex_unlock(&sysinfo_lock);
    411         interrupts_restore(ipl);
    412402}
    413403
     
    422412{
    423413        /* Protect sysinfo tree consistency */
    424         ipl_t ipl = interrupts_disable();
    425414        mutex_lock(&sysinfo_lock);
    426415       
     
    433422       
    434423        mutex_unlock(&sysinfo_lock);
    435         interrupts_restore(ipl);
    436424}
    437425
     
    448436{
    449437        /* Protect sysinfo tree consistency */
    450         ipl_t ipl = interrupts_disable();
    451438        mutex_lock(&sysinfo_lock);
    452439       
     
    464451       
    465452        mutex_unlock(&sysinfo_lock);
    466         interrupts_restore(ipl);
    467453}
    468454
     
    481467/** Dump the structure of sysinfo tree
    482468 *
    483  * Should be called with interrupts disabled
    484  * and sysinfo_lock held.
     469 * Should be called with sysinfo_lock held.
    485470 *
    486471 * @param root  Root item of the current (sub)tree.
     
    558543        /* Avoid other functions to mess with sysinfo
    559544           while we are dumping it */
    560         ipl_t ipl = interrupts_disable();
    561545        mutex_lock(&sysinfo_lock);
    562546       
     
    567551       
    568552        mutex_unlock(&sysinfo_lock);
    569         interrupts_restore(ipl);
    570553}
    571554
    572555/** Return sysinfo item value determined by name
    573556 *
    574  * Should be called with interrupts disabled
    575  * and sysinfo_lock held.
     557 * Should be called with sysinfo_lock held.
    576558 *
    577559 * @param name    Sysinfo path.
     
    658640                 * are reading it.
    659641                 */
    660                 ipl_t ipl = interrupts_disable();
    661642                mutex_lock(&sysinfo_lock);
    662643                ret = sysinfo_get_item(path, NULL, dry_run);
    663644                mutex_unlock(&sysinfo_lock);
    664                 interrupts_restore(ipl);
    665645        }
    666646        free(path);
Note: See TracChangeset for help on using the changeset viewer.