Re: [LTP] [PATCH 4/4] lib: add tst_res_r.c

chrubis
2014-02-13T10:21:38Z

Hi!
> > This is hardly pefromance critical code so we don't need fine grade
> > locking as this. What we can do in most of the cases is to take the
> > mutext and call the function from tst_res.c, which would lead to much
> > simpler code.
>
> glibc provides pthread mutex lock/unlock stubs, so i wonder if we even need _r
> variants. if the program hasn't linked against -lpthread, then the funcs will
> simply return. if it has, then you get locking.

That sounds interesting. Do you know if this is implemented in uClibc
(and possibly in other alternative libc libraries) too?

--
Cyril Hrubis
chrubis@suse.cz