[Kos-cvs] kos/modules/kos spinlock.h, 1.18, 1.19 system.h, 1.16,
1.17 wolfgang.c, 1.72, 1.73
thomas at kos.enix.org
thomas at kos.enix.org
Tue Dec 28 19:44:43 CET 2004
- Previous message: [Kos-cvs] kos/modules/kmem _kslab_cache_alloc.c, 1.14,
1.15 _kslab_cache_create.c, 1.12, 1.13 _kslab_cache_free.c,
1.16, 1.17 _kslab_cache_grow.c, 1.13, 1.14 _kslab_init.c, 1.11,
1.12 _kvmem_alloc.c, 1.12, 1.13 _kvmem_init.c, 1.18,
1.19 _kvmem_utils.c, 1.18, 1.19 kmem.c, 1.16, 1.17 kmem.h,
1.14, 1.15
- Next message: [Kos-cvs] kos/modules/lib/std Makefile, 1.3, 1.4 libcmdline.c, 1.1,
1.2 stdlib.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/kos/kos/modules/kos
In directory the-doors:/tmp/cvs-serv10813/modules/kos
Modified Files:
spinlock.h system.h wolfgang.c
Log Message:
2004-12-28 Thomas Petazzoni <thomas at crazy.kos.nx>
* modules/x86/task/task.c: Try to restrict access to exported
symbol.
* modules/x86/task/_thread_cpu_context.c: Move to the new PMM
system.
* modules/x86/task/Makefile (all): arch_task.ro instead of
arch-task.ro.
* modules/x86/mm/_team_mm_context.c: More informations.
* modules/x86/mm/_mm.h, modules/x86/mm/mm.c, modules/x86/mm/_rmap.c,
modules/x86/mm/_vmap.c: The new VMAP/RMAP system. We also make
sure access to all exported function is restricted to the VMM
module.
* modules/x86/mm/Makefile (all): arch_mm.ro instead of
arch-mm.ro.
* modules/x86/lib/Makefile (all): Rename to arch_lib.ro instead of
arch-lib.ro.
* modules/x86/internals.h: More definitions on the address space
configuration.
* modules/vmm/vmm.h (struct address_space): Add a mutex and a
spinlock to protect address space.
* modules/vmm/vmm.c: Restrict access to some exported
functions. More work has to be done in this area.
* modules/vmm/_vmm_map.c: Part of the new vmap system.
* modules/vmm/_vmm_as.c: Make the appropriate lock/unlock on the
address space mutex. It's just a first try. More reflexion has to
be made.
* modules/task/task.h: Make sure DOXYGEN doesn't try to analyze
the #if stuff, because it doesn't like it.
* modules/task/_task_utils.c (show_all_thread_info): If team is
NULL, it means that we want to display the threads of all teams.
* modules/scheduler/synchq.h: Avoid inclusion of task.h.
* modules/pmm/pmm.c: New PMM system.
* modules/pmm/_pmm_put_page.c: New PMM system.
* modules/pmm/_pmm_init.c: New PMM system.
* modules/pmm/_pmm_get_page.c: New PMM system.
* modules/pmm/_pmm_get_at_addr.c: New PMM system.
* modules/pmm/_pmm.h: struct gpfme is now private.
* modules/pmm/pmm.h: struct gpfme is now private (migrated to
_pmm.h).
* modules/pmm/Makefile (OBJS): New PMM system, with fewer
functionnalities.
* modules/kos/spinlock.h: New type spinlock_flags_t, that should
be used instead of k_ui32_t for spinlock flags.
* modules/kmem/_kvmem_utils.c: Migration to the new PMM
system and various cleanups.
* modules/kmem/_kvmem_init.c: Migration to the new PMM
system and various cleanups.
* modules/kmem/_kslab_cache_grow.c: Migration to the new PMM
system and various cleanups.
* modules/kmem/_kslab_cache_free.c: Migration to the new PMM
system, and various cleanups.
* modules/kitc/_kmutex.c: DEBUG_PRINT3 calls to show mutex
lock/unlock/trylock.
* modules/init/_init_modules.c (init_modules): A message is
displayed when initializating modules.
* modules/ide/_ide.c: Various cleanups.
* modules/fs/fat/_fat.c: Various cleanups.
* modules/fs/devfs/devfs.c: Various cleanups, including whitespace
cleanification.
* modules/debug/debug.h: Add the DEBUG_PRINT1, DEBUG_PRINT2,
DEBUG_PRINT3 macros. Maybe there's a cleaner way to do it. David ?
* modules/debug/debug.c (init_module_level0): Init the
backtracking stuff a little later so that we have debugging
messages during this initialization.
* modules/debug/bt.c (_init_backtracing_stuff): bt_next is not
anymore a valid candidate to determine if fomit-frame-pointer was
selected or not, because of gcc optimizations. We use bt_init
instead.
* modules/Makefile (doc): Add a target that generates the doxygen
documentation.
* loader/mod.h (EXPORT_FUNCTION_RESTRICTED): Change the symbol
names generated by the macros, so that they include the name of
the target module (the one allowed to import the exported
symbol). This is needed in order to export the same symbol to
multiple modules. Previously, the RESTRICTED system generated
symbols that were identical for a given symbol exported to
multiple modules.
* doc/testingfr.tex: A big update to this documentation. Not
finished. The english version should also be updated.
* TODO: Some new things to do.
* MkVars (CFLAGS): Pass the DEBUG_LEVEL Makefile variable to the C
files. In each modules/.../Makefile, we can set a
DEBUG_LEVEL=value that will set the level of verbosity of the
module. Macros named DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3 have
been added.
(MODULES): Change all '-' to '_', because of the new
EXPORT_FUNCTION_RESTRICTED system. This system creates symbol that
contains the name of a module (the one allowed to import the
exported symbol). But the '-' character is not allowed inside C
identifiers. So, we use '_' instead.
* CREDITS: Add Fabrice Bellard to the CREDITS, for his Qemu
emulator.
Index: spinlock.h
===================================================================
RCS file: /var/cvs/kos/kos/modules/kos/spinlock.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- spinlock.h 9 Jun 2003 15:29:16 -0000 1.18
+++ spinlock.h 28 Dec 2004 18:44:41 -0000 1.19
@@ -8,11 +8,11 @@
/*
* Read/write spinlocks implementation.
- * 2 equivalent terminologies :
+ * 2 equivalent terminologies :
* - read spinlock == shared spinlock
* - write spinlock == exclusive spinlock
*
- * Normal spinlock operation :
+ * Normal spinlock operation :
* - disable local interrupts
* - loop on the lock
*
@@ -25,11 +25,12 @@
* interrupts after releasing the lock)
*/
+typedef k_ui32_t spinlock_flags_t;
#define save_flags(x) asm volatile("pushfl ; popl %0":"=g"(x)::"memory")
#define restore_flags(x) asm volatile("push %0; popfl"::"g"(x):"memory")
#define test_interrupt_enabled() ({ \
- k_ui32_t __test_interrupt__enabled_flags__; \
+ spinlock_flags_t __test_interrupt__enabled_flags__; \
save_flags(__test_interrupt__enabled_flags__); \
(__test_interrupt__enabled_flags__ & (1 << 9)); \
})
Index: system.h
===================================================================
RCS file: /var/cvs/kos/kos/modules/kos/system.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- system.h 20 Dec 2003 20:03:56 -0000 1.16
+++ system.h 28 Dec 2004 18:44:41 -0000 1.17
@@ -1,7 +1,7 @@
/* /include/kos/system.h
* @(#) $Id$
* Description : memory mapping
- * Auteurs : David Decotigny, Julien Munier, Thomas Petazzoni
+ * Auteurs : David Decotigny, Julien Munier, Thomas Petazzoni
* Bugs connus : Aucun
*/
#ifndef __SYSTEM_H__
Index: wolfgang.c
===================================================================
RCS file: /var/cvs/kos/kos/modules/kos/wolfgang.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- wolfgang.c 27 Dec 2004 22:01:04 -0000 1.72
+++ wolfgang.c 28 Dec 2004 18:44:41 -0000 1.73
@@ -44,6 +44,7 @@
NULL
};
+
/* This is just an example of how to call a function with a variable
number of arguments. */
#if 0
@@ -115,7 +116,7 @@
__dbg_printk("Open %s...\n", pathname);
result = open(pathname, INTERFACE_FILE_ID, & file);
- if(result < 0)
+ if(result < 0)
{
__dbg_printk("Open failed with %d\n", result);
kfree(buffer);
@@ -142,7 +143,7 @@
__dbg_printk("Read Succeeded with size=%d. Dump:\n", len);
__dbg_dumpmem(buffer, orig_len+8);
-
+
pos = -(pos + len + 0);
__dbg_printk("Seek Cur to beginning of file pos=%lld...\n", pos);
result = FILE_OPS(file->view->ops)->seek(file, SEEK_CUR,
@@ -865,7 +866,7 @@
result = binfmt_prepare(&futbin);
ASSERT_FATAL(result == ESUCCESS);
-
+
result = binfmt_lookup_handler_and_load(&futbin);
ASSERT_FATAL(result == ESUCCESS);
@@ -899,13 +900,13 @@
if(result < 0)
{
FAILED_VERBOSE("Could not insert the process ures : %d\n", result);
- }
+ }
ASSERT_FATAL(fd == 3);
as_update_heap_start(& get_current_team()->address_space, heap_addr);
- create_user_thread(get_current_team(),
+ create_user_thread(get_current_team(),
USER_STACK_GRANULARITY,
(user_thread_fct_t *) code_addr);
@@ -917,14 +918,14 @@
struct team *team;
__dbg_printk("Creating new team from team 0x%x\n", get_current_team());
-
+
team = create_team(get_current_team());
if(team == NULL)
{
FAILED_VERBOSE("Could not create the first team\n");
}
- create_kernel_thread(team, init_first_user_process_aux,
+ create_kernel_thread(team, init_first_user_process_aux,
(void *) "/file/test");
}
@@ -935,16 +936,17 @@
UNUSED(kp);
- init = cmdline_get_module_parameters(kp,"wolfgang","init");
+ init = cmdline_get_module_parameters(kp,"wolfgang","init");
if (!init)
FAILED_VERBOSE("Error no init given as parameter, can't load the system.\n");
ASSERT_FATAL(mount_root("/dev/part/ide0hd0part0") == ESUCCESS);
init_first_user_process();
- for (i = 0; i < 8; i++) {
- create_kernel_thread(NULL, shell, (void *) i);
- }
+ for (i = 0; i < 8; i++)
+ {
+ create_kernel_thread(NULL, shell, (void *) i);
+ }
}
static void primary_thread (kernel_parameter_t *kp)
@@ -954,8 +956,10 @@
create_kernel_thread(NULL, thread_twiddle, (void *)12);
create_kernel_thread(NULL, thread_which_ends, NULL);
+//#define TEST_ARE_DISABLED_BECAUSE_VMM_TEST_FAILS_BECAUSE_LACK_OF_SYNCHRO
#ifdef TEST_ARE_DISABLED_BECAUSE_VMM_TEST_FAILS_BECAUSE_LACK_OF_SYNCHRO
- // test_run_all_tests();
+ test_run_all_tests();
+ for(;;);
#endif
// TBI :
@@ -1010,7 +1014,7 @@
screen = (unsigned char *) kp->video_memory;
- primary_thread_id = _create_kernel_thread(get_kernel_team(),
+ primary_thread_id = _create_kernel_thread(get_kernel_team(),
(kernel_thread_fct_t*)primary_thread,
"Primary",
(void*)kp,
@@ -1019,7 +1023,7 @@
NULL, NULL);
FAILED_VERBOSE("NEVER REACHED !\n");
-
+
return 123;
}
- Previous message: [Kos-cvs] kos/modules/kmem _kslab_cache_alloc.c, 1.14,
1.15 _kslab_cache_create.c, 1.12, 1.13 _kslab_cache_free.c,
1.16, 1.17 _kslab_cache_grow.c, 1.13, 1.14 _kslab_init.c, 1.11,
1.12 _kvmem_alloc.c, 1.12, 1.13 _kvmem_init.c, 1.18,
1.19 _kvmem_utils.c, 1.18, 1.19 kmem.c, 1.16, 1.17 kmem.h,
1.14, 1.15
- Next message: [Kos-cvs] kos/modules/lib/std Makefile, 1.3, 1.4 libcmdline.c, 1.1,
1.2 stdlib.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Kos-cvs
mailing list