mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
hv: refine atomic_xadd
1. rename atomic_xadd_int to atomic_xadd, add atomic_xadd64. 2. add atomic_add/sbu64_return, atomic_inc/dec64_return. Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -80,7 +80,7 @@ int create_vcpu(int cpu_id, struct vm *vm, struct vcpu **rtn_vcpu_handle)
|
||||
* vcpu->vcpu_id = vm->hw.created_vcpus;
|
||||
* vm->hw.created_vcpus++;
|
||||
*/
|
||||
vcpu->vcpu_id = atomic_xadd_int(&vm->hw.created_vcpus, 1);
|
||||
vcpu->vcpu_id = atomic_xadd(&vm->hw.created_vcpus, 1);
|
||||
/* vm->hw.vcpu_array[vcpu->vcpu_id] = vcpu; */
|
||||
atomic_store_rel_64(
|
||||
(unsigned long *)&vm->hw.vcpu_array[vcpu->vcpu_id],
|
||||
|
Reference in New Issue
Block a user