From: Ben Pfaff Date: Thu, 26 Aug 2004 19:01:18 +0000 (+0000) Subject: Add ROUND_DOWN macro. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f83e3e0f724ab507c88d70c5de011dff2df9a4d8;p=pintos-anon Add ROUND_DOWN macro. --- diff --git a/src/lib/lib.h b/src/lib/lib.h index 2f788be..668f904 100644 --- a/src/lib/lib.h +++ b/src/lib/lib.h @@ -6,6 +6,7 @@ #define ROUND_UP(X, STEP) (((X) + (STEP) - 1) / (STEP) * (STEP)) #define DIV_ROUND_UP(X, STEP) (((X) + (STEP) - 1) / (STEP)) +#define ROUND_DOWN(X, STEP) ((X) / (STEP) * (STEP)) void *memset (void *, int, size_t); void *memcpy (void *, const void *, size_t);