Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

const.h File Reference

Global constants definition. More...

#include <kernel/config.h>
#include <types.h>

Go to the source code of this file.

Defines

#define TRUE   1
 Logical value of TRUE.

#define FALSE   0
 Logical value of FALSE.

#define NULL   0
 NULL constant.

#define __LITTLE_ENDIAN__   1234
 Little endian architecture.

#define __BIG_ENDIAN__   4321
 Big endian architecture.

#define __BYTE_ORDER__   __LITTLE_ENDIAN__
 The current architecture.

#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 This macro returns the minimum value between a and b.

#define MAX(a, b)   ((a) > (b) ? (a) : (b))
 This macro returns the maximum value between a and b.

#define ABS(a)   ((a) < 0 ? -(a) : (a))
 This macro returns the absolute value of a.

#define TRUNC(addr, align)   ((addr) & ~((align) - 1))
 This macro truncates addr to the align boundary.

#define ALIGN_DOWN(addr, align)   TRUNC(addr, align)
 This macro rounds down addr to the align boundary.

#define ALIGN_UP(addr, align)   ( ((addr) + (align) - 1) & (~((align) - 1)) )
 This macro rounds up addr to the align boundary.


Detailed Description

Global constants definition.

Author:
Andrea Righi <drizzt@inwind.it>
Date:
Last update:
2003-12-16 Andrea Righi: Added pid_t typedef.
2004-13-01 Andrea Righi: New kernel style.
Note:
Copyright (©) 2003 Andrea Righi

Definition in file const.h.


Define Documentation

#define __BIG_ENDIAN__   4321
 

Big endian architecture.

Definition at line 30 of file const.h.

#define __BYTE_ORDER__   __LITTLE_ENDIAN__
 

The current architecture.

Definition at line 32 of file const.h.

#define __LITTLE_ENDIAN__   1234
 

Little endian architecture.

Definition at line 28 of file const.h.

#define ABS      ((a) < 0 ? -(a) : (a))
 

This macro returns the absolute value of a.

Definition at line 41 of file const.h.

#define ALIGN_DOWN addr,
align       TRUNC(addr, align)
 

This macro rounds down addr to the align boundary.

Definition at line 45 of file const.h.

#define ALIGN_UP addr,
align       ( ((addr) + (align) - 1) & (~((align) - 1)) )
 

This macro rounds up addr to the align boundary.

Definition at line 47 of file const.h.

#define FALSE   0
 

Logical value of FALSE.

Definition at line 23 of file const.h.

#define MAX a,
     ((a) > (b) ? (a) : (b))
 

This macro returns the maximum value between a and b.

Definition at line 39 of file const.h.

#define MIN a,
     ((a) < (b) ? (a) : (b))
 

This macro returns the minimum value between a and b.

Definition at line 37 of file const.h.

#define NULL   0
 

NULL constant.

Definition at line 25 of file const.h.

#define TRUE   1
 

Logical value of TRUE.

Definition at line 21 of file const.h.

#define TRUNC addr,
align       ((addr) & ~((align) - 1))
 

This macro truncates addr to the align boundary.

Definition at line 43 of file const.h.


Generated on Fri Feb 20 15:32:17 2004 for Minirighi by doxygen1.2.18