Lines Matching refs:token
50 uint32_t token = run.first + run.length; in acquire() local
51 _insertTokenAt(token, 1); in acquire()
52 return token; in acquire()
55 bool Tokenizer::isAcquired(uint32_t token) const in isAcquired()
57 return (_indexOrderOf(token) >= 0); in isAcquired()
60 status_t Tokenizer::reserve(uint32_t token) in reserve() argument
63 const ssize_t i = _indexOrderOf(token, &o); in reserve()
67 ssize_t err = _insertTokenAt(token, o); in reserve()
71 status_t Tokenizer::release(uint32_t token) in release() argument
73 const ssize_t i = _indexOrderOf(token); in release()
76 if ((token >= run.first) && (token < run.first+run.length)) { in release()
79 if ((token == run.first) || (token == run.first+run.length-1)) { in release()
80 if (token == run.first) { in release()
91 new_run.first = token+1; in release()
93 run.length = token - run.first; in release()
102 ssize_t Tokenizer::_indexOrderOf(uint32_t token, size_t* order) const in _indexOrderOf() argument
114 if (token < curr->first) c = 1; in _indexOrderOf()
115 else if (token >= curr->first+curr->length) c = -1; in _indexOrderOf()
129 ssize_t Tokenizer::_insertTokenAt(uint32_t token, size_t index) in _insertTokenAt() argument
136 if (p.first+p.length == token) { in _insertTokenAt()
140 if (token+1 == n.first) { in _insertTokenAt()
152 if (token+1 == n.first) { in _insertTokenAt()
159 return mRanges.insertAt(run_t(token,1), index); in _insertTokenAt()