Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83421
b: refs/heads/master
c: b094000
h: refs/heads/master
i:
  83419: 34c265c
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Feb 6, 2008
1 parent 059815b commit 0d6e5b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5bd91f18be2fc0dd0384fbfca6d3cdd79a8050dd
refs/heads/master: b0940003f25dd3d2c54c4879809a432a35197f54
8 changes: 5 additions & 3 deletions trunk/drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2400,13 +2400,15 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
{
struct vc_data *vc = vc_cons[fg_console].d;
unsigned char c;
static unsigned long printing;
static DEFINE_SPINLOCK(printing_lock);
const ushort *start;
ushort cnt = 0;
ushort myx;

/* console busy or not yet initialized */
if (!printable || test_and_set_bit(0, &printing))
if (!printable)
return;
if (!spin_trylock(&printing_lock))
return;

if (kmsg_redirect && vc_cons_allocated(kmsg_redirect - 1))
Expand Down Expand Up @@ -2481,7 +2483,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
notify_update(vc);

quit:
clear_bit(0, &printing);
spin_unlock(&printing_lock);
}

static struct tty_driver *vt_console_device(struct console *c, int *index)
Expand Down

0 comments on commit 0d6e5b7

Please sign in to comment.