net: buf: Use new API for checking if executing from ISR
CC net/buf.o zephyr/net/buf.c: In function 'net_buf_get': zephyr/net/buf.c:103:2: warning: 'sys_execution_context_type_get' is deprecated [-Wdeprecated-declarations] if (buf || sys_execution_context_type_get() == NANO_CTX_ISR) { ^ Change-Id: I580469d4958451cfa05f56c579eae340ec003a3d Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
parent
619d7bafd9
commit
0a38788c92
|
@ -102,7 +102,7 @@ struct net_buf *net_buf_get(struct nano_fifo *fifo, size_t reserve_head)
|
|||
NET_BUF_DBG("fifo %p reserve %u", fifo, reserve_head);
|
||||
|
||||
buf = net_buf_get_timeout(fifo, reserve_head, TICKS_NONE);
|
||||
if (buf || sys_execution_context_type_get() == NANO_CTX_ISR) {
|
||||
if (buf || k_is_in_isr()) {
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
void nano_fifo_init(struct nano_fifo *fifo) {}
|
||||
void nano_fifo_put_list(struct nano_fifo *fifo, void *head, void *tail) {}
|
||||
|
||||
nano_context_type_t sys_execution_context_type_get(void)
|
||||
int k_is_in_isr(void)
|
||||
{
|
||||
return NANO_CTX_FIBER;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *nano_fifo_get(struct nano_fifo *fifo, int32_t timeout)
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
void nano_fifo_init(struct nano_fifo *fifo) {}
|
||||
void nano_fifo_put_list(struct nano_fifo *fifo, void *head, void *tail) {}
|
||||
|
||||
nano_context_type_t sys_execution_context_type_get(void)
|
||||
int k_is_in_isr(void)
|
||||
{
|
||||
return NANO_CTX_FIBER;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *nano_fifo_get(struct nano_fifo *fifo, int32_t timeout)
|
||||
|
|
Loading…
Reference in a new issue