thread_cpu: make it 64-bit compatible
This stores a combination of a pointer and a CPU number in the low 2 bits. On 64-bit systems, the pointer part won't fit in an int. Let's use uintptr_t for this purpose. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
parent
a58a852e80
commit
0b5d9f71f2
2 changed files with 3 additions and 3 deletions
|
@ -59,7 +59,7 @@ struct k_spinlock {
|
|||
/* Stores the thread that holds the lock with the locking CPU
|
||||
* ID in the bottom two bits.
|
||||
*/
|
||||
size_t thread_cpu;
|
||||
uintptr_t thread_cpu;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue