mirror of
https://github.com/postgres/postgres.git
synced 2025-07-21 16:02:15 +03:00
pgindent run for 9.0, second run
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.56 2010/05/01 22:46:30 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.57 2010/07/06 19:18:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -93,17 +93,17 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* Some BSD-derived kernels are known to return EINVAL, not EEXIST,
|
||||
* if there is an existing segment but it's smaller than "size"
|
||||
* (this is a result of poorly-thought-out ordering of error tests).
|
||||
* To distinguish between collision and invalid size in such cases,
|
||||
* we make a second try with size = 0. These kernels do not test
|
||||
* size against SHMMIN in the preexisting-segment case, so we will
|
||||
* not get EINVAL a second time if there is such a segment.
|
||||
* Some BSD-derived kernels are known to return EINVAL, not EEXIST, if
|
||||
* there is an existing segment but it's smaller than "size" (this is
|
||||
* a result of poorly-thought-out ordering of error tests). To
|
||||
* distinguish between collision and invalid size in such cases, we
|
||||
* make a second try with size = 0. These kernels do not test size
|
||||
* against SHMMIN in the preexisting-segment case, so we will not get
|
||||
* EINVAL a second time if there is such a segment.
|
||||
*/
|
||||
if (errno == EINVAL)
|
||||
{
|
||||
int save_errno = errno;
|
||||
int save_errno = errno;
|
||||
|
||||
shmid = shmget(memKey, 0, IPC_CREAT | IPC_EXCL | IPCProtection);
|
||||
|
||||
@ -122,9 +122,9 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size)
|
||||
{
|
||||
/*
|
||||
* On most platforms we cannot get here because SHMMIN is
|
||||
* greater than zero. However, if we do succeed in creating
|
||||
* a zero-size segment, free it and then fall through to
|
||||
* report the original error.
|
||||
* greater than zero. However, if we do succeed in creating a
|
||||
* zero-size segment, free it and then fall through to report
|
||||
* the original error.
|
||||
*/
|
||||
if (shmctl(shmid, IPC_RMID, NULL) < 0)
|
||||
elog(LOG, "shmctl(%d, %d, 0) failed: %m",
|
||||
|
@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/port/win32/socket.c,v 1.26 2010/02/26 02:00:53 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/port/win32/socket.c,v 1.27 2010/07/06 19:18:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -457,7 +457,7 @@ pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, c
|
||||
|
||||
r = WSASend(writefds->fd_array[i], &buf, 1, &sent, 0, NULL, NULL);
|
||||
if (r == 0) /* Completed - means things are fine! */
|
||||
FD_SET (writefds->fd_array[i], &outwritefds);
|
||||
FD_SET(writefds->fd_array[i], &outwritefds);
|
||||
|
||||
else
|
||||
{ /* Not completed */
|
||||
@ -467,7 +467,7 @@ pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, c
|
||||
* Not completed, and not just "would block", so an error
|
||||
* occured
|
||||
*/
|
||||
FD_SET (writefds->fd_array[i], &outwritefds);
|
||||
FD_SET(writefds->fd_array[i], &outwritefds);
|
||||
}
|
||||
}
|
||||
if (outwritefds.fd_count > 0)
|
||||
@ -554,7 +554,7 @@ pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, c
|
||||
(resEvents.lNetworkEvents & FD_ACCEPT) ||
|
||||
(resEvents.lNetworkEvents & FD_CLOSE))
|
||||
{
|
||||
FD_SET (sockets[i], &outreadfds);
|
||||
FD_SET(sockets[i], &outreadfds);
|
||||
|
||||
nummatches++;
|
||||
}
|
||||
@ -565,7 +565,7 @@ pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, c
|
||||
if ((resEvents.lNetworkEvents & FD_WRITE) ||
|
||||
(resEvents.lNetworkEvents & FD_CLOSE))
|
||||
{
|
||||
FD_SET (sockets[i], &outwritefds);
|
||||
FD_SET(sockets[i], &outwritefds);
|
||||
|
||||
nummatches++;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/port/win32/timer.c,v 1.18 2010/01/02 16:57:50 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/port/win32/timer.c,v 1.19 2010/07/06 19:18:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -27,7 +27,7 @@ typedef struct timerCA
|
||||
struct itimerval value;
|
||||
HANDLE event;
|
||||
CRITICAL_SECTION crit_sec;
|
||||
} timerCA;
|
||||
} timerCA;
|
||||
|
||||
static timerCA timerCommArea;
|
||||
static HANDLE timerThreadHandle = INVALID_HANDLE_VALUE;
|
||||
|
Reference in New Issue
Block a user