Skip to content

Commit

Permalink
Complete review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrm456 committed Aug 17, 2023
1 parent f9627f0 commit cac53b3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions groups/ntc/ntco/ntco_ioring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3856,8 +3856,18 @@ IoRingDevice::IoRingDevice(bsl::size_t queueDepth,
error = d_completionQueue.map(d_ring, d_params);
BSLS_ASSERT_OPT(!error);

// MRM: Set the k_SUPPORTS_CANCEL_BY_HANDLE if the Linux kernel version
// is >= 5.19.
int major = 0;
int minor = 0;
int patch = 0;
int build = 0;
rc = ntsscm::Version::systemVersion(&major, &minor, &patch, &build);
if (rc == 0) {
if (KERNEL_VERSION(major, minor, patch) >=
KERNEL_VERSION(5, 19, 0))
{
d_flags &= k_SUPPORTS_CANCEL_BY_HANDLE;
}
}
}

IoRingDevice::~IoRingDevice()
Expand Down

0 comments on commit cac53b3

Please sign in to comment.