Skip to content

Commit 607a3f9

Browse files
author
git apple-llvm automerger
committed
Merge commit '0c139883f4c0' from llvm.org/main into next
2 parents cc46986 + 0c13988 commit 607a3f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libc/shared/rpc.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,9 @@ template <uint32_t opcode> RPC_ATTRS Client::Port Client::open() {
551551
/// port if it has a pending receive operation
552552
RPC_ATTRS rpc::optional<typename Server::Port>
553553
Server::try_open(uint32_t lane_size, uint32_t start) {
554+
if (rpc::get_lane_id() >= lane_size)
555+
return rpc::nullopt;
556+
554557
// Perform a naive linear scan for a port that has a pending request.
555558
for (uint32_t index = start; index < process.port_count; ++index) {
556559
uint64_t lane_mask = rpc::get_lane_mask();

0 commit comments

Comments
 (0)