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

Commit411cf2d

Browse files
committed
attached to this mail is a patch from a colleague that makes
PostgreSQL-7.0.2 run on Linux for the Intel-IA64 architecture. It alsofixes a bug in the configure scripts that caused configure to fail onthe fcntl(F_SETLK) test.This fix triggered a bug in the fcntl(F_SETLK) code of the Linuxkernel when used on unix domain sockets resulting in postmaster tosegfault immediately after startup. There is a fix available andincluded in the kernel that will be on SuSE Linux 7.0, but kernels <=2.2.16 still have this bug.Reinhard Max
1 parent972604e commit411cf2d

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

‎configure.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,8 @@ PGAC_UNION_SEMUN
764764

765765

766766
AC_MSG_CHECKING(for fcntl(F_SETLK))
767-
AC_TRY_LINK([#include <fcntl.h>],
767+
AC_TRY_LINK([#include <stdio.h>
768+
#include <fcntl.h>],
768769
[struct flock lck;
769770
lck.l_whence = SEEK_SET; lck.l_start = lck.l_len = 0;
770771
lck.l_type = F_WRLCK;

‎src/include/port/linux.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ typedef unsigned int slock_t;
3333
#defineHAS_TEST_AND_SET
3434

3535
#elif defined(__arm__)
36-
typedefunsignedcharslock_t
36+
typedefunsignedcharslock_t;
37+
38+
#defineHAS_TEST_AND_SET
39+
40+
#elif defined(__ia64__)
41+
typedefunsignedintslock_t;
3742

3843
#defineHAS_TEST_AND_SET
3944

‎src/include/storage/s_lock.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.70 2000/04/12 17:16:51 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.71 2000/07/0516:09:31 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -95,6 +95,24 @@ __asm__("lock; xchgb %0,%1": "=q"(_res), "=m"(*lock):"0"(_res));
9595
#endif/* __i386__ */
9696

9797

98+
#ifdef__ia64__
99+
#defineTAS(lock) tas(lock)
100+
101+
static __inline__int
102+
tas (volatileslock_t*lock)
103+
{
104+
longintret;
105+
106+
__asm__ __volatile__(
107+
"xchg4 %0=%1,%2"
108+
:"=r"(ret),"=m"(*lock)
109+
:"r"(1),"1"(*lock)
110+
:"memory");
111+
112+
return (int)ret;
113+
}
114+
#endif/* __ia64__ */
115+
98116

99117
#if defined(__arm__)|| defined(__arm__)
100118
#defineTAS(lock) tas(lock)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp