Skip to contentSkip to conversation

porting to ia64

DISCUSSION Eric Desjardins 3 participants 3 messages Feb 9, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I'm not to familiar with kernel code but I'm trying to port a kernel driver from x86 to ia64.

I was just wondering how should I translate that:

static int interrupts_blocked()
{
unsigned long flags = 0;

   __save_flags(flags);

return (flags & X86_EFLAGS_IF) =
0;
}

Thanks for any help I can get...

Signature · 1 line
Eric Desjardins <[email protected]>
#1 lore raw
Quoted 1 line

return (flags & X86_EFLAGS_IF)

I suspect that "irqs_disabled()" does what you want (and is portable between x86, ia64 and others).

-Tony

#2 lore raw
In reply to Eric Desjardins
Quoted 11 lines · Eric Desjardins

Hi,

I'm not to familiar with kernel code but I'm trying to port a kernel driver from x86 to ia64.

I was just wondering how should I translate that:

static int interrupts_blocked()
{
unsigned long flags = 0;

Quoted 5 lines
  __save_flags(flags);

return (flags & X86_EFLAGS_IF) =
0;
}

if (irqs_disabled()) { ... } works on all platforms. Your driver does not need to define its own function.