[Kos-cvs] kos/modules/kitc _kmutex.c,1.6,1.7
thomas at kos.enix.org
thomas at kos.enix.org
Sun Jan 30 17:11:22 CET 2005
Update of /home/kos/cvs/kos/modules/kitc
In directory the-doors:/tmp/cvs-serv3480/modules/kitc
Modified Files:
_kmutex.c
Log Message:
2005-01-30 Thomas Petazzoni <thomas at crazy.kos.nx>
* modules/x86/mm/Makefile (DEBUG_LEVEL): 1 -> 0
* modules/vmm/_vmm_as.c: Moved as_dump and vr_dump, create
as_dump_unsafe.
* modules/vmm/Makefile (DEBUG_LEVEL): 3 -> 0
* modules/tty/_tty.c, modules/tty/_tty_kres.c: DEBUG_PRINTx
conformance + memset().
* modules/lib/blockfile/libblockfile.c,
modules/lib/charfile/libcharfile.c,
modules/lib/filemap/libfilemap.c: Added memset() needed when
allocated buffer is poisoned. Whitespaces.
* modules/kmem/_kvmem_free.c: DEBUG_PRINTx conformance +
whitespaces.
* modules/kmem/_kvmem_alloc.c (kvalloc): Poison the allocated
memory + DEBUG_PRINTx conformance.
* modules/kmem/_kslab_cache_free.c (__kslab_cache_free_by_slab):
Poison the freed buffer.
* modules/kmem/_kslab_cache_alloc.c (kslab_cache_alloc): Poison
the allocated buffer.
* modules/kmem/_kmem_free.c (kfree): DEBUG_PRINTx conformance.
* modules/kmem/_kmem_alloc.c (kmalloc): Whitespaces + DEBUG_PRINTx
conformance.
* modules/kitc/_kmutex.c: Remove [function] as they are generated
by DEBUG_PRINTx now.
* modules/karm/open.c: Whitespaces.
* modules/karm/mount.c (mount): Cleaned the way of calling
fs->attach().
* modules/ide/_ide_karm.c: More debugging messages.
* modules/ide/_ide.h (ide_device_info): Correct position of packed
attribute to make gcc happy.
* modules/part/Makefile (DEBUG_LEVEL), modules/karm/Makefile
(DEBUG_LEVEL), modules/ide/Makefile
(DEBUG_LEVEL), modules/fs/devfs/Makefile
(DEBUG_LEVEL), modules/fs/fat/Makefile
(DEBUG_LEVEL) : New variable.
* modules/fs/devfs/devfs.c, modules/fs/fat/_fat.c,
modules/fs/fat/_fat_karm.c: Added memset() found using the
poisoning stuff in kmem. More debugging messages using
DEBUG_PRINTx.
* modules/debug/debug.h: DEBUG_PRINTx macros now call
DEBUG_PRINT_VERBOSE instead of __dbg_printk, so that the line
number, function and file names are printed before the debug
message.
* TODO: More things to do.
Index: _kmutex.c
===================================================================
RCS file: /home/kos/cvs/kos/modules/kitc/_kmutex.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- _kmutex.c 4 Jan 2005 21:57:50 -0000 1.6
+++ _kmutex.c 30 Jan 2005 16:11:20 -0000 1.7
@@ -157,7 +157,7 @@
synchq_lock(& mutex->synchq, flags);
- DEBUG_PRINT3("[kmutex_lock] Mutex lock 0x%x, %d++ ... from thread 0x%x\n",
+ DEBUG_PRINT3("Mutex lock 0x%x, %d++ ... from thread 0x%x\n",
(unsigned) mutex, mutex->nested_level,
(unsigned) get_current_thread());
@@ -185,7 +185,7 @@
ASSERT_FATAL(mutex->nested_level > 0);
else
{
- DEBUG_PRINT3("[kmutex_lock] DEADLOCK Mutex already held by thread 0x%x:%s, and we are 0x%x:%s\n",
+ DEBUG_PRINT3("DEADLOCK Mutex already held by thread 0x%x:%s, and we are 0x%x:%s\n",
(unsigned) mutex->owner, mutex->owner->name,
(unsigned) get_current_thread(),
get_current_thread()->name);
@@ -243,7 +243,7 @@
synchq_lock(& mutex->synchq, flags);
- DEBUG_PRINT3("[kmutex_trylock] Mutex trylock 0x%x, %d++\n",
+ DEBUG_PRINT3("Mutex trylock 0x%x, %d++\n",
(unsigned) mutex, mutex->nested_level);
if(mutex->free)
@@ -301,7 +301,7 @@
synchq_lock(& mutex->synchq, flags);
- DEBUG_PRINT3("[kmutex_unlock] Mutex unlock 0x%x, %d-- from thread 0x%x\n",
+ DEBUG_PRINT3("Mutex unlock 0x%x, %d-- from thread 0x%x\n",
(unsigned) mutex, mutex->nested_level,
(unsigned) get_current_thread());
@@ -310,7 +310,7 @@
if (mutex->free)
{
synchq_unlock(& mutex->synchq, flags);
- DEBUG_PRINT3("[kmutex_unlock] -EINVAL\n");
+ DEBUG_PRINT3("-EINVAL\n");
return -EINVAL;
}
@@ -321,7 +321,7 @@
if (mutex->owner != get_current_thread())
{
synchq_unlock(& mutex->synchq, flags);
- DEBUG_PRINT3("[kmutex_unlock] -EPERM\n");
+ DEBUG_PRINT3("-EPERM\n");
return -EPERM;
}
More information about the Kos-cvs
mailing list