Migrating atomic ops to std::atomic where possible and poly.
This commit is contained in:
@@ -15,14 +15,14 @@ void xe_ref_init(xe_ref_t* ref) {
|
||||
}
|
||||
|
||||
void xe_ref_retain(xe_ref_t* ref) {
|
||||
xe_atomic_inc_32(&ref->count);
|
||||
poly::atomic_inc(&ref->count);
|
||||
}
|
||||
|
||||
void xe_ref_release(xe_ref_t* ref, xe_ref_dealloc_t dealloc) {
|
||||
if (!ref) {
|
||||
return;
|
||||
}
|
||||
if (!xe_atomic_dec_32(&ref->count)) {
|
||||
if (!poly::atomic_dec(&ref->count)) {
|
||||
if (dealloc) {
|
||||
dealloc(ref);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user