mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-16 05:59:55 +00:00
porting: Assert when setting data for queued event
Setting data when event is already queued always indicates bug in code.
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <assert.h>
|
||||||
#include "os/os.h"
|
#include "os/os.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -146,6 +147,7 @@ ble_npl_event_get_arg(struct ble_npl_event *ev)
|
|||||||
static inline void
|
static inline void
|
||||||
ble_npl_event_set_arg(struct ble_npl_event *ev, void *arg)
|
ble_npl_event_set_arg(struct ble_npl_event *ev, void *arg)
|
||||||
{
|
{
|
||||||
|
assert(ev->ev.ev_queued == 0);
|
||||||
ev->ev.ev_arg = arg;
|
ev->ev.ev_arg = arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user