Re: [PATCH] Refactoring of LWLock tranches

Поиск
Список
Период
Сортировка
От Jesper Pedersen
Тема Re: [PATCH] Refactoring of LWLock tranches
Дата
Msg-id 568BCB0E.4030104@redhat.com
обсуждение исходный текст
Ответ на Re: [PATCH] Refactoring of LWLock tranches  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: [PATCH] Refactoring of LWLock tranches  (Robert Haas <robertmhaas@gmail.com>)
Re: [PATCH] Refactoring of LWLock tranches  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On 01/05/2016 08:04 AM, Amit Kapila wrote:
> I am not aware of such cases, however the reason I have kept it was for
> backward-compatability, but now I have removed it in the attached patch.
>
> Apart from that, I have updated the docs to reflect the changes related
> to new API's.
>

xfunc.sgml:

+                after allocating LWLocks, verify that the number of 
allocated
+                LWLocks is same as requested;

Did you mean to put this check in ?

lwlock.c:

+ * GetLWLockAddinTranche - returns the base address of LWLock from the
+ *        specified tranche.
+ *
+ * Caller needs to retrieve the requested number of LWLocks starting from
+ * the base lock address returned by this API.  This can be used for
+ * tranches that are requested by using RequestAddinLWLockTranche() API.
+ */
+LWLockPadded *
+GetLWLockAddinTranche(const char *tranche_name)
+{

I understand why the signature is the way it is, but

LWLock *
GetLWLockAddinTranche(const char *tranche_name)

would be nicer to work with for extensions IMHO. Not likely worth the 
trouble though.

Thanks for working on this.

Best regards, Jesper




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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [PATCH] Refactoring of LWLock tranches
Следующее
От: Chapman Flack
Дата:
Сообщение: Re: dynloader.h missing in prebuilt package for Windows?