summaryrefslogtreecommitdiff
path: root/video/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/console.c')
-rw-r--r--video/console.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/video/console.c b/video/console.c
index 5b6e103..743aaac 100644
--- a/video/console.c
+++ b/video/console.c
@@ -1,4 +1,5 @@
#include "console.h"
+#include "kernel/spinlock.h"
#include "kernel/config.h"
//#define FOOLOS_CONSOLE
@@ -109,11 +110,12 @@ void scr_nextline()
void scr_put_char(char ch,char col)
{
+ lock_spin(6);
if(ch=='\n')scr_nextline();
else if(posx<SCR_WIDTH)
{
- print_char_col(posx,posy,ch,SCR_GREEN);
+ print_char_col(posx,posy,ch,col);
posx++;
}
@@ -121,6 +123,8 @@ void scr_put_char(char ch,char col)
if(posx>=SCR_WIDTH)scr_nextline();
#endif
+ lock_release(6);
+
}
@@ -161,7 +165,7 @@ void scr_put_string(char *str)
void scr_backspace()
{
if(posx==0)return;
- print_char_col(posx-1,posy,'@',SCR_LGREEN);
+ print_char_col(posx-1,posy,' ',SCR_LGREEN);
posx--;
}