summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsc <rsc>2006-07-17 01:53:43 +0000
committerrsc <rsc>2006-07-17 01:53:43 +0000
commite0966f459f5543faf9e574b7415bec2bf11e6b42 (patch)
tree029614f36bceca5bd0d5793eccfbcb37bac72516
parentb5ee516575b4d2f1fd7de014230fee7cf8b6b538 (diff)
downloadxv6-labs-e0966f459f5543faf9e574b7415bec2bf11e6b42.tar.gz
xv6-labs-e0966f459f5543faf9e574b7415bec2bf11e6b42.tar.bz2
xv6-labs-e0966f459f5543faf9e574b7415bec2bf11e6b42.zip
no more cons_putc; real_cons_putc -> cons_putc
-rw-r--r--console.c24
-rw-r--r--defs.h1
2 files changed, 7 insertions, 18 deletions
diff --git a/console.c b/console.c
index 6a82dac..5e6e5e1 100644
--- a/console.c
+++ b/console.c
@@ -25,7 +25,7 @@ lpt_putc(int c)
}
static void
-real_cons_putc(int c)
+cons_putc(int c)
{
int crtport = 0x3d4; // io port of CGA
uint16_t *crt = (uint16_t *) 0xB8000; // base of CGA memory
@@ -70,16 +70,6 @@ real_cons_putc(int c)
}
void
-cons_putc(int c)
-{
- if(use_console_lock)
- acquire(&console_lock);
- real_cons_putc(c);
- if(use_console_lock)
- release(&console_lock);
-}
-
-void
printint(int xx, int base, int sgn)
{
char buf[16];
@@ -101,7 +91,7 @@ printint(int xx, int base, int sgn)
buf[i++] = '-';
while(--i >= 0)
- real_cons_putc(buf[i]);
+ cons_putc(buf[i]);
}
/*
@@ -122,7 +112,7 @@ cprintf(char *fmt, ...)
if(c == '%'){
state = '%';
} else {
- real_cons_putc(c);
+ cons_putc(c);
}
} else if(state == '%'){
if(c == 'd'){
@@ -135,15 +125,15 @@ cprintf(char *fmt, ...)
char *s = (char*)*ap;
ap++;
while(*s != 0){
- real_cons_putc(*s);
+ cons_putc(*s);
s++;
}
} else if(c == '%'){
- real_cons_putc(c);
+ cons_putc(c);
} else {
// Unknown % sequence. Print it to draw attention.
- real_cons_putc('%');
- real_cons_putc(c);
+ cons_putc('%');
+ cons_putc(c);
}
state = 0;
}
diff --git a/defs.h b/defs.h
index 2e74f84..9d7a94f 100644
--- a/defs.h
+++ b/defs.h
@@ -6,7 +6,6 @@ void kinit(void);
// console.c
void cprintf(char *fmt, ...);
void panic(char *s);
-void cons_putc(int);
// proc.c
struct proc;