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
2 changed files with 8 additions and 0 deletions
|
@ -20,6 +20,8 @@
|
||||||
#include <sys/__assert.h>
|
#include <sys/__assert.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
|
|
||||||
|
#include <net/net_timeout.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -28,6 +28,12 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#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
|
/** Let the max timeout be 100 ms lower because of
|
||||||
* possible rounding in delayed work implementation.
|
* possible rounding in delayed work implementation.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue