Re: Proposal: Add a callback data parameter to GetNamedDSMSegment - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: Proposal: Add a callback data parameter to GetNamedDSMSegment
Date
Msg-id CAA5RZ0uLQCK3A13TVEUf3M_Xbg9G=z6vBp3egw1QnPdZFOVkEQ@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Add a callback data parameter to GetNamedDSMSegment  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Proposal: Add a callback data parameter to GetNamedDSMSegment
List pgsql-hackers
> > [...]
> > -       LWLockInitialize(&dsm->lck, LWLockNewTrancheId("test_dsm_registry"));
> > +       LWLockInitialize(&dsm->lck, LWLockNewTrancheId((char *) arg));
> >         dsm->val = 0;
> > [...]
> >
> > instead of creating a new test? For the other GetNamedDSMSegment calls,
> > I'll pass NULL to the void * and hard code the tranche name in the init
> > callback.
>
> I think we should verify the pointer value more directly.  For example, we
> could pass something like (uintptr_t) 0x12345 via the callback argument and
> then verify it's the same in the callback.

This is better than what I had earlier where I was testing that a string
was passed correctly. See v6.

--
Sami Imseih
Amazon Web Services(AWS)

Attachment

pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments
Next
From: Manni Wood
Date:
Subject: Re: Speed up COPY FROM text/CSV parsing using SIMD