commit | ceffd17f52b6b1aa481365fc6f9b88e8efc436e8 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Sat Jul 09 14:09:35 2022 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Fri Jul 15 20:16:30 2022 +0200 |
tree | 034e4ceaea66e2ad1fa3104dce11c7d47f88d417 | |
parent | 080373ea3896781963f647fd1dcea30ab46fa50f [diff] |
MINOR: fd: add fd_get_running() to atomically return the running mask The running mask is only valid if the tgid is the expected one. This function takes a reference on the tgid before reading the running mask, so that both are checked at once. It returns either the mask or zero if the tgid differs, thus providing a simple way for a caller to check if it still holds the FD.