From e891a05e6e1aa3962eb8474e7967f277a295827c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 22 Oct 2002 17:48:29 +0000 Subject: [PATCH] Add a new DEBUGGER() macro (doesn't do anything for the release build). Some style changes. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1601 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/Debug.h | 12 ++++++++++++ src/add-ons/kernel/file_systems/bfs/bfs.h | 5 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Debug.h b/src/add-ons/kernel/file_systems/bfs/Debug.h index dfde5cdc92..b04c497671 100644 --- a/src/add-ons/kernel/file_systems/bfs/Debug.h +++ b/src/add-ons/kernel/file_systems/bfs/Debug.h @@ -16,6 +16,18 @@ # define __out dprintf #endif +// Which debugger should be used when? +// The DEBUGGER() macro actually has no effect if DEBUG is not defined... +#ifdef DEBUG +# ifdef USER +# define DEBUGGER(x) debugger x +# else +# define DEBUGGER(x) kernel_debugger x +# endif +#else +# define DEBUGGER(x) ; +#endif + // Short overview over the debug output macros: // PRINT() // is for general messages that very unlikely should appear in a release build diff --git a/src/add-ons/kernel/file_systems/bfs/bfs.h b/src/add-ons/kernel/file_systems/bfs/bfs.h index 2c23df4345..00297169b4 100644 --- a/src/add-ons/kernel/file_systems/bfs/bfs.h +++ b/src/add-ons/kernel/file_systems/bfs/bfs.h @@ -26,9 +26,10 @@ struct block_run inline bool operator==(const block_run &run) const; inline bool operator!=(const block_run &run) const; inline bool IsZero(); - inline void SetTo(int32 group,uint16 start,uint16 length = 1); + inline void SetTo(int32 group, uint16 start, uint16 length = 1); - inline static block_run Run(int32 group,uint16 start,uint16 length = 1); + inline static block_run Run(int32 group, uint16 start, uint16 length = 1); + // can't have a constructor because it's used in a union }; typedef block_run inode_addr;