lkml.org 
[lkml]   [2020]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracepoint: Do not fail unregistering a probe due to memory allocation
On Tue, 17 Nov 2020 16:22:23 -0500 (EST)
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:

> If we don't call the stub, then there is no point in having the stub at
> all, and we should just compare to a constant value, e.g. 0x1UL. As far
> as I can recall, comparing with a small immediate constant is more efficient
> than comparing with a loaded value on many architectures.

Why 0x1UL, and not just set it to NULL.

do { \
it_func = (it_func_ptr)->func; \
__data = (it_func_ptr)->data; \
if (likely(it_func)) \
((void(*)(void *, proto))(it_func))(__data, args); \
} while ((++it_func_ptr)->func);


-- Steve

\
 
 \ /
  Last update: 2020-11-17 23:21    [W:0.180 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site