net: Add NET_WAIT_FOREVER symbol to be used as timeout in network APIs
If a network API expects a millisecond timeout, then NET_WAIT_FOREVER symbol can be used to indicate that the timeout should last forever. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
aafd563195
commit
e4224651bf
|
@ -20,6 +20,8 @@
|
|||
#include <sys/__assert.h>
|
||||
#include <kernel.h>
|
||||
|
||||
#include <net/net_timeout.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -28,6 +28,12 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Symbol to indicate that the caller wants the timeout to be waited forever.
|
||||
* This can be used when a network API expects a millisecond timeout.
|
||||
*/
|
||||
#define NET_WAIT_FOREVER (-1)
|
||||
|
||||
/** Let the max timeout be 100 ms lower because of
|
||||
* possible rounding in delayed work implementation.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue