Changeset b076dfb in mainline for kernel/generic/include


Ignore:
Timestamp:
2023-02-02T21:58:36Z (3 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
64e9cf4
Parents:
2b264c4
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-01-20 19:05:09)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-02 21:58:36)
Message:

Implement more elaborate debug checking for spinlocks

Location:
kernel/generic/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/arch.h

    r2b264c4 rb076dfb  
    7575typedef struct {
    7676        size_t preemption;      /**< Preemption disabled counter and flag. */
     77        size_t mutex_locks;
    7778        struct thread *thread;  /**< Current thread. */
    7879        struct task *task;      /**< Current task. */
  • kernel/generic/include/synch/spinlock.h

    r2b264c4 rb076dfb  
    124124
    125125typedef struct {
    126         spinlock_t lock;         /**< Spinlock */
    127         bool guard;              /**< Flag whether ipl is valid */
    128         ipl_t ipl;               /**< Original interrupt level */
     126        spinlock_t lock;              /**< Spinlock */
     127        bool guard;                   /**< Flag whether ipl is valid */
     128        ipl_t ipl;                    /**< Original interrupt level */
     129#ifdef CONFIG_DEBUG_SPINLOCK
     130        _Atomic(struct cpu *) owner;  /**< Which cpu currently owns this lock */
     131#endif
    129132} irq_spinlock_t;
    130133
Note: See TracChangeset for help on using the changeset viewer.