mirror of
https://github.com/postgres/postgres.git
synced 2025-11-21 00:42:43 +03:00
Introduce symbolic names for FeBeWaitSet positions.
Previously we used 0 and 1 to refer to the socket and latch in far flung parts of the tree, without any explanation. Also use PGINVALID_SOCKET rather than -1 in a couple of places that didn't already do that. Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Discussion: https://postgr.es/m/CA%2BhUKGJAC4Oqao%3DqforhNey20J8CiG2R%3DoBPqvfR0vOJrFysGw%40mail.gmail.com
This commit is contained in:
@@ -180,7 +180,7 @@ retry:
|
||||
|
||||
Assert(waitfor);
|
||||
|
||||
ModifyWaitEvent(FeBeWaitSet, 0, waitfor, NULL);
|
||||
ModifyWaitEvent(FeBeWaitSet, FeBeWaitSetSocketPos, waitfor, NULL);
|
||||
|
||||
WaitEventSetWait(FeBeWaitSet, -1 /* no timeout */ , &event, 1,
|
||||
WAIT_EVENT_CLIENT_READ);
|
||||
@@ -292,7 +292,7 @@ retry:
|
||||
|
||||
Assert(waitfor);
|
||||
|
||||
ModifyWaitEvent(FeBeWaitSet, 0, waitfor, NULL);
|
||||
ModifyWaitEvent(FeBeWaitSet, FeBeWaitSetSocketPos, waitfor, NULL);
|
||||
|
||||
WaitEventSetWait(FeBeWaitSet, -1 /* no timeout */ , &event, 1,
|
||||
WAIT_EVENT_CLIENT_WRITE);
|
||||
|
||||
Reference in New Issue
Block a user