k_poll() is similar to the POSIX poll() API in spirit in that it allows a single thread to monitor multiple events without actively polling them, but rather pending for one or more to become ready. Such events can be a direct event, or kernel objects (currently only semaphores and fifos). When a kernel object being polled on is ready, it is not "given" to the poller: the poller must then acquire it via the regular API for the object (e.g. k_sem_take()). Only one thread can poll on a particular object at one time. These restrictions mean that k_poll() is most effective when a single thread monitors multiple events that are not subject for contention. For example, being the sole reader on multiple fifos, or the only thread being signalled by multiple semaphores, or a combination of both. Change-Id: I7035a9baf4aa016fb87afc5f5c0f5f8cb216480f Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
43 lines
712 B
Makefile
43 lines
712 B
Makefile
ccflags-y += -I$(srctree)/kernel/include
|
|
|
|
asflags-y := ${ccflags-y}
|
|
|
|
obj-y =
|
|
obj-y += $(strip \
|
|
version.o \
|
|
)
|
|
|
|
lib-y =
|
|
lib-y += $(strip \
|
|
sys_clock.o \
|
|
thread.o \
|
|
init.o \
|
|
sem.o \
|
|
device.o \
|
|
thread_abort.o \
|
|
idle.o \
|
|
sched.o \
|
|
mutex.o \
|
|
lifo.o \
|
|
fifo.o \
|
|
stack.o \
|
|
mem_slab.o \
|
|
mem_pool.o \
|
|
msg_q.o \
|
|
mailbox.o \
|
|
mem_pool.o \
|
|
alert.o \
|
|
pipes.o \
|
|
legacy_offload.o \
|
|
errno.o \
|
|
work_q.o \
|
|
system_work_q.o \
|
|
)
|
|
|
|
lib-$(CONFIG_INT_LATENCY_BENCHMARK) += int_latency_bench.o
|
|
lib-$(CONFIG_STACK_CANARIES) += compiler_stack_protect.o
|
|
lib-$(CONFIG_SYS_CLOCK_EXISTS) += timer.o
|
|
lib-$(CONFIG_LEGACY_KERNEL) += legacy_timer.o
|
|
lib-$(CONFIG_ATOMIC_OPERATIONS_C) += atomic_c.o
|
|
lib-$(CONFIG_POLL) += poll.o
|