Changeset 571cc2d in mainline for kernel/generic/src/console/console.c


Ignore:
Timestamp:
2025-04-17T15:14:03Z (5 days ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
d5b37b6
Parents:
af77459
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-11 15:56:15)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-17 15:14:03)
Message:

Use irq_spinlock_t instead of plain spinlock_t in console code

File:
1 edited

Legend:

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

    raf77459 r571cc2d  
    8686
    8787/** Kernel log spinlock */
    88 SPINLOCK_INITIALIZE_NAME(kio_lock, "kio_lock");
     88IRQ_SPINLOCK_INITIALIZE(kio_lock);
    8989
    9090/** Physical memory area used for kio buffer */
     
    254254                return;
    255255
    256         spinlock_lock(&kio_lock);
     256        irq_spinlock_lock(&kio_lock, true);
    257257
    258258        if (kio_notified != kio_written) {
     
    261261        }
    262262
    263         spinlock_unlock(&kio_lock);
     263        irq_spinlock_unlock(&kio_lock, true);
    264264}
    265265
     
    274274                return;
    275275
    276         spinlock_lock(&kio_lock);
     276        irq_spinlock_lock(&kio_lock, true);
    277277
    278278        /* Print characters that weren't printed earlier */
     
    286286                 * the character.
    287287                 */
    288                 spinlock_unlock(&kio_lock);
     288                irq_spinlock_unlock(&kio_lock, true);
    289289                stdout->op->write(stdout, tmp);
    290                 spinlock_lock(&kio_lock);
    291         }
    292 
    293         spinlock_unlock(&kio_lock);
     290                irq_spinlock_lock(&kio_lock, true);
     291        }
     292
     293        irq_spinlock_unlock(&kio_lock, true);
    294294}
    295295
     
    308308        bool ordy = ((stdout) && (stdout->op->write));
    309309
    310         spinlock_lock(&kio_lock);
     310        irq_spinlock_lock(&kio_lock, true);
    311311        kio_push_char(ch);
    312         spinlock_unlock(&kio_lock);
     312        irq_spinlock_unlock(&kio_lock, true);
    313313
    314314        /* Output stored characters */
Note: See TracChangeset for help on using the changeset viewer.