Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/compat.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
static inline int | static inline int | ||||
linux_set_current_flags(struct thread *td, int flags) | linux_set_current_flags(struct thread *td, int flags) | ||||
{ | { | ||||
if (__predict_false(td->td_lkpi_task == NULL)) | if (__predict_false(td->td_lkpi_task == NULL)) | ||||
return (lkpi_alloc_current(td, flags)); | return (lkpi_alloc_current(td, flags)); | ||||
return (0); | return (0); | ||||
} | } | ||||
#define compat_ptr(x) ((void *)(uintptr_t)x) | |||||
#define ptr_to_compat(x) ((uintptr_t)x) | |||||
bz: Not sure about i386. long for pointers is a Linuxism which is often wrong. Can we live with… | |||||
Not Done Inline ActionsYes, you can use uintptr_t here. long is good for i386 too. Only not for cheri. hselasky: Yes, you can use uintptr_t here. long is good for i386 too. Only not for cheri. | |||||
#endif /* _LINUXKPI_LINUX_COMPAT_H_ */ | #endif /* _LINUXKPI_LINUX_COMPAT_H_ */ |
Not sure about i386. long for pointers is a Linuxism which is often wrong. Can we live with uintptr_t here instead or is Linux always expecting a long?