2011-03-24 11:01:59 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2011 Stefan Lankes, Chair for Operating Systems,
|
|
|
|
* RWTH Aachen University
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*
|
|
|
|
* This file is part of MetalSVM.
|
|
|
|
*/
|
|
|
|
|
2011-04-04 11:27:49 +02:00
|
|
|
/**
|
|
|
|
* author Stefan Lankes
|
|
|
|
* @file arch/x86/include/asm/limits.h
|
|
|
|
* @brief Define constants related to numerical value-ranges of variable types
|
|
|
|
*
|
|
|
|
* This file contains define constants for the numerical
|
|
|
|
* ranges of the most typical variable types.
|
|
|
|
*/
|
|
|
|
|
2011-03-24 11:01:59 +01:00
|
|
|
#ifndef __ARCH_LIMITS_H__
|
|
|
|
#define __ARCH_LIMITS_H__
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-04-04 11:27:49 +02:00
|
|
|
/** Number of bits in a char */
|
|
|
|
#define CHAR_BIT 8
|
2011-03-24 11:01:59 +01:00
|
|
|
|
2011-04-04 11:27:49 +02:00
|
|
|
/** Maximum value for a signed char */
|
|
|
|
#define SCHAR_MAX 0x7f
|
|
|
|
/** Minimum value for a signed char */
|
|
|
|
#define SCHAR_MIN (-0x7f - 1)
|
2011-03-24 11:01:59 +01:00
|
|
|
|
2011-04-04 11:27:49 +02:00
|
|
|
/** Maximum value for an unsigned char */
|
|
|
|
#define UCHAR_MAX 0xff
|
2011-03-24 11:01:59 +01:00
|
|
|
|
2011-04-04 11:27:49 +02:00
|
|
|
/** Maximum value for an unsigned short */
|
|
|
|
#define USHRT_MAX 0xffff
|
|
|
|
/** Maximum value for a short */
|
|
|
|
#define SHRT_MAX 0x7fff
|
|
|
|
/** Minimum value for a short */
|
|
|
|
#define SHRT_MIN (-0x7fff - 1)
|
2011-03-24 11:01:59 +01:00
|
|
|
|
2011-04-04 11:27:49 +02:00
|
|
|
/** Maximum value for an unsigned int */
|
|
|
|
#define UINT_MAX 0xffffffffU
|
|
|
|
/** Maximum value for an int */
|
|
|
|
#define INT_MAX 0x7fffffff
|
|
|
|
/** Minimum value for an int */
|
|
|
|
#define INT_MIN (-0x7fffffff - 1)
|
2011-03-24 11:01:59 +01:00
|
|
|
|
2011-04-04 11:27:49 +02:00
|
|
|
/** Maximum value for an unsigned long */
|
|
|
|
#define ULONG_MAX 0xffffffffUL
|
|
|
|
/** Maximum value for a long */
|
|
|
|
#define LONG_MAX 0x7fffffffL
|
|
|
|
/** Minimum value for a long */
|
|
|
|
#define LONG_MIN (-0x7fffffffL - 1)
|
2011-03-24 11:01:59 +01:00
|
|
|
|
2011-04-04 11:27:49 +02:00
|
|
|
/** Maximum value for an unsigned long long */
|
2011-03-24 11:01:59 +01:00
|
|
|
#define ULLONG_MAX 0xffffffffffffffffULL
|
2011-04-04 11:27:49 +02:00
|
|
|
/** Maximum value for a long long */
|
|
|
|
#define LLONG_MAX 0x7fffffffffffffffLL
|
|
|
|
/** Minimum value for a long long */
|
|
|
|
#define LLONG_MIN (-0x7fffffffffffffffLL - 1)
|
2011-03-24 11:01:59 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|