Subversion Repositories Kolibri OS

Rev

Rev 3482 | Rev 4103 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3482 Rev 3747
Line 34... Line 34...
34
#define ALIGN(x,a)      __ALIGN_MASK(x,(typeof(x))(a)-1)
34
#define ALIGN(x,a)      __ALIGN_MASK(x,(typeof(x))(a)-1)
35
#define __ALIGN_MASK(x,mask)    (((x)+(mask))&~(mask))
35
#define __ALIGN_MASK(x,mask)    (((x)+(mask))&~(mask))
36
#define PTR_ALIGN(p, a)     ((typeof(p))ALIGN((unsigned long)(p), (a)))
36
#define PTR_ALIGN(p, a)     ((typeof(p))ALIGN((unsigned long)(p), (a)))
37
#define IS_ALIGNED(x, a)        (((x) & ((typeof(x))(a) - 1)) == 0)
37
#define IS_ALIGNED(x, a)        (((x) & ((typeof(x))(a) - 1)) == 0)
Line -... Line 38...
-
 
38
 
-
 
39
 
-
 
40
#define __round_mask(x, y) ((__typeof__(x))((y)-1))
-
 
41
#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
38
 
42
 
39
/* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */
43
/* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */
40
#define roundup(x, y) (                                 \
44
#define roundup(x, y) (                                 \
41
{                                                       \
45
{                                                       \
42
        const typeof(y) __y = y;                        \
46
        const typeof(y) __y = y;                        \
Line 416... Line 420...
416
 
420
 
Line 417... Line 421...
417
#define cpufreq_quick_get_max(x) GetCpuFreq()
421
#define cpufreq_quick_get_max(x) GetCpuFreq()
Line -... Line 422...
-
 
422
 
-
 
423
extern unsigned int tsc_khz;
-
 
424
 
-
 
425
#define on_each_cpu(func,info,wait)             \
-
 
426
        ({                                      \
-
 
427
                func(info);                     \
-
 
428
                0;                              \
418
 
429
        })