diff options
author | Richard Braun <rbraun@sceen.net> | 2017-01-13 00:16:09 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-01-13 00:16:09 +0100 |
commit | cf59c5fa63b4639777fbe28fba79cfbd63fa6d4e (patch) | |
tree | 6cd4b64fc94f7cc9c2c1f75ba298169a88248657 /kern/percpu.h | |
parent | 27e9a04a0a07707d7a85dc65198b4ab8f32888f6 (diff) |
Replace unsigned long with uintptr_t for integer/pointer conversions
This is mostly done for the machine-independent part.
Diffstat (limited to 'kern/percpu.h')
-rw-r--r-- | kern/percpu.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kern/percpu.h b/kern/percpu.h index 820fed63..a9d1eb3b 100644 --- a/kern/percpu.h +++ b/kern/percpu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Richard Braun. + * Copyright (c) 2014-2017 Richard Braun. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -55,6 +55,7 @@ #include <kern/assert.h> #include <kern/macros.h> +#include <kern/stdint.h> #define PERCPU_SECTION .percpu #define __percpu __section(QUOTE(PERCPU_SECTION)) @@ -72,7 +73,7 @@ extern char _epercpu; * Expands to the address of a percpu variable. */ #define percpu_ptr(var, cpu) \ - ((typeof(var) *)(percpu_area(cpu) + ((unsigned long)(&(var))))) + ((typeof(var) *)(percpu_area(cpu) + ((uintptr_t)(&(var))))) /* * Expands to the lvalue of a percpu variable. |