lkml.org 
[lkml]   [2011]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 4/5] RCU: Add TASK_RCU_OFFSET
On Tue, Mar 29, 2011 at 02:32:30PM -0700, H. Peter Anvin wrote:
> On 03/29/2011 02:31 PM, Paul E. McKenney wrote:
> >>
> >> I have to say that if we have to use hardcoded offsets in C then we have
> >> bigger problems.
> >
> > In this case, the offsets are mechanically generated from the structure
> > definitions.
> >
> > Or am I missing your point?
>
> Yes. The point is if we have to pull out these kinds of hacks in *C*
> code, we are doing it wrong. Not just a little wrong, but completely
> and totally bonkers wrong.

OK, maybe we are doing it wrong.

But in that case, how do you suggest restructuring include/linux/sched.h
so that struct task_struct can be safely included everywhere
rcu_read_lock() and friends are invoked? Or, on the other hand,
what should we be doing so that we don't need to include task_struct
everywhere?

Thanx, Paul


\
 
 \ /
  Last update: 2011-03-29 23:49    [W:0.148 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site