zephyr/kernel/microkernel
Allan Stephens 2275cae089 kernel: Remove unneeded ASSERT from memory pool subsystem
Eliminates assert check that complains about an attempt to allocate
a memory pool block larger than the largest possible block size.
In such cases the allocation code now just returns a NULL pointer
indicating that it was unable to allocate the requested block, just
as it does when a block smaller than the maximum size cannot be
allocated because none is currently available.

Note: One scenario in which it isn't unreasonable for an application
writer to request a block that is too big is the case where a receiving
task using a mailbox first receives an excessively large message without
its data and then tries to retrieve the data into a memory pool block
allocated by the mailbox. Rather than forcing the application writer
to check to see if the size of the received message is too big for the
memory pool, or adding code to the mailbox subsystem to do such a check,
it's easier to pass on the request to the memory pool and simply have it
return NULL, which causes the mailbox to report that data retrieval
failed. The application can then perform a single check that catches
both the case where the memory pool simply ran out of blocks and the case
where it didn't have any block big enough to handle the message.

Change-Id: Ifd2cdd8a5927b93d3e9c5df301544e522131d2c6
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-07-26 04:53:07 +00:00
..
include kernel: Cosmetic cleanups to memory pool code 2016-07-08 23:04:40 +00:00
Kconfig Cleanup whitespace in Kconfig files 2016-05-25 13:28:07 -05:00
Makefile microkernel: [un]block tasks on nanokernel objects infrastructure 2016-05-04 22:51:33 +00:00
k_command_packet.c kernel: catch overflowing kserver stack with asserts 2016-05-18 22:06:39 +00:00
k_event.c kernel: catch overflowing kserver stack with asserts 2016-05-18 22:06:39 +00:00
k_fifo.c fifo: Simplify task_fifo_get() API family 2016-02-05 20:25:06 -05:00
k_idle.c power_mgmt: Make names consistent with new RFC 2016-03-26 14:35:11 -04:00
k_init.c tracing: _k_command_stack is explicitly not tracked. 2016-06-16 16:30:46 +00:00
k_irq.c microkernel: remove task_irq_free() API 2016-02-05 20:25:21 -05:00
k_mailbox.c mem_pool: Simplify task_mem_pool_alloc() API family 2016-02-05 20:25:05 -05:00
k_memory_map.c mem_map: Simplify task_mem_map_alloc() API family 2016-02-05 20:25:05 -05:00
k_memory_pool.c kernel: Remove unneeded ASSERT from memory pool subsystem 2016-07-26 04:53:07 +00:00
k_move_data.c checkpatch: warning - block_comment_style 2016-02-05 20:24:33 -05:00
k_mutex.c mutex: Simplify task_mutex_lock() API family 2016-02-05 20:25:05 -05:00
k_nano.c microkernel: [un]block tasks on nanokernel objects infrastructure 2016-05-04 22:51:33 +00:00
k_nop.c microkernel: Fibers and ISRs may invoke microkernel no-op 2016-05-04 22:51:35 +00:00
k_offload.c Change BSD-3 licenses to Apache 2 2016-02-05 20:24:29 -05:00
k_pipe.c pipes: Simplify task_pipe_get() API family 2016-02-05 20:25:05 -05:00
k_pipe_buffer.c pipe, cosmetic: Put constant in comparisons on the right 2016-02-05 20:25:05 -05:00
k_pipe_get.c pipe, cosmetic: Put constant in comparisons on the right 2016-02-05 20:25:05 -05:00
k_pipe_put.c pipe, cosmetic: Put constant in comparisons on the right 2016-02-05 20:25:05 -05:00
k_pipe_util.c pipe, cosmetic: Put constant in comparisons on the right 2016-02-05 20:25:05 -05:00
k_pipe_xfer.c pipe, cosmetic: Put constant in comparisons on the right 2016-02-05 20:25:05 -05:00
k_semaphore.c kernel: catch overflowing kserver stack with asserts 2016-05-18 22:06:39 +00:00
k_server.c microkernel: use _thread_essential_set() 2016-05-03 17:42:54 +00:00
k_task.c microkernel: lock interrupts in _k_state_bit_[re]set() 2016-05-04 22:51:35 +00:00
k_task_monitor.c kernel event logger: add possibility to use custom timestamp 2016-05-23 21:27:49 +00:00
k_ticker.c microkernel: Add support for *_sleep() during initialization 2016-03-26 10:17:15 +00:00
k_timer.c kernel: add _IS_IDLE_TASK() 2016-05-11 20:22:24 +00:00