Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358090
b: refs/heads/master
c: 5845b81
h: refs/heads/master
v: v3
  • Loading branch information
Dave Airlie committed Feb 8, 2013
1 parent 3ec87ca commit e075f3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 054430e773c9a1e26f38e30156eff02dedfffc17
refs/heads/master: 5845b81bdad374f98f809a658ec747d92c9595c4
9 changes: 9 additions & 0 deletions trunk/kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ static DEFINE_SEMAPHORE(console_sem);
struct console *console_drivers;
EXPORT_SYMBOL_GPL(console_drivers);

#ifdef CONFIG_LOCKDEP
static struct lockdep_map console_lock_dep_map = {
.name = "console_lock"
};
#endif

/*
* This is used for debugging the mess that is the VT code by
* keeping track if we have the console semaphore held. It's
Expand Down Expand Up @@ -1918,6 +1924,7 @@ void console_lock(void)
return;
console_locked = 1;
console_may_schedule = 1;
mutex_acquire(&console_lock_dep_map, 0, 0, _RET_IP_);
}
EXPORT_SYMBOL(console_lock);

Expand All @@ -1939,6 +1946,7 @@ int console_trylock(void)
}
console_locked = 1;
console_may_schedule = 0;
mutex_acquire(&console_lock_dep_map, 0, 1, _RET_IP_);
return 1;
}
EXPORT_SYMBOL(console_trylock);
Expand Down Expand Up @@ -2099,6 +2107,7 @@ void console_unlock(void)
local_irq_restore(flags);
}
console_locked = 0;
mutex_release(&console_lock_dep_map, 1, _RET_IP_);

/* Release the exclusive_console once it is used */
if (unlikely(exclusive_console))
Expand Down

0 comments on commit e075f3b

Please sign in to comment.