File: rtl_sync.h

package info (click to toggle)
rtlinux 2.0rel-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,068 kB
  • ctags: 1,178
  • sloc: ansic: 7,169; makefile: 779; sh: 89
file content (18 lines) | stat: -rw-r--r-- 448 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef __RTL_SYNC__
#define __RTL_SYNC__

#include <asm/rtl_sync.h>


#define rtl_spin_lock_irqsave(x, flags) \
	do { rtl_no_interrupts(flags); rtl_spin_lock(x); } while (0)
#define rtl_spin_unlock_irqrestore(x, flags) \
	do { rtl_spin_unlock(x); rtl_restore_interrupts(flags); } while (0)


#define rtl_critical(f) {rtl_spin_lock_irqsave(&RTL_SPIN_LOCK, f);}
#define rtl_end_critical(f) {rtl_spin_unlock_irqrestore(&RTL_SPIN_LOCK, f);}


#endif