modulos-devel Mailing List for Modular Operating System - ModulOS
Status: Pre-Alpha
Brought to you by:
luizshigunov
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Luiz H. S. <shi...@in...> - 2002-01-17 11:49:41
|
On Fri, 18 Jan 2002, Stephen Caldwell wrote: > Do you think it's wise to use gotos so much? 99.99% C/C++ of the programming community would say that gotos are bad. You're right. But I use gotos to generate better code. Usually I use gotos when an error occurs and something must be done to undo what was done. Like this: if (MemManager_AllocObj(mapCache, (void**)&map)) return NULL; TaskManager_P(&task->mapSem); /* get address if not FIXED */ if (!(prop & UserModManager_FIXED_ADDR)) { start = GetUnmappedArea(task, start, len, align); if (!start) goto errorFreeMap; } else { /* free old mappings */ if (DestroyMapping(task, start, len)) { start = NULL; errorFreeMap: MemManager_FreeObj(mapCache, map); goto errorV; } } ... ... errorV: TaskManager_V(&task->mapSem, 0); return start; } Without gotos: if (MemManager_AllocObj(mapCache, (void**)&map)) return NULL; TaskManager_P(&task->mapSem); /* get address if not FIXED */ if (!(prop & UserModManager_FIXED_ADDR)) { start = GetUnmappedArea(task, start, len, align); if (!start) { MemManager_FreeObj(mapCache, map); TaskManager_V(&task->mapSem, 0); return NULL; } } else { /* free old mappings */ if (DestroyMapping(task, start, len)) { MemManager_FreeObj(mapCache, map); TaskManager_V(&task->mapSem, 0); return NULL; } } ... ... TaskManager_V(&task->mapSem, 0); return start; } You can see a lot of duplicate code. But the compiler can't! So I have to use gotos to generate smaller code. That's a common practice. Look Linux, FreeBSD, etc, etc. If you see some code that can be changed to eliminate a goto without making the code bigger. Please, tell me. I'll be glad to change it. See you, Luiz Henrique Shigunov (shi...@in...) ICQ: 103562572 Visit ModulOS: http://modulos.sourceforge.net/ Personal Page: http://www.inf.ufsc.br/~shigunov/ |
From: Stephen C. <st...@me...> - 2002-01-17 05:28:41
|
Do you think it's wise to use gotos so much? 99.99% C/C++ of the = programming community would say that gotos are bad.=20 |
From: Luiz H. S. <shi...@in...> - 2002-01-15 17:24:11
|
On Sun, 13 Jan 2002, Stephen Caldwell wrote: > How exactly to I create a working installation for ModulOS? To start developing for ModulOS you'll need this: * linux * gcc I use redhat linux 7.1 with some rpms from rawhide. I know that the gcc which comes with redhat linux 6.2 (egcs-2.91.66) won't compile ModulOS' modules. I use gcc-2.96-97.1 You can get the sources from CVS (sourceforge.net/cvs/?group_id=23404) or download them from SourceForge (modulos.sourceforge.net/download.html). Start compiling the tools. Them put the binaries on your ~/bin dir. Now you can compile the modules. Soon I'll post a message saying how to build a floppy disk image (bootdisk). -- Luiz Henrique Shigunov (shi...@in...) ICQ: 103562572 Visit ModulOS: http://modulos.sourceforge.net/ Personal Page: http://www.inf.ufsc.br/~shigunov/ |
From: Stephen C. <st...@me...> - 2002-01-13 20:56:44
|
How exactly to I create a working installation for ModulOS? |
From: Luiz H. S. <shi...@in...> - 2001-08-06 14:43:49
|
On Mon, 6 Aug 2001, Sudhakar A N wrote: > I went through the docs you have given at Source forge. I felt that I would > take some time to get aquainted with this scheme > I will ask my questions regarding this later. I think we should start to use ModulOS's forums and mailing lists. So this messages will get archived. What you think? I'm already subscribed to ModulOS's developers mailing list. > You specified that Keyboard Interface > Need to specify Event structure format, types of event (key pressed, etc) > and some functions too (insert chars, keymaps, etc). > > But by what I understand from your documentation we need to have it as > generic as possible. > Hence cant we classify charachter devices such as > > Keyboard > Mouse > > under the same category > (Biased by my Linux Knowledge) Yes, that's right. I forgot to say that the keyboard module MUST implement the InputDev interface, which is common to all input devices (keyboard, mouse, joystick, etc). A user module can only receive events, through InterManager interface, from modules that implement InputDev interface. But we need an interface specific to keyboards that specify types of events, functions, etc. > INT 21H Service 01: Keyboard Input with Echo > INT 21H Service 07: Direct Keyboard Input without Echo > INT 21H Service 0AH: Buffered Keyboard Input > INT 21H Service 0BH: Check Keyboard Status > INT 16H Service 11H: Determine if charachter is avalable I think WaitEvent from InputDev do what these functions do, except echoing to screen, which is not a good idea. The keyboard interface will be used in graphical mode too. Programs should do echo if they want. I've updated InputDev, VideoController and InterManager interfaces. I'll make then available today (06/08). > INT 16H Service 05H: Keyboard Write(write to keyboard buffer) This is a function the keyboard interface may have. Only available for system modules, so programs can't send keyboards events to others programs. > INT 16H Service 02H: Return the current Shift Status(Extended Shift Status > in AH like nums lock, caps lock). I don't know if we need this one. Shouldn't the shift status be sent with each event? > How correct am I in this understanding? Anything else to be added? > Need a lot of I/Ps from you. I'm not an expert in keyboards, so... But we should start with something simple, but useful. Then, as things go on, we can add more functions, events types, etc. Something important are keyboard layout, keymaps and charsets, but I don't know how they work. See you, -- Luiz Henrique Shigunov UIN: 103562572 Visit ModulOS: http://modulos.sourceforge.net Personal page: http://www.inf.ufsc.br/~shigunov |
From: Evandro V. G. <ev...@hz...> - 2001-07-19 19:32:37
|
--=20 HZTA INTERNET=20 POTENCIALIZANDO NEG=D3CIOS ATRAV=C9S DA INTERNET Telefone: (11) 5072.2446 // Fax: 5072.3114 E-mail: ev...@hz... // Web Site: www.hzta.com.br |