forked from weaselab/conflict-set
Better support a lack of musttail and preserve_none
This commit is contained in:
+5
-4
@@ -4700,7 +4700,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
|
|
||||||
interleaved_insert::Result stackResults[100];
|
interleaved_insert::Result stackResults[100];
|
||||||
|
|
||||||
#if __has_attribute(preserve_none) && __has_attribute(musttail)
|
|
||||||
constexpr int kConcurrent = 16;
|
constexpr int kConcurrent = 16;
|
||||||
interleaved_insert::Job inProgress[kConcurrent];
|
interleaved_insert::Job inProgress[kConcurrent];
|
||||||
interleaved_insert::Context context;
|
interleaved_insert::Context context;
|
||||||
@@ -4732,8 +4731,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
// are done
|
// are done
|
||||||
inProgress->continuation(inProgress, &context);
|
inProgress->continuation(inProgress, &context);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Phase 2: Perform insertions. Nodes may be upsized during this phase, but
|
// Phase 2: Perform insertions. Nodes may be upsized during this phase, but
|
||||||
// old nodes get forwarding pointers installed and are released after
|
// old nodes get forwarding pointers installed and are released after
|
||||||
// phase 2.
|
// phase 2.
|
||||||
@@ -4794,6 +4791,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __has_attribute(preserve_none) && __has_attribute(musttail)
|
||||||
bool allPointWrites = true;
|
bool allPointWrites = true;
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
if (writes[i].end.len > 0) {
|
if (writes[i].end.len > 0) {
|
||||||
@@ -4801,7 +4799,10 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (allPointWrites) {
|
#else
|
||||||
|
bool allPointWrites = false;
|
||||||
|
#endif
|
||||||
|
if (allPointWrites && count > 1) {
|
||||||
interleavedPointWrites(writes, count, InternalVersionT(writeVersion));
|
interleavedPointWrites(writes, count, InternalVersionT(writeVersion));
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user