/Zephyr-Core-3.6.0/drivers/spi/ |
D | spi_context.h | 78 static inline bool spi_context_configured(struct spi_context *ctx, in spi_context_configured() argument 81 return !!(ctx->config == config); in spi_context_configured() 84 static inline bool spi_context_is_slave(struct spi_context *ctx) in spi_context_is_slave() argument 86 return (ctx->config->operation & SPI_OP_MODE_SLAVE); in spi_context_is_slave() 89 static inline void spi_context_lock(struct spi_context *ctx, in spi_context_lock() argument 96 (k_sem_count_get(&ctx->lock) == 0) && in spi_context_lock() 97 (ctx->owner == spi_cfg)) { in spi_context_lock() 101 k_sem_take(&ctx->lock, K_FOREVER); in spi_context_lock() 102 ctx->owner = spi_cfg; in spi_context_lock() 105 ctx->asynchronous = asynchronous; in spi_context_lock() [all …]
|
/Zephyr-Core-3.6.0/drivers/adc/ |
D | adc_context.h | 29 static void adc_context_start_sampling(struct adc_context *ctx); 30 static void adc_context_update_buffer_pointer(struct adc_context *ctx, 38 static void adc_context_enable_timer(struct adc_context *ctx); 39 static void adc_context_disable_timer(struct adc_context *ctx); 48 static void adc_context_on_complete(struct adc_context *ctx, int status); 92 static inline void adc_context_init(struct adc_context *ctx) in adc_context_init() argument 95 k_timer_init(&ctx->timer, adc_context_on_timer_expired, NULL); in adc_context_init() 97 k_sem_init(&ctx->lock, 0, 1); in adc_context_init() 98 k_sem_init(&ctx->sync, 0, 1); in adc_context_init() 101 static inline void adc_context_request_next_sampling(struct adc_context *ctx) in adc_context_request_next_sampling() argument [all …]
|
/Zephyr-Core-3.6.0/subsys/modbus/ |
D | modbus_server.c | 34 void modbus_reset_stats(struct modbus_context *ctx) in modbus_reset_stats() argument 37 ctx->mbs_msg_ctr = 0; in modbus_reset_stats() 38 ctx->mbs_crc_err_ctr = 0; in modbus_reset_stats() 39 ctx->mbs_except_ctr = 0; in modbus_reset_stats() 40 ctx->mbs_server_msg_ctr = 0; in modbus_reset_stats() 41 ctx->mbs_noresp_ctr = 0; in modbus_reset_stats() 44 static void update_msg_ctr(struct modbus_context *ctx) in update_msg_ctr() argument 46 ctx->mbs_msg_ctr++; in update_msg_ctr() 49 static void update_crcerr_ctr(struct modbus_context *ctx) in update_crcerr_ctr() argument 51 ctx->mbs_crc_err_ctr++; in update_crcerr_ctr() [all …]
|
D | modbus_core.c | 70 struct modbus_context *ctx; in modbus_rx_handler() local 72 ctx = CONTAINER_OF(item, struct modbus_context, server_work); in modbus_rx_handler() 74 switch (ctx->mode) { in modbus_rx_handler() 78 modbus_serial_rx_disable(ctx); in modbus_rx_handler() 79 ctx->rx_adu_err = modbus_serial_rx_adu(ctx); in modbus_rx_handler() 84 ctx->rx_adu_err = modbus_raw_rx_adu(ctx); in modbus_rx_handler() 92 if (ctx->client == true) { in modbus_rx_handler() 93 k_sem_give(&ctx->client_wait_sem); in modbus_rx_handler() 95 bool respond = modbus_server_handler(ctx); in modbus_rx_handler() 98 modbus_tx_adu(ctx); in modbus_rx_handler() [all …]
|
D | modbus_client.c | 29 static int mbc_validate_response_fc(struct modbus_context *ctx, in mbc_validate_response_fc() argument 33 uint8_t resp_fc = ctx->rx_adu.fc; in mbc_validate_response_fc() 34 uint8_t excep_code = ctx->rx_adu.data[0]; in mbc_validate_response_fc() 38 if (unit_id != ctx->rx_adu.unit_id) { in mbc_validate_response_fc() 57 static int mbc_validate_fc03fp_response(struct modbus_context *ctx, float *ptbl) in mbc_validate_fc03fp_response() argument 64 resp_byte_cnt = ctx->rx_adu.data[0]; in mbc_validate_fc03fp_response() 65 resp_data = &ctx->rx_adu.data[1]; in mbc_validate_fc03fp_response() 66 req_qty = sys_get_be16(&ctx->tx_adu.data[2]); in mbc_validate_fc03fp_response() 84 static int mbc_validate_rd_response(struct modbus_context *ctx, in mbc_validate_rd_response() argument 101 resp_byte_cnt = ctx->rx_adu.data[0]; in mbc_validate_rd_response() [all …]
|
/Zephyr-Core-3.6.0/subsys/storage/stream/ |
D | stream_flash.c | 26 struct stream_flash_ctx *ctx = (struct stream_flash_ctx *) param; in settings_direct_loader() local 34 if (cb_len != sizeof(ctx->bytes_written)) { in settings_direct_loader() 40 if (bytes_written >= ctx->bytes_written) { in settings_direct_loader() 41 ctx->bytes_written = bytes_written; in settings_direct_loader() 44 bytes_written, ctx->bytes_written); in settings_direct_loader() 51 off_t offset = (off_t) (ctx->offset + ctx->bytes_written) - 1; in settings_direct_loader() 56 if (ctx->bytes_written > 0) { in settings_direct_loader() 57 rc = flash_get_page_info_by_offs(ctx->fdev, offset, in settings_direct_loader() 63 ctx->last_erased_page_start_offset = page.start_offset; in settings_direct_loader() 65 ctx->last_erased_page_start_offset = -1; in settings_direct_loader() [all …]
|
/Zephyr-Core-3.6.0/subsys/bluetooth/controller/ll_sw/ |
D | ull_llcp_conn_upd.c | 165 static void cu_update_conn_parameters(struct ll_conn *conn, struct proc_ctx *ctx) in cu_update_conn_parameters() argument 167 ctx->data.cu.params_changed = cu_have_params_changed( in cu_update_conn_parameters() 168 conn, ctx->data.cu.interval_max, ctx->data.cu.latency, ctx->data.cu.timeout); in cu_update_conn_parameters() 170 ull_conn_update_parameters(conn, (ctx->proc == PROC_CONN_UPDATE), ctx->data.cu.win_size, in cu_update_conn_parameters() 171 ctx->data.cu.win_offset_us, ctx->data.cu.interval_max, in cu_update_conn_parameters() 172 ctx->data.cu.latency, ctx->data.cu.timeout, in cu_update_conn_parameters() 173 ctx->data.cu.instant); in cu_update_conn_parameters() 177 static bool cu_check_conn_parameters(struct ll_conn *conn, struct proc_ctx *ctx) in cu_check_conn_parameters() argument 179 const uint16_t interval_min = ctx->data.cu.interval_min; in cu_check_conn_parameters() 180 const uint16_t interval_max = ctx->data.cu.interval_max; /* unit conn events (ie 1.25ms) */ in cu_check_conn_parameters() [all …]
|
D | ull_llcp_cc.c | 56 static void cc_ntf_established(struct ll_conn *conn, struct proc_ctx *ctx) in cc_ntf_established() argument 63 ntf = ctx->node_ref.rx; in cc_ntf_established() 65 ctx->node_ref.rx = NULL; in cc_ntf_established() 71 ntf->hdr.rx_ftr.param = ll_conn_iso_stream_get(ctx->data.cis_create.cis_handle); in cc_ntf_established() 75 pdu->cis_handle = ctx->data.cis_create.cis_handle; in cc_ntf_established() 76 pdu->status = ctx->data.cis_create.error; in cc_ntf_established() 129 static void rp_cc_check_instant(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t evt, 136 static void llcp_rp_cc_tx_rsp(struct ll_conn *conn, struct proc_ctx *ctx) in llcp_rp_cc_tx_rsp() argument 144 tx = llcp_tx_alloc(conn, ctx); in llcp_rp_cc_tx_rsp() 148 conn_event_count = ctx->data.cis_create.conn_event_count; in llcp_rp_cc_tx_rsp() [all …]
|
D | ull_llcp_common.c | 106 static void lp_comm_ntf(struct ll_conn *conn, struct proc_ctx *ctx); 107 static void lp_comm_terminate_invalid_pdu(struct ll_conn *conn, struct proc_ctx *ctx); 143 static void lp_comm_tx(struct ll_conn *conn, struct proc_ctx *ctx) in lp_comm_tx() argument 149 tx = llcp_tx_alloc(conn, ctx); in lp_comm_tx() 155 switch (ctx->proc) { in lp_comm_tx() 159 ctx->rx_opcode = PDU_DATA_LLCTRL_TYPE_PING_RSP; in lp_comm_tx() 164 ctx->rx_opcode = PDU_DATA_LLCTRL_TYPE_FEATURE_RSP; in lp_comm_tx() 168 llcp_pdu_encode_min_used_chans_ind(ctx, pdu); in lp_comm_tx() 169 ctx->node_ref.tx_ack = tx; in lp_comm_tx() 170 ctx->rx_opcode = PDU_DATA_LLCTRL_TYPE_UNUSED; in lp_comm_tx() [all …]
|
D | ull_llcp.c | 82 struct proc_ctx *ctx; in proc_ctx_acquire() local 84 ctx = (struct proc_ctx *)mem_acquire(&owner->free); in proc_ctx_acquire() 86 if (ctx) { in proc_ctx_acquire() 88 ctx->owner = owner; in proc_ctx_acquire() 91 return ctx; in proc_ctx_acquire() 94 void llcp_proc_ctx_release(struct proc_ctx *ctx) in llcp_proc_ctx_release() argument 97 LL_ASSERT(ctx->owner); in llcp_proc_ctx_release() 100 mem_release(ctx, &ctx->owner->free); in llcp_proc_ctx_release() 120 static inline bool static_tx_buffer_available(struct ll_conn *conn, struct proc_ctx *ctx) in static_tx_buffer_available() argument 138 bool llcp_tx_alloc_peek(struct ll_conn *conn, struct proc_ctx *ctx) in llcp_tx_alloc_peek() argument [all …]
|
D | ull_llcp_phy.c | 145 static void pu_prep_update_ind(struct ll_conn *conn, struct proc_ctx *ctx) in pu_prep_update_ind() argument 147 ctx->data.pu.tx = pu_select_phy(ctx->data.pu.tx); in pu_prep_update_ind() 148 ctx->data.pu.rx = pu_select_phy(ctx->data.pu.rx); in pu_prep_update_ind() 150 if (ctx->data.pu.tx != conn->lll.phy_tx) { in pu_prep_update_ind() 151 ctx->data.pu.c_to_p_phy = ctx->data.pu.tx; in pu_prep_update_ind() 153 ctx->data.pu.c_to_p_phy = 0U; in pu_prep_update_ind() 155 if (ctx->data.pu.rx != conn->lll.phy_rx) { in pu_prep_update_ind() 156 ctx->data.pu.p_to_c_phy = ctx->data.pu.rx; in pu_prep_update_ind() 158 ctx->data.pu.p_to_c_phy = 0U; in pu_prep_update_ind() 201 static uint8_t pu_check_update_ind(struct ll_conn *conn, struct proc_ctx *ctx) in pu_check_update_ind() argument [all …]
|
D | ull_llcp_chmu.c | 85 static void lp_chmu_tx(struct ll_conn *conn, struct proc_ctx *ctx) in lp_chmu_tx() argument 91 tx = llcp_tx_alloc(conn, ctx); in lp_chmu_tx() 97 llcp_pdu_encode_chan_map_update_ind(ctx, pdu); in lp_chmu_tx() 99 ctx->tx_opcode = pdu->llctrl.opcode; in lp_chmu_tx() 105 static void lp_chmu_complete(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t evt, void *param) in lp_chmu_complete() argument 107 ull_conn_chan_map_set(conn, ctx->data.chmu.chm); in lp_chmu_complete() 109 ctx->state = LP_CHMU_STATE_IDLE; in lp_chmu_complete() 112 static void lp_chmu_send_channel_map_update_ind(struct ll_conn *conn, struct proc_ctx *ctx, in lp_chmu_send_channel_map_update_ind() argument 116 !llcp_tx_alloc_peek(conn, ctx)) { in lp_chmu_send_channel_map_update_ind() 117 ctx->state = LP_CHMU_STATE_WAIT_TX_CHAN_MAP_IND; in lp_chmu_send_channel_map_update_ind() [all …]
|
D | ull_llcp_enc.c | 146 static void enc_setup_lll(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t role) in enc_setup_lll() argument 151 ecb_encrypt(&ctx->data.enc.ltk[0], &ctx->data.enc.skd[0], NULL, &conn->lll.ccm_rx.key[0]); in enc_setup_lll() 181 static struct node_tx *llcp_lp_enc_tx(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t opcode) in llcp_lp_enc_tx() argument 187 tx = llcp_tx_alloc(conn, ctx); in llcp_lp_enc_tx() 195 llcp_pdu_encode_enc_req(ctx, pdu); in llcp_lp_enc_tx() 210 ctx->tx_opcode = pdu->llctrl.opcode; in llcp_lp_enc_tx() 221 static void lp_enc_ntf(struct ll_conn *conn, struct proc_ctx *ctx) in lp_enc_ntf() argument 227 ntf = ctx->node_ref.rx; in lp_enc_ntf() 234 if (ctx->data.enc.error == BT_HCI_ERR_SUCCESS) { in lp_enc_ntf() 235 if (ctx->proc == PROC_ENCRYPTION_START) { in lp_enc_ntf() [all …]
|
/Zephyr-Core-3.6.0/drivers/disk/ |
D | flashdisk.c | 50 static int flashdisk_init_runtime(struct flashdisk_data *ctx, in flashdisk_init_runtime() argument 57 rc = flash_get_page_info_by_offs(ctx->info.dev, ctx->offset, &page); in flashdisk_init_runtime() 63 ctx->page_size = page.size; in flashdisk_init_runtime() 64 LOG_INF("Initialize device %s", ctx->info.name); in flashdisk_init_runtime() 66 (long)ctx->offset, ctx->sector_size, ctx->page_size, ctx->size); in flashdisk_init_runtime() 68 if (ctx->cache_size == 0) { in flashdisk_init_runtime() 70 LOG_INF("%s is read-only", ctx->info.name); in flashdisk_init_runtime() 75 if (ctx->offset != page.start_offset) { in flashdisk_init_runtime() 77 ctx->info.name); in flashdisk_init_runtime() 81 offset = ctx->offset + page.size; in flashdisk_init_runtime() [all …]
|
/Zephyr-Core-3.6.0/subsys/usb/device_next/class/ |
D | usbd_msc.c | 166 struct msc_bot_ctx *ctx = node->data->priv; in msc_queue_bulk_out_ep() local 171 if (atomic_test_and_set_bit(&ctx->bits, MSC_BULK_OUT_QUEUED)) { in msc_queue_bulk_out_ep() 188 atomic_clear_bit(&ctx->bits, MSC_BULK_OUT_QUEUED); in msc_queue_bulk_out_ep() 210 struct msc_bot_ctx *ctx = node->data->priv; in msc_reset_handler() local 214 ctx->state = MSC_BBB_EXPECT_CBW; in msc_reset_handler() 215 for (i = 0; i < ctx->registered_luns; i++) { in msc_reset_handler() 216 scsi_reset(&ctx->luns[i]); in msc_reset_handler() 219 atomic_clear_bit(&ctx->bits, MSC_BULK_IN_WEDGED); in msc_reset_handler() 220 atomic_clear_bit(&ctx->bits, MSC_BULK_OUT_WEDGED); in msc_reset_handler() 223 static bool is_cbw_meaningful(struct msc_bot_ctx *const ctx) in is_cbw_meaningful() argument [all …]
|
/Zephyr-Core-3.6.0/tests/bluetooth/common/testlib/src/ |
D | att_read.c | 42 struct bt_testlib_att_read_closure *ctx = in att_read_cb() local 45 k_mutex_lock(&ctx->lock, K_FOREVER); in att_read_cb() 47 ctx->att_err = att_err; in att_read_cb() 49 if (!att_err && ctx->result_handle) { in att_read_cb() 51 *ctx->result_handle = params->by_uuid.start_handle; in att_read_cb() 54 if (!att_err && ctx->result_size) { in att_read_cb() 56 *ctx->result_size += read_len; in att_read_cb() 57 if (*ctx->result_size > BT_ATT_MAX_ATTRIBUTE_LEN) { in att_read_cb() 62 if (read_data && ctx->result_data) { in att_read_cb() 64 MIN(read_len, net_buf_simple_tailroom(ctx->result_data)); in att_read_cb() [all …]
|
/Zephyr-Core-3.6.0/subsys/net/l2/ppp/ |
D | link.c | 19 static void lcp_up(struct ppp_context *ctx) in lcp_up() argument 27 proto->lower_up(ctx); in lcp_up() 32 static void do_network(struct ppp_context *ctx) in do_network() argument 34 ppp_change_phase(ctx, PPP_NETWORK); in do_network() 39 proto->open(ctx); in do_network() 56 ctx->network_protos_open++; in do_network() 57 proto->open(ctx); in do_network() 61 if (ctx->network_protos_open == 0) { in do_network() 65 proto->close(ctx, "No network protocols open"); in do_network() 70 static void do_auth(struct ppp_context *ctx) in do_auth() argument [all …]
|
D | network.c | 19 void ppp_network_up(struct ppp_context *ctx, int proto) in ppp_network_up() argument 21 if (ctx->network_protos_up == 0) { in ppp_network_up() 22 ppp_change_phase(ctx, PPP_RUNNING); in ppp_network_up() 25 ctx->network_protos_up++; in ppp_network_up() 27 NET_DBG("[%p] Proto %s (0x%04x) %s (%d)", ctx, ppp_proto2str(proto), in ppp_network_up() 28 proto, "up", ctx->network_protos_up); in ppp_network_up() 31 void ppp_network_down(struct ppp_context *ctx, int proto) in ppp_network_down() argument 33 ctx->network_protos_up--; in ppp_network_down() 35 if (ctx->network_protos_up <= 0) { in ppp_network_down() 36 ctx->network_protos_up = 0; in ppp_network_down() [all …]
|
/Zephyr-Core-3.6.0/tests/net/lib/lwm2m/lwm2m_engine/src/ |
D | main.c | 95 struct lwm2m_ctx ctx; in ZTEST() local 98 (void)memset(&ctx, 0x0, sizeof(ctx)); in ZTEST() 100 ctx.remote_addr.sa_family = AF_INET; in ZTEST() 101 ctx.sock_fd = -1; in ZTEST() 102 ctx.load_credentials = NULL; in ZTEST() 103 ctx.desthostname = host_name; in ZTEST() 104 ctx.desthostnamelen = strlen(host_name); in ZTEST() 105 ctx.hostname_verify = true; in ZTEST() 106 ctx.use_dtls = true; in ZTEST() 108 ret = lwm2m_engine_start(&ctx); in ZTEST() [all …]
|
/Zephyr-Core-3.6.0/drivers/modem/ |
D | modem_receiver.c | 60 static int mdm_receiver_get(struct mdm_receiver_context *ctx) in mdm_receiver_get() argument 66 contexts[i] = ctx; in mdm_receiver_get() 83 static void mdm_receiver_flush(struct mdm_receiver_context *ctx) in mdm_receiver_flush() argument 87 __ASSERT(ctx, "invalid ctx"); in mdm_receiver_flush() 88 __ASSERT(ctx->uart_dev, "invalid ctx device"); in mdm_receiver_flush() 90 while (uart_fifo_read(ctx->uart_dev, &c, 1) > 0) { in mdm_receiver_flush() 107 struct mdm_receiver_context *ctx; in mdm_receiver_isr() local 114 ctx = context_from_dev(uart_dev); in mdm_receiver_isr() 115 if (!ctx) { in mdm_receiver_isr() 120 while (uart_irq_update(ctx->uart_dev) && in mdm_receiver_isr() [all …]
|
/Zephyr-Core-3.6.0/include/zephyr/crypto/ |
D | crypto.h | 70 int (*cipher_begin_session)(const struct device *dev, struct cipher_ctx *ctx, 75 int (*cipher_free_session)(const struct device *dev, struct cipher_ctx *ctx); 82 int (*hash_begin_session)(const struct device *dev, struct hash_ctx *ctx, 85 int (*hash_free_session)(const struct device *dev, struct hash_ctx *ctx); 161 struct cipher_ctx *ctx, in cipher_begin_session() argument 170 ctx->device = dev; in cipher_begin_session() 171 ctx->ops.cipher_mode = mode; in cipher_begin_session() 173 flags = (ctx->flags & (CAP_OPAQUE_KEY_HNDL | CAP_RAW_KEY)); in cipher_begin_session() 178 flags = (ctx->flags & (CAP_INPLACE_OPS | CAP_SEPARATE_IO_BUFS)); in cipher_begin_session() 183 flags = (ctx->flags & (CAP_SYNC_OPS | CAP_ASYNC_OPS)); in cipher_begin_session() [all …]
|
/Zephyr-Core-3.6.0/lib/smf/ |
D | smf.c | 37 static bool last_state_share_paren(struct smf_ctx *const ctx, in last_state_share_paren() argument 41 if (!ctx->previous) { in last_state_share_paren() 45 return share_paren(ctx->previous->parent, state); in last_state_share_paren() 77 struct smf_ctx *const ctx, const struct smf_state *target) in smf_execute_ancestor_entry_actions() argument 79 struct internal_ctx * const internal = (void *) &ctx->internal; in smf_execute_ancestor_entry_actions() 85 if (!last_state_share_paren(ctx, to_execute) && to_execute->entry) { in smf_execute_ancestor_entry_actions() 86 to_execute->entry(ctx); in smf_execute_ancestor_entry_actions() 105 __unused static bool smf_execute_ancestor_run_actions(struct smf_ctx *ctx) in smf_execute_ancestor_run_actions() argument 107 struct internal_ctx * const internal = (void *) &ctx->internal; in smf_execute_ancestor_run_actions() 122 for (const struct smf_state *tmp_state = ctx->current->parent; in smf_execute_ancestor_run_actions() [all …]
|
/Zephyr-Core-3.6.0/subsys/net/l2/ieee802154/ |
D | ieee802154_mgmt.c | 39 struct ieee802154_context *ctx = net_if_l2_data(iface); in ieee802154_handle_beacon() local 43 if (!ctx->scan_ctx) { in ieee802154_handle_beacon() 51 k_sem_take(&ctx->scan_ctx_lock, K_FOREVER); in ieee802154_handle_beacon() 53 ctx->scan_ctx->pan_id = mpdu->mhr.src_addr->plain.pan_id; in ieee802154_handle_beacon() 54 ctx->scan_ctx->lqi = lqi; in ieee802154_handle_beacon() 57 ctx->scan_ctx->len = IEEE802154_SHORT_ADDR_LENGTH; in ieee802154_handle_beacon() 58 ctx->scan_ctx->short_addr = in ieee802154_handle_beacon() 61 ctx->scan_ctx->len = IEEE802154_EXT_ADDR_LENGTH; in ieee802154_handle_beacon() 62 sys_memcpy_swap(ctx->scan_ctx->addr, in ieee802154_handle_beacon() 69 k_sem_give(&ctx->scan_ctx_lock); in ieee802154_handle_beacon() [all …]
|
/Zephyr-Core-3.6.0/subsys/net/l2/virtual/ |
D | virtual.c | 48 struct virtual_interface_context *ctx; in virtual_enable() local 55 ctx = net_if_l2_data(iface); in virtual_enable() 62 while (ctx->iface) { in virtual_enable() 63 if (net_if_is_up(ctx->iface)) { in virtual_enable() 70 if (net_if_l2(ctx->iface) != in virtual_enable() 72 net_if_up(ctx->iface); in virtual_enable() 76 NET_DBG("Taking iface %d up", net_if_get_by_iface(ctx->iface)); in virtual_enable() 78 net_if_up(ctx->iface); in virtual_enable() 79 ctx = net_if_l2_data(ctx->iface); in virtual_enable() 98 struct virtual_interface_context *ctx = net_if_l2_data(iface); in virtual_flags() local [all …]
|
/Zephyr-Core-3.6.0/subsys/net/lib/websocket/ |
D | websocket.c | 82 static int websocket_context_ref(struct websocket_context *ctx) in websocket_context_ref() argument 84 int old_rc = atomic_inc(&ctx->refcount); in websocket_context_ref() 89 static int websocket_context_unref(struct websocket_context *ctx) in websocket_context_unref() argument 91 int old_rc = atomic_dec(&ctx->refcount); in websocket_context_unref() 100 static inline bool websocket_context_is_used(struct websocket_context *ctx) in websocket_context_is_used() argument 102 NET_ASSERT(ctx); in websocket_context_is_used() 104 return !!atomic_get(&ctx->refcount); in websocket_context_is_used() 109 struct websocket_context *ctx = NULL; in websocket_get() local 120 ctx = &contexts[i]; in websocket_get() 126 return ctx; in websocket_get() [all …]
|