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

Commit8496c6c

Browse files
committed
Use 4-byte slock_t on both PPC and PPC64.
Previously we defined slock_t as 8 bytes on PPC64, but the TAS assemblycode uses word-wide operations regardless, so that the second word wasjust wasted space. There doesn't appear to be any performance benefitin adding the second word, so get rid of it to simplify the code.
1 parent5cfa8dd commit8496c6c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎src/include/storage/s_lock.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,10 @@ tas(volatile slock_t *lock)
354354
#if defined(__ppc__)|| defined(__powerpc__)|| defined(__ppc64__)|| defined(__powerpc64__)
355355
#defineHAS_TEST_AND_SET
356356

357-
#if defined(__ppc64__)|| defined(__powerpc64__)
358-
typedefunsigned longslock_t;
359-
#else
360357
typedefunsignedintslock_t;
361-
#endif
362358

363359
#defineTAS(lock) tas(lock)
360+
364361
/*
365362
* NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002,
366363
* an isync is a sufficient synchronization barrier after a lwarx/stwcx loop.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp