fd: use atomic_load_ptr instead of hand-rolled cast through volatile

No change in assembly.
This commit is contained in:
Mateusz Guzik 2020-02-02 09:37:16 +00:00
parent 6698e11f4b
commit da4f45ea5c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357405

View File

@ -2737,8 +2737,7 @@ fget_unlocked(struct filedesc *fdp, int fd, cap_rights_t *needrightsp,
* table before this fd was closed, so it possible that
* there is a stale fp pointer in cached version.
*/
fdt = *(const struct fdescenttbl * const volatile *)
&(fdp->fd_files);
fdt = (struct fdescenttbl *)atomic_load_ptr(&fdp->fd_files);
continue;
}
if (__predict_false(count + 1 < count))