lkml.org 
[lkml]   [2006]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 15/35] subarch support for controlling interrupt delivery
Christian Limpach wrote:
> On Tue, May 09, 2006 at 07:49:42AM -0700, Martin J. Bligh wrote:
>
>>>+#define __cli() \
>>>+do { \
>>>+ struct vcpu_info *_vcpu; \
>>>+ preempt_disable(); \
>>>+ _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; \
>>>+ _vcpu->evtchn_upcall_mask = 1; \
>>>+ preempt_enable_no_resched(); \
>>>+ barrier(); \
>>>+} while (0)
>>
>>Should be a real function
>
>
> Yes, except it's not trivially done because if __cli was an inline
> function, you need to have everything that is used in the declaration
> defined when the function is declared as opposed to when the #define
> gets used. I'll give it another try, but it very quickly becomes
> #include hell.
>
> Anybody want to comment on the performance impact of making
> local_irq_* non-inline functions?

I wasn't concerned with inline vs non-inline - that's your choice.
Just the inherent foulness of multi-line macros ;-)

M.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-09 18:04    [W:0.152 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site