From a455cd5af26bf8731e7c981a9421b16ab34dae6f Mon Sep 17 00:00:00 2001 From: Miguel Date: Mon, 1 Oct 2018 23:22:03 +0200 Subject: fukkin scheduler --- userspace/fsh.c | 1 + userspace/newcalls.h | 10 ++++++++++ userspace/pain2.c | 13 +++++++++---- 3 files changed, 20 insertions(+), 4 deletions(-) (limited to 'userspace') diff --git a/userspace/fsh.c b/userspace/fsh.c index d456d1b..62cd27e 100644 --- a/userspace/fsh.c +++ b/userspace/fsh.c @@ -88,6 +88,7 @@ int main(int argc, char **argv) while(1) { + _gui_rect(); char c=fgetc(stdin); if(c=='\b') diff --git a/userspace/newcalls.h b/userspace/newcalls.h index 20d8ffd..e22bc78 100644 --- a/userspace/newcalls.h +++ b/userspace/newcalls.h @@ -4,6 +4,8 @@ #define SYSCALL_CLONE 83 #define SYSCALL_PIPE 84 #define SYSCALL_DUP2 86 +#define SYSCALL_GUI_RECT 87 +#define SYSCALL_GUI_WIN 88 int _clone(void) { @@ -17,4 +19,12 @@ int _dup2(uint32_t oldfd,uint32_t newfd) { return syscall(SYSCALL_DUP2,oldfd,newfd,0); } +int _gui_rect() +{ + return syscall(SYSCALL_GUI_RECT,0,0,0); +} +int _gui_win() +{ + return syscall(SYSCALL_GUI_WIN,0,0,0); +} // diff --git a/userspace/pain2.c b/userspace/pain2.c index 840b6b6..69784ce 100644 --- a/userspace/pain2.c +++ b/userspace/pain2.c @@ -1,4 +1,5 @@ #include "put_pixel.h" +#include "newcalls.h" #include #include @@ -24,18 +25,22 @@ void doscolor(int color,int color2) int main(int argc,char **argv) { + _gui_win(); + for(int i=0;i0;i--) + for(int i=380;i>0;i-=80) { put_rect(0,0,640,480,0xff0000); - put_rect(100+i,100+i,100,100,0x0000ff); + put_rect(i,i,100,100,0x0000ff); + _gui_rect(); } } -- cgit v1.2.3