src/dpdk/drivers/net/cxgbe/cxgbe_main.c
int cxgbe_alloc_atid(struct tid_info *t, void *data)
{
	int atid = -1;

	t4_os_lock(&t->atid_lock);
	if (t->afree) {
		union aopen_entry *p = t->afree;

		atid = p - t->atid_tab;
		t->afree = p->next;
		p->data = data;
		t->atids_in_use++;
	}
	t4_os_unlock(&t->atid_lock);
	return atid;
}
/**
 * Allocate an active-open TID and set it to the supplied value.
 */
Allocate an active-open TID and set it to the supplied value.
Allocate an active - open TID and set it to the supplied value .
int cxgbe_alloc_atid(struct tid_info *t, void *data)
{
	int atid = -1;
	t4_os_lock(&t->atid_lock);
	if (t->afree) {
		union aopen_entry *p = t->afree;
		atid = p - t->atid_tab;
		t->afree = p->next;
		p->data = data;
		t->atids_in_use++;
	}
	t4_os_unlock(&t->atid_lock);
	return atid;
}
int cxgbe_alloc_atid ( struct tid_info * t , void * data ) { int atid = -1 ; t4_os_lock ( & t -> atid_lock ) ; if ( t -> afree ) { union aopen_entry * p = t -> afree ; atid = p - t -> atid_tab ; t -> afree = p -> next ; p -> data = data ; t -> atids_in_use ++ ; } t4_os_unlock ( & t -> atid_lock ) ; return atid ; }
Allocate an active-open TID and set it to the supplied value.
Allocate an active - open TID and set it to the supplied value .