Lines Matching refs:xid
46 pthread_mutex_lock(&c->xid.lock);
47 if(c->xid.last >= c->xid.max - c->xid.inc + 1)
50 assert(c->xid.last == c->xid.max);
51 if (c->xid.last == 0) {
53 c->xid.max = c->setup->resource_id_mask;
59 pthread_mutex_unlock(&c->xid.lock);
69 pthread_mutex_unlock(&c->xid.lock);
73 c->xid.last = range->start_id;
74 c->xid.max = range->start_id + (range->count - 1) * c->xid.inc;
78 c->xid.last += c->xid.inc;
80 ret = c->xid.last | c->xid.base;
81 pthread_mutex_unlock(&c->xid.lock);
89 if(pthread_mutex_init(&c->xid.lock, 0))
91 c->xid.last = 0;
92 c->xid.max = 0;
93 c->xid.base = c->setup->resource_id_base;
94 c->xid.inc = c->setup->resource_id_mask & -(c->setup->resource_id_mask);
100 pthread_mutex_destroy(&c->xid.lock);