This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] #13594: Avoid race in nscd
> +/* Try acquiring lock for mapptr, return 1 if not possible. */
> +extern int __nscd_acquire_maplock (struct locked_map_ptr *mapptr) attribute_hidden;
Line too long. Put attribute_hidden on the next line, indented two spaces.
If its return value is only 0 or 1, make it bool.
I had in mind an inline function so as not to perturb the performance
characteristics of the hot case. Probably that level of micro-optimization
does not really matter. (If it does, probably the best is to have the
initial cmpxchg inlined and the cold case loop in an uninlined function.)
But I'd like an opinion from someone who knows nscd better than I do.
Thanks,
Roland