Lines Matching refs:token

44 	int i, token = -EBUSY;  in __opal_async_get_token()  local
51 token = i; in __opal_async_get_token()
57 return token; in __opal_async_get_token()
68 int token; in opal_async_get_token_interruptible() local
74 token = __opal_async_get_token(); in opal_async_get_token_interruptible()
75 if (token < 0) in opal_async_get_token_interruptible()
78 return token; in opal_async_get_token_interruptible()
82 static int __opal_async_release_token(int token) in __opal_async_release_token() argument
87 if (token < 0 || token >= opal_max_async_tokens) { in __opal_async_release_token()
89 __func__, token); in __opal_async_release_token()
94 switch (opal_async_tokens[token].state) { in __opal_async_release_token()
97 opal_async_tokens[token].state = ASYNC_TOKEN_UNALLOCATED; in __opal_async_release_token()
106 opal_async_tokens[token].state = ASYNC_TOKEN_ABANDONED; in __opal_async_release_token()
116 int opal_async_release_token(int token) in opal_async_release_token() argument
120 ret = __opal_async_release_token(token); in opal_async_release_token()
128 int opal_async_wait_response(uint64_t token, struct opal_msg *msg) in opal_async_wait_response() argument
130 if (token >= opal_max_async_tokens) { in opal_async_wait_response()
149 wait_event(opal_async_wait, opal_async_tokens[token].state in opal_async_wait_response()
151 memcpy(msg, &opal_async_tokens[token].response, sizeof(*msg)); in opal_async_wait_response()
157 int opal_async_wait_response_interruptible(uint64_t token, struct opal_msg *msg) in opal_async_wait_response_interruptible() argument
162 if (token >= opal_max_async_tokens) { in opal_async_wait_response_interruptible()
188 if (opal_async_tokens[token].state == ASYNC_TOKEN_ALLOCATED) { in opal_async_wait_response_interruptible()
190 if (opal_async_tokens[token].state == ASYNC_TOKEN_ALLOCATED) in opal_async_wait_response_interruptible()
191 opal_async_tokens[token].state = ASYNC_TOKEN_DISPATCHED; in opal_async_wait_response_interruptible()
202 opal_async_tokens[token].state == in opal_async_wait_response_interruptible()
205 memcpy(msg, &opal_async_tokens[token].response, sizeof(*msg)); in opal_async_wait_response_interruptible()
218 uint64_t token; in opal_async_comp_event() local
223 token = be64_to_cpu(comp_msg->params[0]); in opal_async_comp_event()
225 state = opal_async_tokens[token].state; in opal_async_comp_event()
226 opal_async_tokens[token].state = ASYNC_TOKEN_COMPLETED; in opal_async_comp_event()
231 opal_async_release_token(token); in opal_async_comp_event()
234 memcpy(&opal_async_tokens[token].response, comp_msg, sizeof(*comp_msg)); in opal_async_comp_event()