Closed radosroka closed 4 months ago
The patch seems to get rid of the race being detected with helgrind. But, in the fd_fgets.h file, the access attribute needs its numbers corrected to 2, 3 since the first arg is a pointer to the struct. Also, I'd suggest switching around init and destroy declaration order and then add __attr_dealloc(fd_fgets_destroy, 1) at the end of the init declaration.
LGTM
I think this can be optimized so there will be just one allocation per thread.