lkml.org 
[lkml]   [2016]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v7 1/7] Restartable sequences system call
On Wed, Aug 10, 2016 at 01:26:04PM +0000, Mathieu Desnoyers wrote:

> static bool rseq_update_cpu_id_event_counter(struct task_struct *t)
> {
> union rseq_cpu_event u;
>
> u.e.cpu_id = raw_smp_processor_id();
> u.e.event_counter = ++t->rseq_event_counter;
> if (__put_user(u.v, &t->rseq->u.v))
> return false;
> trace_rseq_inc(t->rseq_event_counter);

I had not previously noticed the trace_* muck, but I would suggest
passing in t and leaving it up to the tracepoint implementation to pick
out the value.

Also, since this not only increments (it also updates the cpu number)
the naming is 'wrong'.

> return true;
> }

\
 
 \ /
  Last update: 2016-08-10 21:41    [W:0.145 / U:1.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site