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

Commit62cd6e7

Browse files
committed
Somewhere between 6.1 and 6.3 someone removed the support for the
NS32K machine I contributed. In any case, I now have postgresql-6.3running again on NetBSD/pc532, a NS32532 machine. The followingchanges are needed relative to the src directory. (It looks likesupport was partially removed when the files were moved from thesrc/backend/storage/.... tree to the src/include tree.)If you need me to get a current development version of postgresqlfor this change let me know. Also, let me know if this code needsupdating due to another code movement that deleted the old NS32Ksupport.Thank you.Phil Nelson
1 parent8ae23e1 commit62cd6e7

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

‎src/include/port/bsd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#defineHAS_TEST_AND_SET
1616
#endif
1717

18-
#if defined(ns32k)
19-
#defineNEED_NS32k_TAS_ASM
18+
#if defined(__ns32k__)
19+
#defineNEED_NS32K_TAS_ASM
2020
#defineHAS_TEST_AND_SET
2121
#endif
2222

‎src/include/storage/s_lock.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.39 1998/07/18 14:58:58 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.40 1998/07/19 01:19:54 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -209,6 +209,22 @@ tas(slock_t *s_lock)
209209
#endif/* NEED_I386_TAS_ASM */
210210

211211

212+
213+
#if defined(NEED_NS32K_TAS_ASM)
214+
215+
#defineS_LOCK(lock)\
216+
{\
217+
slock_t res = 1;\
218+
while (res) {\
219+
__asm__("movqd 0, r0");\
220+
__asm__("sbitd r0, %0" : "=m"(*lock));\
221+
__asm__("sprb us, %0" : "=r" (res));\
222+
res = ((res >> 5) & 1);\
223+
}\
224+
}
225+
#endif/* NEED_NS32K_TAS_ASM */
226+
227+
212228
#endif/* defined(__GNUC__) */
213229

214230

@@ -308,6 +324,10 @@ inttas(volatile slock_t *lock); /* port/.../tas.s, or s_lock.c */
308324
#defineTAS(lock)tas((volatile slock_t *) lock)
309325
#endif/* TAS */
310326

327+
#defineS_UNLOCK(lock) (*(lock) = 0)
328+
329+
#defineS_INIT_LOCK(lock) S_UNLOCK(lock)
330+
311331

312332
#endif/* HAS_TEST_AND_SET */
313333
#endif/* S_LOCK_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp