view src/spinlock.h @ 197:3cac4139b31d

send arg at vm_impl
author tobaru
date Thu, 23 Jan 2020 15:43:36 +0900
parents 7c200a8328fa
children 3f243b59bcee
line wrap: on
line source

// Mutual exclusion lock.
#ifndef SPINLOCK_H
struct spinlock {
    uint        locked;     // Is the lock held?

    // For debugging:
    char        *name;      // Name of lock.
    struct cpu  *cpu;       // The cpu holding the lock.
    uint        pcs[10];    // The call stack (an array of program counters)
    // that locked the lock.
};
#endif // SPINLOCK_H
#define SPINLOCK_H