Skip to content

Commit

Permalink
[RBTREE] Add explicit alignment to sizeof(long) for struct rb_node.
Browse files Browse the repository at this point in the history
Seems like a strange requirement, but allegedly it was necessary for
struct address_space on CRIS, because it otherwise ended up being only
byte-aligned. It's harmless enough, and easier to just do it than to
prove it isn't necessary... although I really ought to dig out my etrax
board and test it some time.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
David Woodhouse committed Apr 21, 2006
1 parent 55a9810 commit e977145
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/rbtree.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ struct rb_node
#define RB_BLACK 1
struct rb_node *rb_right;
struct rb_node *rb_left;
};
} __attribute__((aligned(sizeof(long))));
/* The alignment might seem pointless, but allegedly CRIS needs it */

struct rb_root
{
Expand Down

0 comments on commit e977145

Please sign in to comment.