[BACK]Return to irqflags.h CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / arch / sh / include / asm

File: [Development] / linux-2.6-xfs / arch / sh / include / asm / irqflags.h (download)

Revision 1.1, Fri Oct 3 17:46:45 2008 UTC (9 years ago) by lachlan.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD

Merge up to 2.6.27-rc8
Merge of 2.6.x-xfs-melb:linux:32254b by kenmcd.

#ifndef __ASM_SH_IRQFLAGS_H
#define __ASM_SH_IRQFLAGS_H

#ifdef CONFIG_SUPERH32
#include "irqflags_32.h"
#else
#include "irqflags_64.h"
#endif

#define raw_local_save_flags(flags) \
		do { (flags) = __raw_local_save_flags(); } while (0)

static inline int raw_irqs_disabled_flags(unsigned long flags)
{
	return (flags != 0);
}

static inline int raw_irqs_disabled(void)
{
	unsigned long flags = __raw_local_save_flags();

	return raw_irqs_disabled_flags(flags);
}

#define raw_local_irq_save(flags) \
		do { (flags) = __raw_local_irq_save(); } while (0)

static inline void raw_local_irq_restore(unsigned long flags)
{
	if ((flags & 0xf0) != 0xf0)
		raw_local_irq_enable();
}

#endif /* __ASM_SH_IRQFLAGS_H */