Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1811 → Rev 1812

/trunk/kernel/generic/include/debug.h
26,7 → 26,7
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup genericdebug
/** @addtogroup genericdebug
* @{
*/
/** @file
60,11 → 60,7
# define ASSERT(expr)
#endif
 
#define STRING(arg) STRING_ARG(arg)
#define STRING_ARG(arg) #arg
 
#endif
 
/** @}
/** @}
*/
 
/trunk/kernel/generic/include/macros.h
26,7 → 26,7
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup generic
/** @addtogroup generic
* @{
*/
/** @file
35,29 → 35,34
#ifndef __MACROS_H__
#define __MACROS_H__
 
#define is_digit(d) (((d) >= '0') && ((d)<='9'))
#define is_lower(c) (((c) >= 'a') && ((c) <= 'z'))
#define is_upper(c) (((c) >= 'A') && ((c) <= 'Z'))
#define is_alpha(c) (is_lower(c) || is_upper(c))
#include <arch/types.h>
#include <typedefs.h>
 
#define is_digit(d) (((d) >= '0') && ((d) <= '9'))
#define is_lower(c) (((c) >= 'a') && ((c) <= 'z'))
#define is_upper(c) (((c) >= 'A') && ((c) <= 'Z'))
#define is_alpha(c) (is_lower(c) || is_upper(c))
#define is_alphanum(c) (is_alpha(c) || is_digit(c))
#define is_white(c) (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r'))
#define is_white(c) (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r'))
 
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a) < (b) ? (a) : (b))
#define max(a,b) ((a) > (b) ? (a) : (b))
 
/** Return true if the interlvals overlap. */
static inline int overlaps(uintptr_t s1, size_t sz1, uintptr_t s2, size_t sz2)
{
uintptr_t e1 = s1+sz1;
uintptr_t e2 = s2+sz2;
uintptr_t e1 = s1 + sz1;
uintptr_t e2 = s2 + sz2;
 
return s1 < e2 && s2 < e1;
return (s1 < e2) && (s2 < e1);
}
/* Compute overlapping of physical addresses */
#define PA_overlaps(x,szx,y,szy) overlaps(KA2PA(x),szx,KA2PA(y), szy)
#define PA_overlaps(x, szx, y, szy) overlaps(KA2PA(x), szx, KA2PA(y), szy)
 
#define STRING(arg) STRING_ARG(arg)
#define STRING_ARG(arg) #arg
 
#endif
 
/** @}
/** @}
*/
 
/trunk/kernel/arch/mips32/src/mips32.c
26,7 → 26,7
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup mips32
/** @addtogroup mips32
* @{
*/
/** @file
54,7 → 54,7
#include <console/chardev.h>
#include <arch/debugger.h>
#include <genarch/fb/fb.h>
#include <debug.h>
#include <macros.h>
 
#include <arch/asm/regname.h>
 
180,6 → 180,5
}
 
 
/** @}
/** @}
*/