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

Commit6cfd508

Browse files
committed
Blindly try to fix a warning in s_lock.h when compiling with gcc on HPPA.
The possibly, depending on compiler settings, generated warning was"warning: `S_UNLOCK' redefined".The hppa spinlock implementation doesn't follow the rules of s_lock.hand provides a gcc specific implementation outside of the the part ofthe file that's supposed to do that. It does so to avoid duplicationbetween the HP compiler and gcc. That unfortunately means thatS_UNLOCK is already defined when the HPPA specific section is reached.Undefine the generic fallback S_UNLOCK definition inside the HPPAsection. That's far from pretty, but has the big advantage of beingsimple. If somebody is interested to fix this in a prettier way...This presumably got broken in the course of0709b7e.Discussion: 20150114225919.GY5245@awork2.anarazel.dePer complaint from Tom Lane.
1 parent73a8f51 commit6cfd508

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎src/include/storage/s_lock.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,15 @@ tas(volatile slock_t *lock)
752752
return (lockval==0);
753753
}
754754

755+
/*
756+
* The hppa implementation doesn't follow the rules of this files and provides
757+
* a gcc specific implementation outside of the above defined(__GNUC__). It
758+
* does so to avoid duplication between the HP compiler and gcc. So undefine
759+
* the generic fallback S_UNLOCK from above.
760+
*/
761+
#ifdefS_UNLOCK
762+
#undef S_UNLOCK
763+
#endif
755764
#defineS_UNLOCK(lock)\
756765
do { \
757766
__asm__ __volatile__("" : : : "memory"); \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp