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

Commit75815c3

Browse files
committed
cleanup.
1 parent27aaf9d commit75815c3

File tree

2 files changed

+71
-68
lines changed

2 files changed

+71
-68
lines changed

‎src/backend/storage/buffer/s_lock.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.30 2001/01/1920:39:16 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.31 2001/01/1921:09:57 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -144,23 +144,24 @@ _tas:\n\
144144
rts\n\
145145
_success:\n\
146146
moveq #0,d0\n\
147-
rts");
147+
rts\n\
148+
");
148149
}
149150

150151
#endif/* __m68k__ */
151152

152153
#if defined(__APPLE__)&& defined(__ppc__)
153154
/* used in darwin. */
154155
/* We key off __APPLE__ here because this function differs from
155-
* the LinuxPPC implementation only in compiler syntax.
156+
* the LinuxPPC implementation only in compiler syntax.
156157
*/
157158
staticvoid
158159
tas_dummy()
159160
{
160-
__asm__ __volatile__(
161+
__asm__ __volatile__(
161162
"\
162-
.globl tas\n\
163-
.globl_tas\n\
163+
.globltas\n\
164+
.globl_tas\n\
164165
_tas:\n\
165166
tas:\n\
166167
lwarxr5,0,r3\n\
@@ -173,8 +174,8 @@ fail:li r3,1\n\
173174
blr \n\
174175
success:\n\
175176
li r3,0\n\
176-
blr\n\
177-
");
177+
blr\n\
178+
");
178179
}
179180

180181
#endif/* __APPLE__ && __ppc__ */
@@ -198,7 +199,8 @@ fail:li3,1 \n\
198199
blr \n\
199200
success:\n\
200201
li 3,0\n\
201-
blr");
202+
blr\n\
203+
");
202204
}
203205

204206
#endif/* __powerpc__ */
@@ -222,7 +224,8 @@ tas:\n\
222224
j$31\n\
223225
fail:\n\
224226
li$2, 1\n\
225-
j $31");
227+
j $31\n\
228+
");
226229
}
227230

228231
#endif/* __mips__ */

‎src/include/storage/s_lock.h

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.83 2001/01/1920:39:16 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.84 2001/01/1921:09:57 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -103,12 +103,12 @@ extern void s_lock_sleep(unsigned spins, int microsec,
103103
* Standard _asm format:
104104
*
105105
*__asm__ __volatile__(
106-
*"command\n"
107-
*"command\n"
108-
*"command\n"
109-
*:"=r"(_res)return value, in register
110-
*:"r"(lock)argument, 'lock pointer', in register
111-
*:"r0");inline code uses this register
106+
"command\n"
107+
"command\n"
108+
"command\n"
109+
:"=r"(_res)return value, in register
110+
:"r"(lock)argument, 'lock pointer', in register
111+
:"r0");inline code uses this register
112112
*/
113113

114114

@@ -121,10 +121,10 @@ tas(volatile slock_t *lock)
121121
registerslock_t_res=1;
122122

123123
__asm__ __volatile__(
124-
"lock\n"
125-
"xchgb%0,%1\n"
126-
:"=q"(_res),"=m"(*lock)
127-
:"0"(_res));
124+
"lock\n"
125+
"xchgb%0,%1\n"
126+
:"=q"(_res),"=m"(*lock)
127+
:"0"(_res));
128128
return (int)_res;
129129
}
130130

@@ -140,10 +140,10 @@ tas(volatile slock_t *lock)
140140
longintret;
141141

142142
__asm__ __volatile__(
143-
"xchg4 %0=%1,%2\n"
144-
:"=r"(ret),"=m"(*lock)
145-
:"r"(1),"1"(*lock)
146-
:"memory");
143+
"xchg4 %0=%1,%2\n"
144+
:"=r"(ret),"=m"(*lock)
145+
:"r"(1),"1"(*lock)
146+
:"memory");
147147

148148
return (int)ret;
149149
}
@@ -160,9 +160,9 @@ tas(volatile slock_t *lock)
160160
registerslock_t_res=1;
161161

162162
__asm__ __volatile__(
163-
"swpb %0, %0, [%3]\n"
164-
:"=r"(_res),"=m"(*lock)
165-
:"0"(_res),"r"(lock));
163+
"swpb %0, %0, [%3]\n"
164+
:"=r"(_res),"=m"(*lock)
165+
:"0"(_res),"r"(lock));
166166
return (int)_res;
167167
}
168168

@@ -180,14 +180,14 @@ tas(volatile slock_t *lock)
180180
int_res;
181181

182182
__asm____volatile__(
183-
"la1,1\n"
184-
"l 2,%2\n"
185-
"slr 0,0\n"
186-
"cs 0,1,0(2)\n"
187-
"lr %1,0\n"
188-
:"=m"(lock),"=d"(_res)
189-
:"m"(lock)
190-
:"0","1","2");
183+
"la1,1\n"
184+
"l2,%2\n"
185+
"slr0,0\n"
186+
"cs0,1,0(2)\n"
187+
"lr%1,0\n"
188+
:"=m"(lock),"=d"(_res)
189+
:"m"(lock)
190+
:"0","1","2");
191191

192192
return (_res);
193193
}
@@ -204,9 +204,9 @@ tas(volatile slock_t *lock)
204204
registerslock_t_res=1;
205205

206206
__asm__ __volatile__(
207-
"ldstub[%2], %0\n"
208-
:"=r"(_res),"=m"(*lock)
209-
:"r"(lock));
207+
"ldstub[%2], %0\n"
208+
:"=r"(_res),"=m"(*lock)
209+
:"r"(lock));
210210
return (int)_res;
211211
}
212212

@@ -222,11 +222,11 @@ tas(volatile slock_t *lock)
222222
registerintrv;
223223

224224
__asm____volatile__(
225-
"tas%1\n"
226-
"sne%0\n"
227-
:"=d"(rv),"=m"(*lock)
228-
:"1"(*lock)
229-
:"cc");
225+
"tas%1\n"
226+
"sne%0\n"
227+
:"=d"(rv),"=m"(*lock)
228+
:"1"(*lock)
229+
:"cc");
230230

231231
returnrv;
232232
}
@@ -249,13 +249,13 @@ tas(volatile slock_t *lock)
249249
register_res;
250250

251251
__asm__ __volatile__(
252-
"movl $1, r0\n"
253-
"bbssi$0, (%1), 1f\n"
254-
"clrlr0\n"
255-
"1: movl r0, %0\n"
256-
:"=r"(_res)
257-
:"r"(lock)
258-
:"r0");
252+
"movl $1, r0\n"
253+
"bbssi$0, (%1), 1f\n"
254+
"clrlr0\n"
255+
"1: movl r0, %0\n"
256+
:"=r"(_res)
257+
:"r"(lock)
258+
:"r0");
259259
return (int)_res;
260260
}
261261

@@ -271,9 +271,9 @@ tas(volatile slock_t *lock)
271271
register_res;
272272

273273
__asm__ __volatile__(
274-
"sbitb0, %0\n"
275-
"sfsd%1\n"
276-
:"=m"(*lock),"=r"(_res));
274+
"sbitb0, %0\n"
275+
"sfsd%1\n"
276+
:"=m"(*lock),"=r"(_res));
277277
return (int)_res;
278278
}
279279

@@ -339,20 +339,20 @@ tas(volatile slock_t *lock)
339339
registerslock_t_res;
340340

341341
__asm____volatile__(
342-
"ldq$0, %0\n"
343-
"bne$0, 2f\n"
344-
"ldq_l%1, %0\n"
345-
"bne%1, 2f\n"
346-
"mov1, $0\n"
347-
"stq_c$0, %0\n"
348-
"beq$0, 2f\n"
349-
"mb\n"
350-
"br 3f\n"
351-
"2: mov 1, %1\n"
352-
"3:"
353-
:"=m"(*lock),"=r"(_res)
354-
:
355-
:"0");
342+
"ldq$0, %0\n"
343+
"bne$0, 2f\n"
344+
"ldq_l%1, %0\n"
345+
"bne%1, 2f\n"
346+
"mov1, $0\n"
347+
"stq_c$0, %0\n"
348+
"beq$0, 2f\n"
349+
"mb\n"
350+
"br3f\n"
351+
"2: mov 1, %1\n"
352+
"3:\n"
353+
:"=m"(*lock),"=r"(_res)
354+
:
355+
:"0");
356356

357357
return (int)_res;
358358
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp