Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4d4ca24

Browse files
committed
spinlock emulation: Fix bug when more than INT_MAX spinlocks are initialized.
Once the counter goes negative we ended up with spinlocks that erroredout on first use (due to check in tas_sema).Author: Andres FreundReviewed-By: Robert HaasDiscussion:https://postgr.es/m/20200606023103.avzrctgv7476xj7i@alap3.anarazel.deBackpatch: 9.5-
1 parentfd49d53 commit4d4ca24

File tree

1 file changed

+1
-1
lines changed
  • src/backend/storage/lmgr

1 file changed

+1
-1
lines changed

‎src/backend/storage/lmgr/spin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ SpinlockSemaInit(void)
106106
void
107107
s_init_lock_sema(volatileslock_t*lock,boolnested)
108108
{
109-
staticintcounter=0;
109+
staticuint32counter=0;
110110

111111
*lock= ((++counter) %NUM_SPINLOCK_SEMAPHORES)+1;
112112
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp