lkml.org 
[lkml]   [2020]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND][PATCH v3 06/17] static_call: Add basic static call infrastructure
On Thu, Mar 26, 2020 at 04:42:07PM +0000, Nadav Amit wrote:
> > On Mar 24, 2020, at 6:56 AM, Peter Zijlstra <peterz@infradead.org> wrote:

> > + * API overview:
> > + *
> > + * DECLARE_STATIC_CALL(name, func);
> > + * DEFINE_STATIC_CALL(name, func);
> > + * static_call(name)(args...);
> > + * static_call_update(name, func);
> > + *
> > + * Usage example:
> > + *
> > + * # Start with the following functions (with identical prototypes):
> > + * int func_a(int arg1, int arg2);
> > + * int func_b(int arg1, int arg2);
> > + *
> > + * # Define a 'my_name' reference, associated with func_a() by default
> > + * DEFINE_STATIC_CALL(my_name, func_a);
>
> Do you want to support optional function attributes, such as “pure” and
> “const”?

Do you see a need for that? And what is the syntax for a pointer to a
pure function?

\
 
 \ /
  Last update: 2020-03-26 18:03    [W:0.089 / U:1.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site