MCPcopy Create free account
hub / github.com/F-Stack/f-stack / atomic_set_cmd

Function atomic_set_cmd

dpdk/drivers/common/idpf/idpf_common_device.h:169–180  ·  view source on GitHub ↗

Check there is pending cmd in execution. If none, set new command. */

Source from the content-addressed store, hash-verified

167
168/* Check there is pending cmd in execution. If none, set new command. */
169static inline bool
170atomic_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
183int idpf_adapter_init(struct idpf_adapter *adapter);

Callers 1

idpf_vc_cmd_executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected