subsys/bluetooth/controller/ll_sw/ull_llcp.c
bool llcp_tx_alloc_peek(struct ll_conn *conn, struct proc_ctx *ctx)
{
	if (!static_tx_buffer_available(conn, ctx)) {
		/* The conn already has spent its pre-aloted tx buffer(s),
		 * so we should consider the common tx buffer pool
		 */
		if (ctx->wait_reason == WAITING_FOR_NOTHING) {
			/* The current procedure is not in line for a tx buffer
			 * so sign up on the wait list
			 */
			sys_slist_append(&tx_buffer_wait_list, &ctx->wait_node);
			ctx->wait_reason = WAITING_FOR_TX_BUFFER;
		}

		/* Now check to see if this procedure context is @ head of the wait list */
		if (ctx->wait_reason == WAITING_FOR_TX_BUFFER &&
		    sys_slist_peek_head(&tx_buffer_wait_list) == &ctx->wait_node) {
			return (common_tx_buffer_alloc <
				CONFIG_BT_CTLR_LLCP_COMMON_TX_CTRL_BUF_NUM);
		}

		return false;
	}
	return true;
}
/*
 * @brief pre-alloc/peek of a tx buffer, leave requester on the wait list (@head if first up)
 *
 * @return true if alloc is allowed, false if not
 *
 */
@brief pre-alloc/peek of a tx buffer, leave requester on the wait list (@head if first up)
@return true if alloc is allowed, false if not
@brief pre - alloc / peek of a tx buffer leave requester on the wait list ( @head if first up ) @return true if alloc is allowed false if not
bool llcp_tx_alloc_peek(struct ll_conn *conn, struct proc_ctx *ctx)
{
	if (!static_tx_buffer_available(conn, ctx)) {
		if (ctx->wait_reason == WAITING_FOR_NOTHING) {
			sys_slist_append(&tx_buffer_wait_list, &ctx->wait_node);
			ctx->wait_reason = WAITING_FOR_TX_BUFFER;
		}
		if (ctx->wait_reason == WAITING_FOR_TX_BUFFER &&
		    sys_slist_peek_head(&tx_buffer_wait_list) == &ctx->wait_node) {
			return (common_tx_buffer_alloc <
				CONFIG_BT_CTLR_LLCP_COMMON_TX_CTRL_BUF_NUM);
		}
		return false;
	}
	return true;
}
bool llcp_tx_alloc_peek ( struct ll_conn * conn , struct proc_ctx * ctx ) { if ( ! static_tx_buffer_available ( conn , ctx ) ) { if ( ctx -> wait_reason == WAITING_FOR_NOTHING ) { sys_slist_append ( & tx_buffer_wait_list , & ctx -> wait_node ) ; ctx -> wait_reason = WAITING_FOR_TX_BUFFER ; } if ( ctx -> wait_reason == WAITING_FOR_TX_BUFFER && sys_slist_peek_head ( & tx_buffer_wait_list ) == & ctx -> wait_node ) { return ( common_tx_buffer_alloc < CONFIG_BT_CTLR_LLCP_COMMON_TX_CTRL_BUF_NUM ) ; } return false ; } return true ; }
@brief pre-alloc/peek of a tx buffer, leave requester on the wait list (@head if first up)
 @return true if alloc is allowed, false if not
@brief pre - alloc / peek of a tx buffer leave requester on the wait list ( @head if first up ) @return true if alloc is allowed false if not
/* The conn already has spent its pre-aloted tx buffer(s),
		 * so we should consider the common tx buffer pool
		 */ /* The current procedure is not in line for a tx buffer
			 * so sign up on the wait list
			 */ /* Now check to see if this procedure context is @ head of the wait list */