unified: do not compile out _k_neg_eagain when !CONFIG_ERRNO

It is always needed by the kernel, since the return codes are now
errnos. CONFIG_ERRNO is the mechanism for having a per-thread errno, not
using errno values.

Change-Id: I4ed14896a342f4122793d91b13c41b4a6a74716d
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2016-10-06 16:24:09 -04:00
commit 48efb384f8
2 changed files with 3 additions and 6 deletions

View file

@ -16,13 +16,8 @@ lib-y += $(strip \
device.o \
thread_abort.o \
idle.o \
)
lib-y += $(strip \
sched.o \
mutex.o \
)
lib-y += $(strip \
lifo.o \
fifo.o \
stack.o \
@ -34,6 +29,7 @@ lib-y += $(strip \
event.o \
pipes.o \
offload.o \
errno.o \
)
lib-$(CONFIG_INT_LATENCY_BENCHMARK) += int_latency_bench.o
@ -43,7 +39,6 @@ lib-$(CONFIG_KERNEL_EVENT_LOGGER) += event_logger.o
lib-$(CONFIG_KERNEL_EVENT_LOGGER) += kernel_event_logger.o
lib-$(CONFIG_RING_BUFFER) += ring_buffer.o
lib-$(CONFIG_ATOMIC_OPERATIONS_C) += atomic_c.o
lib-$(CONFIG_ERRNO) += errno.o
lib-$(CONFIG_NANO_WORKQUEUE) += work_q.o
obj-y += legacy/

View file

@ -32,7 +32,9 @@
const int _k_neg_eagain = -EAGAIN;
#endif
#ifdef CONFIG_ERRNO
int *_get_errno(void)
{
return &_nanokernel.current->errno_var;
}
#endif