Skip to content
Browse files

arch: x86: make z_arch_float_disable return -ENOSYS if not supported

For the x86 architecture the z_arch_float_disable() is only
implemented when building with CONFIG_LAZY_FP_SHARING, so we
make z_arch_float_disable() return -ENOSYS when we build with
FLOAT and FP_SHARING but on an x86 platform where
LAZY_FP_SHARING is not supported.

Signed-off-by: Ioannis Glaropoulos <>
  • Loading branch information...
ioannisg authored and andrewboie committed Jul 9, 2019
1 parent 0e67759 commit 85f7aeeced000842fdcaf60b66c5156c1117057c
Showing with 15 additions and 1 deletion.
  1. +1 −1 arch/x86/core/ia32/float.c
  2. +14 −0 arch/x86/core/ia32/thread.c
@@ -278,7 +278,7 @@ void k_float_enable(struct k_thread *thread, unsigned int options)
* 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.
int z_arch_float_disable(struct k_thread *thread)
int z_float_disable(struct k_thread *thread)
unsigned int imask;

@@ -204,3 +204,17 @@ extern void z_x86_syscall_entry_stub(void);
NANO_CPU_INT_REGISTER(z_x86_syscall_entry_stub, -1, -1, 0x80, 3);

#endif /* CONFIG_X86_USERSPACE */

#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)

extern int z_float_disable(struct k_thread *thread);

int z_arch_float_disable(struct k_thread *thread)
return z_float_disable(thread);
return -ENOSYS;

0 comments on commit 85f7aee

Please sign in to comment.
You can’t perform that action at this time.