diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-26 13:56:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-26 13:56:01 -0700 |
commit | 26adc0d5859788b74f86677538236f807e6d9021 (patch) | |
tree | 78b3c4018161d72b6d8d1f2485c52fc552caa61a /arch/x86/boot/boot.h | |
parent | 0e4bd10c9b7e9ed65132f5935328275deb760384 (diff) | |
parent | e6e1ace9904b72478f0c5a5aa7bd174cb6f62561 (diff) | |
download | op-kernel-dev-26adc0d5859788b74f86677538236f807e6d9021.zip op-kernel-dev-26adc0d5859788b74f86677538236f807e6d9021.tar.gz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
x86 setup: sizeof() is unsigned, unbreak comparisons
x86 setup: handle boot loaders which set up the stack incorrectly
Diffstat (limited to 'arch/x86/boot/boot.h')
-rw-r--r-- | arch/x86/boot/boot.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index 5f9a2e7..d2b5adf 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -17,6 +17,8 @@ #ifndef BOOT_BOOT_H #define BOOT_BOOT_H +#define STACK_SIZE 512 /* Minimum number of bytes for stack */ + #ifndef __ASSEMBLY__ #include <stdarg.h> @@ -198,8 +200,6 @@ static inline int isdigit(int ch) } /* Heap -- available for dynamic lists. */ -#define STACK_SIZE 512 /* Minimum number of bytes for stack */ - extern char _end[]; extern char *HEAP; extern char *heap_end; @@ -216,9 +216,9 @@ static inline char *__get_heap(size_t s, size_t a, size_t n) #define GET_HEAP(type, n) \ ((type *)__get_heap(sizeof(type),__alignof__(type),(n))) -static inline int heap_free(void) +static inline bool heap_free(size_t n) { - return heap_end-HEAP; + return (int)(heap_end-HEAP) >= (int)n; } /* copy.S */ |