kernel: arch: use ENOTSUP instead of ENOSYS in k_float_disable()
This patch replaces ENOSYS into ENOTSUP to keep consistency with the return value specification of k_float_enable(). Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
This commit is contained in:
parent
59903e2934
commit
19db485737
5 changed files with 8 additions and 8 deletions
|
@ -76,7 +76,7 @@ void *z_arch_get_next_switch_handle(struct k_thread **old_thread)
|
|||
#if defined(CONFIG_FPU_SHARING)
|
||||
int arch_float_disable(struct k_thread *thread)
|
||||
{
|
||||
return -ENOSYS;
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
int arch_float_enable(struct k_thread *thread, unsigned int options)
|
||||
|
|
|
@ -56,7 +56,7 @@ int arch_float_disable(struct k_thread *thread)
|
|||
#if defined(CONFIG_LAZY_FPU_SHARING)
|
||||
return z_float_disable(thread);
|
||||
#else
|
||||
return -ENOSYS;
|
||||
return -ENOTSUP;
|
||||
#endif /* CONFIG_LAZY_FPU_SHARING */
|
||||
}
|
||||
|
||||
|
|
|
@ -5538,9 +5538,9 @@ __syscall void k_str_out(char *c, size_t n);
|
|||
*
|
||||
* @param thread ID of thread.
|
||||
*
|
||||
* @retval 0 On success.
|
||||
* @retval -ENOSYS If the floating point disabling is not implemented.
|
||||
* -EINVAL If the floating point disabling could not be performed.
|
||||
* @retval 0 On success.
|
||||
* @retval -ENOTSUP If the floating point disabling is not implemented.
|
||||
* -EINVAL If the floating point disabling could not be performed.
|
||||
*/
|
||||
__syscall int k_float_disable(struct k_thread *thread);
|
||||
|
||||
|
|
|
@ -880,7 +880,7 @@ int z_impl_k_float_disable(struct k_thread *thread)
|
|||
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
|
||||
return arch_float_disable(thread);
|
||||
#else
|
||||
return -ENOSYS;
|
||||
return -ENOTSUP;
|
||||
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ static void usr_fp_thread_entry_1(void)
|
|||
(defined(CONFIG_X86) && defined(CONFIG_LAZY_FPU_SHARING))
|
||||
#define K_FLOAT_DISABLE_SYSCALL_RETVAL 0
|
||||
#else
|
||||
#define K_FLOAT_DISABLE_SYSCALL_RETVAL -ENOSYS
|
||||
#define K_FLOAT_DISABLE_SYSCALL_RETVAL -ENOTSUP
|
||||
#endif
|
||||
|
||||
static void usr_fp_thread_entry_2(void)
|
||||
|
@ -98,7 +98,7 @@ void test_k_float_disable_common(void)
|
|||
usr_fp_thread.base.user_options);
|
||||
#else
|
||||
/* Verify k_float_disable() is not supported */
|
||||
zassert_true((k_float_disable(&usr_fp_thread) == -ENOSYS),
|
||||
zassert_true((k_float_disable(&usr_fp_thread) == -ENOTSUP),
|
||||
"k_float_disable() successful when not supported");
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue