summaryrefslogtreecommitdiffstats
path: root/pintos-progos/lib/round.h
diff options
context:
space:
mode:
Diffstat (limited to 'pintos-progos/lib/round.h')
-rw-r--r--pintos-progos/lib/round.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/pintos-progos/lib/round.h b/pintos-progos/lib/round.h
deleted file mode 100644
index 3aa6642..0000000
--- a/pintos-progos/lib/round.h
+++ /dev/null
@@ -1,18 +0,0 @@
1#ifndef __LIB_ROUND_H
2#define __LIB_ROUND_H
3
4/* Yields X rounded up to the nearest multiple of STEP.
5 For X >= 0, STEP >= 1 only. */
6#define ROUND_UP(X, STEP) (((X) + (STEP) - 1) / (STEP) * (STEP))
7
8/* Yields X divided by STEP, rounded up.
9 For X >= 0, STEP >= 1 only. */
10#define DIV_ROUND_UP(X, STEP) (((X) + (STEP) - 1) / (STEP))
11
12/* Yields X rounded down to the nearest multiple of STEP.
13 For X >= 0, STEP >= 1 only. */
14#define ROUND_DOWN(X, STEP) ((X) / (STEP) * (STEP))
15
16/* There is no DIV_ROUND_DOWN. It would be simply X / STEP. */
17
18#endif /* lib/round.h */