mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
mm/iob: add support of alloc with timeout iob_timedalloc()
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
4824ea68a9
commit
0b18cfbd9a
@@ -233,6 +233,23 @@ struct iob_userstats_s
|
||||
|
||||
void iob_initialize(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: iob_timedalloc
|
||||
*
|
||||
* Description:
|
||||
* Allocate an I/O buffer by taking the buffer at the head of the free list.
|
||||
* This wait will be terminated when the specified timeout expires.
|
||||
*
|
||||
* Input Parameters:
|
||||
* throttled - An indication of the IOB allocation is "throttled"
|
||||
* timeout - Timeout value in milliseconds.
|
||||
* consumerid - id representing who is consuming the IOB
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct iob_s *iob_timedalloc(bool throttled, unsigned int timeout,
|
||||
enum iob_user_e consumerid);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: iob_alloc
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user