On Wed, 08/15 00:53, Emilio G. Cota wrote:
> > > +#define QSP_GEN_VOID(type_, qsp_t_, func_, impl_) \
> > > + void func_(type_ *obj, const char *file, unsigned line) \
> > > + { \
> > > + struct qsp_entry *e = qsp_entry_get(obj, file, line, qsp_t_); \
> > > + int64_t t; \
> > > + \
> >
> > No qsp_init()?
> >
> > > + t = get_clock(); \
> > > + impl_(obj, file, line); \
> > > + atomic_set(&e->ns, e->ns + get_clock() - t); \
> > > + atomic_set(&e->n_acqs, e->n_acqs + 1); \
> > > + }
> > > +
> > > +#define QSP_GEN_RET1(type_, qsp_t_, func_, impl_) \
> > > + int func_(type_ *obj, const char *file, unsigned line) \
> > > + { \
> > > + struct qsp_entry *e = qsp_entry_get(obj, file, line, qsp_t_); \
> > > + int64_t t; \
> > > + int err; \
> > > + \
> >
> > Same here.
>
> qsp_init is called by qsp_get_entry.
Oh yes, I missed it. Then you can remove the one in qsp_cond_wait() as well for
consistency. (That's where I noticed this).
Fam