Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154757
b: refs/heads/master
c: 4364467
h: refs/heads/master
i:
  154755: 4ef0a6e
v: v3
  • Loading branch information
Linus Torvalds committed Jul 2, 2009
1 parent 21108e3 commit 090f8af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42ca4fb69126dd9d0e25112edca1cacf846aa5c3
refs/heads/master: 43644679a1e80f53e6e0155ab75b1093ba3c0365
11 changes: 9 additions & 2 deletions trunk/arch/x86/include/asm/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ extern int reboot_force;

long do_arch_prctl(struct task_struct *task, int code, unsigned long addr);

#define round_up(x, y) (((x) + (y) - 1) & ~((y) - 1))
#define round_down(x, y) ((x) & ~((y) - 1))
/*
* This looks more complex than it should be. But we need to
* get the type for the ~ right in round_down (it needs to be
* as wide as the result!), and we want to evaluate the macro
* arguments just once each.
*/
#define __round_mask(x,y) ((__typeof__(x))((y)-1))
#define round_up(x,y) ((((x)-1) | __round_mask(x,y))+1)
#define round_down(x,y) ((x) & ~__round_mask(x,y))

#endif /* _ASM_X86_PROTO_H */

0 comments on commit 090f8af

Please sign in to comment.