1 #ifndef _WRAPPER_H_ 2 #define _WRAPPER_H_ 3 #define wait_handle struct wait_queue 4 #define file_handle struct file 5 #define inode_handle struct inode 6 #define select_table_handle select_table 7 #define vm_area_handle struct vm_area_struct 8 #define file_operation_handle file_operations 9 10 #define connect_wrapper(x) 0 11 #define current_got_fatal_signal() (current->signal & ~current->blocked) 12 #define current_set_timeout(val) current->timeout = val 13 14 #define module_interruptible_sleep_on interruptible_sleep_on 15 #define module_wake_up wake_up 16 #define module_select_wait select_wait 17 #define module_register_chrdev register_chrdev 18 #define module_unregister_chrdev unregister_chrdev 19 #define module_register_blkdev register_blkdev 20 #define module_unregister_blkdev unregister_blkdev 21 22 #define inode_get_rdev(i) i->i_rdev 23 #define inode_get_count(i) i->i_count 24 #define inode_inc_count(i) i->i_count++ 25 #define inode_dec_count(i) i->i_count-- 26 27 #define file_get_flags(f) f->f_flags 28 29 #define vma_set_inode(v,i) v->vm_inode = i 30 #define vma_get_flags(v) v->vm_flags 31 #define vma_get_offset(v) v->vm_offset 32 #define vma_get_start(v) v->vm_start 33 #define vma_get_end(v) v->vm_end 34 #define vma_get_page_prot(v) v->vm_page_prot 35 36 #define mem_map_reserve(p) mem_map[p].reserved = 1 37 #define mem_map_unreserve(p) mem_map[p].reserved = 0 38 #define mem_map_inc_count(p) mem_map[p].count++ 39 #define mem_map_dec_count(p) mem_map[p].count-- 40 #endif