OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb6fdcf
)
(__malloc_likely, __malloc_unlikely): New macros.
author
Miles Bader
<miles@lsi.nec.co.jp>
Wed, 14 Aug 2002 09:13:10 +0000
(09:13 -0000)
committer
Miles Bader
<miles@lsi.nec.co.jp>
Wed, 14 Aug 2002 09:13:10 +0000
(09:13 -0000)
libc/stdlib/malloc/malloc.h
patch
|
blob
|
history
diff --git
a/libc/stdlib/malloc/malloc.h
b/libc/stdlib/malloc/malloc.h
index
cc2bf35
..
6c45908
100644
(file)
--- a/
libc/stdlib/malloc/malloc.h
+++ b/
libc/stdlib/malloc/malloc.h
@@
-109,6
+109,16
@@
extern malloc_mutex_t __malloc_sbrk_lock;
#endif /* __UCLIBC_HAS_THREADS__ */
+/* Use branch-prediction macros from libc if defined. */
+#ifdef likely
+#define __malloc_likely(c) likely(c)
+#define __malloc_unlikely(c) unlikely(c)
+#else
+#define __malloc_likely(c) (c)
+#define __malloc_unlikely(c) (c)
+#endif
+
+
/* Define MALLOC_DEBUGGING to cause malloc to emit debugging info to stderr. */
#ifdef MALLOC_DEBUGGING
#include <stdio.h>