kernel: use uintptr_t for kobject data
This has to be wide enough to store a pointer. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
a824821b86
commit
e48ed6a980
3 changed files with 4 additions and 4 deletions
|
@ -172,7 +172,7 @@ struct _k_object {
|
||||||
u8_t perms[CONFIG_MAX_THREAD_BYTES];
|
u8_t perms[CONFIG_MAX_THREAD_BYTES];
|
||||||
u8_t type;
|
u8_t type;
|
||||||
u8_t flags;
|
u8_t flags;
|
||||||
u32_t data;
|
uintptr_t data;
|
||||||
} __packed __aligned(4);
|
} __packed __aligned(4);
|
||||||
|
|
||||||
struct _k_object_assignment {
|
struct _k_object_assignment {
|
||||||
|
|
|
@ -623,7 +623,7 @@ k_tid_t z_vrfy_k_thread_create(struct k_thread *new_thread,
|
||||||
* allocated for alignment constraints
|
* allocated for alignment constraints
|
||||||
*/
|
*/
|
||||||
Z_OOPS(Z_SYSCALL_VERIFY_MSG(total_size <= stack_object->data,
|
Z_OOPS(Z_SYSCALL_VERIFY_MSG(total_size <= stack_object->data,
|
||||||
"stack size %u is too big, max is %u",
|
"stack size %u is too big, max is %lu",
|
||||||
total_size, stack_object->data));
|
total_size, stack_object->data));
|
||||||
|
|
||||||
/* User threads may only create other user threads and they can't
|
/* User threads may only create other user threads and they can't
|
||||||
|
|
|
@ -71,10 +71,10 @@ class KobjectInstance:
|
||||||
self.data = thread_counter
|
self.data = thread_counter
|
||||||
thread_counter = thread_counter + 1
|
thread_counter = thread_counter + 1
|
||||||
elif self.type_obj.name == "sys_mutex":
|
elif self.type_obj.name == "sys_mutex":
|
||||||
self.data = "(u32_t)(&kernel_mutexes[%d])" % sys_mutex_counter
|
self.data = "(uintptr_t)(&kernel_mutexes[%d])" % sys_mutex_counter
|
||||||
sys_mutex_counter += 1
|
sys_mutex_counter += 1
|
||||||
elif self.type_obj.name == "k_futex":
|
elif self.type_obj.name == "k_futex":
|
||||||
self.data = "(u32_t)(&futex_data[%d])" % futex_counter
|
self.data = "(uintptr_t)(&futex_data[%d])" % futex_counter
|
||||||
futex_counter += 1
|
futex_counter += 1
|
||||||
else:
|
else:
|
||||||
self.data = 0
|
self.data = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue