view include/spinlock.h @ 11:0157781eb6c2 default tip

add entry point
author mir3636
date Tue, 25 Dec 2018 19:06:09 +0900
parents c450faca55f4
children
line wrap: on
line source

// Mutual exclusion lock.
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.
};