File: rtl_sync.h

package info (click to toggle)
rtlinux 3.1pre3-3
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 4,896 kB
  • ctags: 4,228
  • sloc: ansic: 26,204; sh: 2,069; makefile: 1,414; perl: 855; tcl: 489; asm: 380; cpp: 42
file content (21 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Copyright (C) 1999 FSM Labs (http://www.fsmlabs.com/)
 *  Written by Cort Dougan <cort@fsmlabs.com>
 *
 */
#ifndef __ARCH_RTL_SYNC__
#define __ARCH_RTL_SYNC__

#include <linux/irq.h>
#include <asm/system.h>
#include <asm/hw_irq.h>

typedef unsigned long rtl_irqstate_t;

#define __rtl_hard_cli() ((void) swpipl(IPL_MAX))
#define __rtl_hard_sti() ((void) swpipl(/*IPL_MIN*/0))
#define __rtl_hard_save_flags(x) ((x) = rdps())
#define __rtl_hard_restore_flags(x) ((void) swpipl(x))
#define __rtl_hard_savef_and_cli(x) \
	do { rtl_hard_save_flags(x); rtl_hard_cli(); } while(0);
#endif