lkml.org 
[lkml]   [2015]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 tip 3/8] tracing: allow BPF programs to call bpf_ktime_get_ns()
On 3/19/15 8:11 AM, Steven Rostedt wrote:
> On Mon, 16 Mar 2015 14:49:39 -0700
> Alexei Starovoitov <ast@plumgrid.com> wrote:
>
>> bpf_ktime_get_ns() is used by programs to compue time delta between events
>
> "compute"

ok :)

>> + [BPF_FUNC_ktime_get_ns] = {
>> + .func = bpf_ktime_get_ns,
>> + .gpl_only = true,
>> + .ret_type = RET_INTEGER,
>
> Hmm, a nanosecond value returned as integer? Is there a way to make
> this a 64 bit return type, or is RET_INTEGER default to 64 bits in BPF
> functions?

RET_INTEGER doesn't mean C 'int' width. It means non-pointer and
non-void value. The return value is always promoted to full
register width which is 64-bit.




\
 
 \ /
  Last update: 2015-03-19 17:01    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog