~ubuntu-branches/ubuntu/utopic/haproxy/utopic-proposed

« back to all changes in this revision

Viewing changes to include/common/ebtree.h

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2009-02-17 08:55:12 UTC
  • mfrom: (1.1.5 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090217085512-qmij51nun3rbxorz
Fix build without debian/patches directory (Closes: #515682) using
/usr/share/quilt/quilt.make.

Show diffs side-by-side

added added

removed removed

Lines of Context:
322
322
 * only work with ints and booleans though.
323
323
 */
324
324
#define likely(x) (x)
325
 
#define unlikely(x) (__builtin_expect((x), 0))
 
325
#define unlikely(x) (__builtin_expect((unsigned long)(x), 0))
 
326
#endif
 
327
#endif
 
328
 
 
329
/* By default, gcc does not inline large chunks of code, but we want it to
 
330
 * respect our choices.
 
331
 */
 
332
#if !defined(forceinline)
 
333
#if __GNUC__ < 3
 
334
#define forceinline inline
 
335
#else
 
336
#define forceinline inline __attribute__((always_inline))
326
337
#endif
327
338
#endif
328
339
 
473
484
 * a subtree of at least 2 entries. It will probably never be needed inlined,
474
485
 * and it is not for end-user.
475
486
 */
476
 
static inline struct eb_node *
 
487
static forceinline struct eb_node *
477
488
__eb_insert_dup(struct eb_node *sub, struct eb_node *new)
478
489
{
479
490
        struct eb_node *head = sub;
635
646
/* Removes a leaf node from the tree if it was still in it. Marks the node
636
647
 * as unlinked.
637
648
 */
638
 
static inline void __eb_delete(struct eb_node *node)
 
649
static forceinline void __eb_delete(struct eb_node *node)
639
650
{
640
651
        __label__ delete_unlink;
641
652
        unsigned int pside, gpside, sibtype;