summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2021-07-02 16:48:22 +0530
committerAlexei Starovoitov <ast@kernel.org>2021-07-07 20:01:45 -0700
commitcb0f80039fb7ec9981a74d22019daaa85ff51a3d (patch)
tree4a723ac4dfa94fb5af8474bb084e9f997559d805 /kernel
parentfe21cb91ae7bca1ae7805454be80b6d03bec85f7 (diff)
bitops: Add non-atomic bitops for pointers
cpumap needs to set, clear, and test the lowest bit in skb pointer in various places. To make these checks less noisy, add pointer friendly bitop macros that also do some typechecking to sanitize the argument. These wrap the non-atomic bitops __set_bit, __clear_bit, and test_bit but for pointer arguments. Pointer's address has to be passed in and it is treated as an unsigned long *, since width and representation of pointer and unsigned long match on targets Linux supports. They are prefixed with double underscore to indicate lack of atomicity. Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://lore.kernel.org/bpf/20210702111825.491065-3-memxor@gmail.com
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions