kernel: add -ENOTSUP doc to arch_float_en-/dis-able()

Some architectures already returns -ENOTSUP when these functions
are called. So add this return value to the API doc.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-08-31 10:42:32 -07:00 committed by Christopher Friedt
commit 049e3bac73

View file

@ -183,6 +183,7 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
* *
* @retval 0 On success. * @retval 0 On success.
* @retval -EINVAL If the floating point disabling could not be performed. * @retval -EINVAL If the floating point disabling could not be performed.
* @retval -ENOTSUP If the operation is not supported
*/ */
int arch_float_disable(struct k_thread *thread); int arch_float_disable(struct k_thread *thread);
@ -192,7 +193,7 @@ int arch_float_disable(struct k_thread *thread);
* The function is used to enable the preservation of floating * The function is used to enable the preservation of floating
* point context information for a particular thread. * point context information for a particular thread.
* This API depends on each architecture implimentation. If the architecture * This API depends on each architecture implimentation. If the architecture
* does not support enableing, this API will always be failed. * does not support enabling, this API will always be failed.
* *
* The @a options parameter indicates which floating point register sets will * The @a options parameter indicates which floating point register sets will
* be used by the specified thread. Currently it is used by x86 only. * be used by the specified thread. Currently it is used by x86 only.
@ -202,6 +203,7 @@ int arch_float_disable(struct k_thread *thread);
* *
* @retval 0 On success. * @retval 0 On success.
* @retval -EINVAL If the floating point enabling could not be performed. * @retval -EINVAL If the floating point enabling could not be performed.
* @retval -ENOTSUP If the operation is not supported
*/ */
int arch_float_enable(struct k_thread *thread, unsigned int options); int arch_float_enable(struct k_thread *thread, unsigned int options);
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */ #endif /* CONFIG_FPU && CONFIG_FPU_SHARING */