Check there is pending cmd in execution. If none, set new command. */
| 167 | |
| 168 | /* Check there is pending cmd in execution. If none, set new command. */ |
| 169 | static inline bool |
| 170 | atomic_set_cmd(struct idpf_adapter *adapter, uint32_t ops) |
| 171 | { |
| 172 | uint32_t op_unk = VIRTCHNL2_OP_UNKNOWN; |
| 173 | bool ret = __atomic_compare_exchange(&adapter->pend_cmd, &op_unk, &ops, |
| 174 | 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE); |
| 175 | |
| 176 | if (!ret) |
| 177 | DRV_LOG(ERR, "There is incomplete cmd %d", adapter->pend_cmd); |
| 178 | |
| 179 | return !ret; |
| 180 | } |
| 181 | |
| 182 | __rte_internal |
| 183 | int idpf_adapter_init(struct idpf_adapter *adapter); |
no outgoing calls
no test coverage detected