Skip to content

Commit d2a2236

Browse files
committed
[libc][NFC] Remove redundant [[convergent]] attributes from RPC
1 parent c97478c commit d2a2236

File tree

1 file changed

+5
-8
lines changed
  • libc/src/__support/RPC

1 file changed

+5
-8
lines changed

libc/src/__support/RPC/rpc.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct Header {
5555
};
5656

5757
/// The maximum number of parallel ports that the RPC interface can support.
58-
constexpr uint64_t MAX_PORT_COUNT = 4096;
58+
constexpr static uint64_t MAX_PORT_COUNT = 4096;
5959

6060
/// A common process used to synchronize communication between a client and a
6161
/// server. The process contains a read-only inbox and a write-only outbox used
@@ -166,8 +166,7 @@ template <bool Invert> struct Process {
166166
/// lane_mask is a bitmap of the threads in the warp that would hold the
167167
/// single lock on success, e.g. the result of rpc::get_lane_mask()
168168
/// The lock is held when the n-th bit of the lock bitfield is set.
169-
[[clang::convergent]] LIBC_INLINE bool try_lock(uint64_t lane_mask,
170-
uint32_t index) {
169+
LIBC_INLINE bool try_lock(uint64_t lane_mask, uint32_t index) {
171170
// On amdgpu, test and set to the nth lock bit and a sync_lane would suffice
172171
// On volta, need to handle differences between the threads running and
173172
// the threads that were detected in the previous call to get_lane_mask()
@@ -207,8 +206,7 @@ template <bool Invert> struct Process {
207206

208207
/// Unlock the lock at index. We need a lane sync to keep this function
209208
/// convergent, otherwise the compiler will sink the store and deadlock.
210-
[[clang::convergent]] LIBC_INLINE void unlock(uint64_t lane_mask,
211-
uint32_t index) {
209+
LIBC_INLINE void unlock(uint64_t lane_mask, uint32_t index) {
212210
// Do not move any writes past the unlock.
213211
__scoped_atomic_thread_fence(__ATOMIC_RELEASE, __MEMORY_SCOPE_DEVICE);
214212

@@ -518,8 +516,7 @@ LIBC_INLINE void Port<T>::recv_n(void **dst, uint64_t *size, A &&alloc) {
518516
/// port. Each port instance uses an associated \p opcode to tell the server
519517
/// what to do. The Client interface provides the appropriate lane size to the
520518
/// port using the platform's returned value.
521-
template <uint32_t opcode>
522-
[[clang::convergent]] LIBC_INLINE Client::Port Client::open() {
519+
template <uint32_t opcode> LIBC_INLINE Client::Port Client::open() {
523520
// Repeatedly perform a naive linear scan for a port that can be opened to
524521
// send data.
525522
for (uint32_t index = 0;; ++index) {
@@ -553,7 +550,7 @@ template <uint32_t opcode>
553550

554551
/// Attempts to open a port to use as the server. The server can only open a
555552
/// port if it has a pending receive operation
556-
[[clang::convergent]] LIBC_INLINE rpc::optional<typename Server::Port>
553+
LIBC_INLINE rpc::optional<typename Server::Port>
557554
Server::try_open(uint32_t lane_size, uint32_t start) {
558555
// Perform a naive linear scan for a port that has a pending request.
559556
for (uint32_t index = start; index < process.port_count; ++index) {

0 commit comments

Comments
 (0)