Skip to content

Commit

Permalink
tls,thread,gthr: Replace the GNU __INT32_MAX__ with the real constant
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Jan 15, 2024
1 parent 5178d6b commit 8e9ad7d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mcfgthread/gthr_aux.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ __MCF_gthr_rc_mutex_recurse(__MCF_gthr_rc_mutex* __rmtx) __MCF_NOEXCEPT
return -1;

/* Increment the recursion count. */
__MCF_ASSERT(__rmtx->__depth < __INT32_MAX__);
__MCF_ASSERT(__rmtx->__depth < 0x7FFFFFFF);
__rmtx->__depth ++;
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion mcfgthread/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ void
_MCF_thread_add_ref(_MCF_thread* __thrd) __MCF_NOEXCEPT
{
int32_t __old_ref = _MCF_atomic_xadd_32_rlx(__thrd->__nref, 1);
__MCF_ASSERT(__old_ref < __INT32_MAX__);
__MCF_ASSERT(__old_ref < 0x7FFFFFFF);
__MCF_ASSERT(__old_ref > 0);
}

Expand Down
2 changes: 1 addition & 1 deletion mcfgthread/tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void
_MCF_tls_key_add_ref(_MCF_tls_key* __key) __MCF_NOEXCEPT
{
int32_t __old_ref = _MCF_atomic_xadd_32_rlx(__key->__nref, 1);
__MCF_ASSERT(__old_ref < __INT32_MAX__);
__MCF_ASSERT(__old_ref < 0x7FFFFFFF);
__MCF_ASSERT(__old_ref > 0);
}

Expand Down

0 comments on commit 8e9ad7d

Please sign in to comment.