pgsql: Declare lwlock.c's LWLockAcquireCommon() as a static inline.

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Declare lwlock.c's LWLockAcquireCommon() as a static inline.
Дата
Msg-id E1XODRK-0005rs-S6@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Declare lwlock.c's LWLockAcquireCommon() as a static inline.

68a2e52bbaf98f136 has introduced LWLockAcquireCommon() containing the
previous contents of LWLockAcquire() plus added functionality. The
latter then calls it, just like LWLockAcquireWithVar(). Because the
majority of callers don't need the added functionality, declare the
common code as inline. The compiler then can optimize away the unused
code. Doing so is also useful when looking at profiles, to
differentiate the users.

Backpatch to 9.4, the first branch to contain LWLockAcquireCommon().

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9c4b55db1dc901dc184b1b3ab9cca3f2089ec311

Modified Files
--------------
src/backend/storage/lmgr/lwlock.c |    6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Protect definition of SpinlockSemaArray, just like its declarati
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Declare lwlock.c's LWLockAcquireCommon() as a static inline.