-
Notifications
You must be signed in to change notification settings - Fork 8.2k
kernel: arch: introduce k_float_enable() #31816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -179,7 +179,7 @@ static inline void FpCtxInit(struct k_thread *thread) | |
| * The locking isn't really needed when the routine is called by a cooperative | ||
| * thread (since context switching can't occur), but it is harmless. | ||
| */ | ||
| void k_float_enable(struct k_thread *thread, unsigned int options) | ||
| void z_float_enable(struct k_thread *thread, unsigned int options) | ||
|
||
| { | ||
| unsigned int imask; | ||
| struct k_thread *fp_owner; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,6 +185,25 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr, | |
| * @retval -EINVAL If the floating point disabling could not be performed. | ||
| */ | ||
| int arch_float_disable(struct k_thread *thread); | ||
|
|
||
| /** | ||
| * @brief Enable floating point context preservation | ||
| * | ||
| * The function is used to enable the preservation of floating | ||
| * point context information for a particular thread. | ||
| * This API depends on each architecture implimentation. If the architecture | ||
| * does not support enableing, this API will always be failed. | ||
| * | ||
|
||
| * The @a options parameter indicates which floating point register sets will | ||
| * be used by the specified thread. Currently it is used by x86 only. | ||
| * | ||
| * @param thread ID of thread. | ||
| * @param options architecture dependent options | ||
| * | ||
| * @retval 0 On success. | ||
| * @retval -EINVAL If the floating point enabling could not be performed. | ||
| */ | ||
| int arch_float_enable(struct k_thread *thread, unsigned int options); | ||
| #endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ | ||
|
|
||
| /** @} */ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.