From 786c7ea1d77742cf3e44a2f6ca9888b5a3d45b59 Mon Sep 17 00:00:00 2001 From: Tomas 'ZeXx86' Jedrzejek Date: Sun, 10 Jan 2010 13:37:26 +0100 Subject: [PATCH] Scheduler's hlt instruction was temporarily deleted because of unwanted results + qemu bug; little improvement in zinstall app --- apps/zde/zinstall/main.c | 27 ++++++++++++++++++++------- kernel/core/sched.c | 5 ++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/apps/zde/zinstall/main.c b/apps/zde/zinstall/main.c index 17544f9..163d701 100644 --- a/apps/zde/zinstall/main.c +++ b/apps/zde/zinstall/main.c @@ -1,6 +1,7 @@ /* * ZeX/OS * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com) + * Copyright (C) 2010 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +20,18 @@ #include -unsigned step; +typedef struct { + unsigned step; + char drive[32]; +} zinstall_t; +zinstall_t zinst; + +void zinstall_draw_step1 () +{ + zgui_puts (10, 40, "First step is focused on hard-drive ID,\nthat mean, you must select\n correct disk for installation.\n\n", 0); + + zgui_input (10, 100, &zinst.drive, 31, 0); +} void zinstall_draw () { @@ -28,15 +40,14 @@ void zinstall_draw () unsigned btn_next = zgui_button (150, 145, "Next"); if (!btn_next) - step ++; + zinst.step ++; - switch (step) { + switch (zinst.step) { case 0: - zgui_puts (10, 40, "Welcome my user!\nYou are attempting to install ZeX/OS\nonto your hard-drive, please be sure\nabout your backup because of data loss.\n\nWarning: This version is in the alpha-stage,\nit is possible that some error may occur.\n\nPress button \"Next\" for continue\nin installation process", 0); + zgui_puts (10, 40, "Welcome !\nYou are attempting to install ZeX/OS\nonto your hard-drive, please be sure\nabout your backup because of data loss.\n\nWarning: This version is in the alpha-stage,\nit is possible that some error may occur.\n\nPress button \"Next\" for continue\nin installation process", 0); break; case 1: - zgui_puts (10, 40, "First step is focused on hard-drive ID,\nthat mean, you must select\n correct disk for installation.\n\n", 0); - break; + return zinstall_draw_step1 (); case 2: zgui_puts (10, 40, "In this step we should setup HDD partition\ntable before installation process begin.\nIt is necessary to choose current partition\ntype, respectively filesystem ID.", 0); break; @@ -46,7 +57,9 @@ void zinstall_draw () int main (int argc, char **argv) { int exit = 0; - step = 0; + + zinst.step = 0; + zinst.drive = 0; if (zgui_init () == -1) return -1; diff --git a/kernel/core/sched.c b/kernel/core/sched.c index 247e718..15782c6 100644 --- a/kernel/core/sched.c +++ b/kernel/core/sched.c @@ -3,6 +3,7 @@ * Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com) * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com) * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com) + * Copyright (C) 2010 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -71,14 +72,12 @@ void schedule (void) /*else*/ _curr_task->attick = 0; /* handle current task and null attick counter */ #endif - } else /* we dont need use everytime 100% of cpu time - wait a tick */ - arch_cpu_hlt (); + } /* set current task */ if (arch_task_set (_curr_task)) return; - for (;;) { /* continue on next task */ _curr_task = _curr_task->next; -- 2.11.4.GIT