ReactOS 0.4.16-dev-336-gb667d82
module.h File Reference
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/rbtree.h>
#include <linux/fs.h>
#include <linux/log2.h>
#include <linux/list.h>
Include dependency graph for module.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _spinlock_t
 
struct  task_struct
 
struct  mutex
 
struct  __wait_queue
 
struct  __wait_queue_head
 
struct  timer_list
 
struct  block_device
 
struct  page
 
struct  buffer_head
 
struct  nls_table
 
struct  kmem_cache
 

Macros

#define _WIN2K_TARGET_   1
 
#define offsetof(type, member)   ((ULONG_PTR)&(((type *)0)->member))
 
#define container_of(ptr, type, member)    ((type *)((char *)ptr - (char *)offsetof(type, member)))
 
#define __swab16(x)   RtlUshortByteSwap(x)
 
#define __swab32(x)   RtlUlongByteSwap(x)
 
#define __swab64(x)   RtlUlonglongByteSwap(x)
 
#define __constant_swab32   __swab32
 
#define __constant_swab64   __swab64
 
#define __constant_htonl(x)   __constant_swab32((x))
 
#define __constant_ntohl(x)   __constant_swab32((x))
 
#define __constant_htons(x)   __constant_swab16((x))
 
#define __constant_ntohs(x)   __constant_swab16((x))
 
#define __constant_cpu_to_le64(x)   ((__u64)(x))
 
#define __constant_le64_to_cpu(x)   ((__u64)(x))
 
#define __constant_cpu_to_le32(x)   ((__u32)(x))
 
#define __constant_le32_to_cpu(x)   ((__u32)(x))
 
#define __constant_cpu_to_le16(x)   ((__u16)(x))
 
#define __constant_le16_to_cpu(x)   ((__u16)(x))
 
#define __constant_cpu_to_be64(x)   __constant_swab64((x))
 
#define __constant_be64_to_cpu(x)   __constant_swab64((x))
 
#define __constant_cpu_to_be32(x)   __constant_swab32((x))
 
#define __constant_be32_to_cpu(x)   __constant_swab32((x))
 
#define __constant_cpu_to_be16(x)   __constant_swab16((x))
 
#define __constant_be16_to_cpu(x)   __constant_swab16((x))
 
#define __cpu_to_le64(x)   ((__u64)(x))
 
#define __le64_to_cpu(x)   ((__u64)(x))
 
#define __cpu_to_le32(x)   ((__u32)(x))
 
#define __le32_to_cpu(x)   ((__u32)(x))
 
#define __cpu_to_le16(x)   ((__u16)(x))
 
#define __le16_to_cpu(x)   ((__u16)(x))
 
#define __cpu_to_be64(x)   __swab64((x))
 
#define __be64_to_cpu(x)   __swab64((x))
 
#define __cpu_to_be32(x)   __swab32((x))
 
#define __be32_to_cpu(x)   __swab32((x))
 
#define __cpu_to_be16(x)   __swab16((x))
 
#define __be16_to_cpu(x)   __swab16((x))
 
#define __cpu_to_le64p(x)   (*(__u64*)(x))
 
#define __le64_to_cpup(x)   (*(__u64*)(x))
 
#define __cpu_to_le32p(x)   (*(__u32*)(x))
 
#define __le32_to_cpup(x)   (*(__u32*)(x))
 
#define __cpu_to_le16p(x)   (*(__u16*)(x))
 
#define __le16_to_cpup(x)   (*(__u16*)(x))
 
#define __cpu_to_be64p(x)   __swab64p((x))
 
#define __be64_to_cpup(x)   __swab64p((x))
 
#define __cpu_to_be32p(x)   __swab32p((x))
 
#define __be32_to_cpup(x)   __swab32p((x))
 
#define __cpu_to_be16p(x)   __swab16p((x))
 
#define __be16_to_cpup(x)   __swab16p((x))
 
#define __cpu_to_le64s(x)   ((__s64)(x))
 
#define __le64_to_cpus(x)   ((__s64)(x))
 
#define __cpu_to_le32s(x)   ((__s32)(x))
 
#define __le32_to_cpus(x)   ((__s32)(x))
 
#define __cpu_to_le16s(x)   ((__s16)(x))
 
#define __le16_to_cpus(x)   ((__s16)(x))
 
#define __cpu_to_be64s(x)   __swab64s((x))
 
#define __be64_to_cpus(x)   __swab64s((x))
 
#define __cpu_to_be32s(x)   __swab32s((x))
 
#define __be32_to_cpus(x)   __swab32s((x))
 
#define __cpu_to_be16s(x)   __swab16s((x))
 
#define __be16_to_cpus(x)   __swab16s((x))
 
#define cpu_to_le64   __cpu_to_le64
 
#define le64_to_cpu   __le64_to_cpu
 
#define cpu_to_le32   __cpu_to_le32
 
#define le32_to_cpu   __le32_to_cpu
 
#define cpu_to_le16   __cpu_to_le16
 
#define le16_to_cpu   __le16_to_cpu
 
#define cpu_to_be64   __cpu_to_be64
 
#define be64_to_cpu   __be64_to_cpu
 
#define cpu_to_be32   __cpu_to_be32
 
#define be32_to_cpu   __be32_to_cpu
 
#define cpu_to_be16   __cpu_to_be16
 
#define be16_to_cpu   __be16_to_cpu
 
#define cpu_to_le64p   __cpu_to_le64p
 
#define le64_to_cpup   __le64_to_cpup
 
#define cpu_to_le32p   __cpu_to_le32p
 
#define le32_to_cpup   __le32_to_cpup
 
#define cpu_to_le16p   __cpu_to_le16p
 
#define le16_to_cpup   __le16_to_cpup
 
#define cpu_to_be64p   __cpu_to_be64p
 
#define be64_to_cpup   __be64_to_cpup
 
#define cpu_to_be32p   __cpu_to_be32p
 
#define be32_to_cpup   __be32_to_cpup
 
#define cpu_to_be16p   __cpu_to_be16p
 
#define be16_to_cpup   __be16_to_cpup
 
#define cpu_to_le64s   __cpu_to_le64s
 
#define le64_to_cpus   __le64_to_cpus
 
#define cpu_to_le32s   __cpu_to_le32s
 
#define le32_to_cpus   __le32_to_cpus
 
#define cpu_to_le16s   __cpu_to_le16s
 
#define le16_to_cpus   __le16_to_cpus
 
#define cpu_to_be64s   __cpu_to_be64s
 
#define be64_to_cpus   __be64_to_cpus
 
#define cpu_to_be32s   __cpu_to_be32s
 
#define be32_to_cpus   __be32_to_cpus
 
#define cpu_to_be16s   __cpu_to_be16s
 
#define be16_to_cpus   __be16_to_cpus
 
#define ntohl(x)
 
#define ntohs(x)
 
#define htonl(x)   ntohl(x)
 
#define htons(x)   ntohs(x)
 
#define KERN_EMERG   "<0>" /* system is unusable */
 
#define KERN_ALERT   "<1>" /* action must be taken immediately */
 
#define KERN_CRIT   "<2>" /* critical conditions */
 
#define KERN_ERR   "<3>" /* error conditions */
 
#define KERN_WARNING   "<4>" /* warning conditions */
 
#define KERN_NOTICE   "<5>" /* normal but significant condition */
 
#define KERN_INFO   "<6>" /* informational */
 
#define KERN_DEBUG   "<7>" /* debug-level messages */
 
#define printk   DbgPrint
 
#define MAX_ERRNO   4095
 
#define IS_ERR_VALUE(x)   ((x) >= (unsigned long)-MAX_ERRNO)
 
#define BUG_ON(c)   assert(!(c))
 
#define WARN_ON(c)   BUG_ON(c)
 
#define likely
 
#define unlikely
 
#define __init
 
#define __exit
 
#define THIS_MODULE   NULL
 
#define MODULE_LICENSE(x)
 
#define MODULE_ALIAS_NLS(x)
 
#define EXPORT_SYMBOL(x)
 
#define try_module_get(x)   (TRUE)
 
#define module_put(x)
 
#define module_init(X)   int __init module_##X() {return X();}
 
#define module_exit(X)   void __exit module_##X() {X();}
 
#define DECLARE_INIT(X)   int __init module_##X(void)
 
#define DECLARE_EXIT(X)   void __exit module_##X(void)
 
#define LOAD_MODULE(X)
 
#define UNLOAD_MODULE(X)
 
#define LOAD_NLS   LOAD_MODULE
 
#define UNLOAD_NLS   UNLOAD_MODULE
 
#define spin_lock_init(sl)   KeInitializeSpinLock(&((sl)->lock))
 
#define spin_lock(sl)   KeAcquireSpinLock(&((sl)->lock), &((sl)->irql))
 
#define spin_unlock(sl)   KeReleaseSpinLock(&((sl)->lock), (sl)->irql)
 
#define spin_lock_irqsave(sl, flags)   do {spin_lock(sl); flags=(sl)->irql;} while(0)
 
#define spin_unlock_irqrestore(sl, flags)   do {ASSERT((KIRQL)(flags)==(sl)->irql); spin_unlock(sl);} while(0)
 
#define assert_spin_locked(x)   do {} while(0)
 
#define TASK_INTERRUPTIBLE   1
 
#define TASK_UNINTERRUPTIBLE   2
 
#define yield()   do {} while(0)
 
#define might_sleep()   do {} while(0)
 
#define mutex_init(x)   ExInitializeFastMutex(&((x)->lock))
 
#define mutex_lock(x)   ExAcquireFastMutex(&((x)->lock))
 
#define mutex_unlock(x)   ExReleaseFastMutex(&((x)->lock))
 
#define WQ_FLAG_EXCLUSIVE   0x01
 
#define WQ_FLAG_AUTO_REMOVAL   0x02
 
#define DEFINE_WAIT(name)    wait_queue_t name = (PVOID)wait_queue_create();
 
#define is_sync_wait(wait)   (TRUE)
 
#define set_current_state(state)   do {} while(0)
 
#define __set_current_state(state)   do {} while(0)
 
#define page_address(_page)   ((char*)_page + sizeof(struct page))
 
#define get_page(p)   atomic_inc(&(p)->count)
 
#define PG_locked   0 /* Page is locked. Don't touch. */
 
#define PG_error   1
 
#define PG_referenced   2
 
#define PG_uptodate   3
 
#define PG_dirty   4
 
#define PG_unused   5
 
#define PG_lru   6
 
#define PG_active   7
 
#define PG_slab   8
 
#define PG_skip   10
 
#define PG_highmem   11
 
#define PG_checked   12 /* kill me in 2.5.<early>. */
 
#define PG_arch_1   13
 
#define PG_reserved   14
 
#define PG_launder   15 /* written out by VM pressure.. */
 
#define PG_fs_1   16 /* Filesystem specific */
 
#define arch_set_page_uptodate(page)
 
#define UnlockPage(page)   unlock_page(page)
 
#define Page_Uptodate(page)   test_bit(PG_uptodate, &(page)->flags)
 
#define SetPageUptodate(page)
 
#define ClearPageUptodate(page)   clear_bit(PG_uptodate, &(page)->flags)
 
#define PageDirty(page)   test_bit(PG_dirty, &(page)->flags)
 
#define SetPageDirty(page)   set_bit(PG_dirty, &(page)->flags)
 
#define ClearPageDirty(page)   clear_bit(PG_dirty, &(page)->flags)
 
#define PageLocked(page)   test_bit(PG_locked, &(page)->flags)
 
#define LockPage(page)   set_bit(PG_locked, &(page)->flags)
 
#define TryLockPage(page)   test_and_set_bit(PG_locked, &(page)->flags)
 
#define PageChecked(page)   test_bit(PG_checked, &(page)->flags)
 
#define SetPageChecked(page)   set_bit(PG_checked, &(page)->flags)
 
#define ClearPageChecked(page)   clear_bit(PG_checked, &(page)->flags)
 
#define PageLaunder(page)   test_bit(PG_launder, &(page)->flags)
 
#define SetPageLaunder(page)   set_bit(PG_launder, &(page)->flags)
 
#define ClearPageLaunder(page)   clear_bit(PG_launder, &(page)->flags)
 
#define ClearPageArch1(page)   clear_bit(PG_arch_1, &(page)->flags)
 
#define PageError(page)   test_bit(PG_error, &(page)->flags)
 
#define SetPageError(page)   set_bit(PG_error, &(page)->flags)
 
#define ClearPageError(page)   clear_bit(PG_error, &(page)->flags)
 
#define PageReferenced(page)   test_bit(PG_referenced, &(page)->flags)
 
#define SetPageReferenced(page)   set_bit(PG_referenced, &(page)->flags)
 
#define ClearPageReferenced(page)   clear_bit(PG_referenced, &(page)->flags)
 
#define PageActive(page)   test_bit(PG_active, &(page)->flags)
 
#define SetPageActive(page)   set_bit(PG_active, &(page)->flags)
 
#define ClearPageActive(page)   clear_bit(PG_active, &(page)->flags)
 
#define __get_free_page(gfp_mask)    __get_free_pages((gfp_mask),0)
 
#define __free_page(page)   __free_pages((page), 0)
 
#define free_page(addr)   free_pages((addr),0)
 
#define __GFP_HIGHMEM   0x02
 
#define __GFP_WAIT   0x10 /* Can wait and reschedule? */
 
#define __GFP_HIGH   0x20 /* Should access emergency pools? */
 
#define __GFP_IO   0x40 /* Can start low memory physical IO? */
 
#define __GFP_HIGHIO   0x80 /* Can start high mem physical IO? */
 
#define __GFP_FS   0x100 /* Can call down to low-level FS? */
 
#define GFP_ATOMIC   (__GFP_HIGH)
 
#define GFP_USER   ( __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS)
 
#define GFP_HIGHUSER   ( __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS | __GFP_HIGHMEM)
 
#define GFP_KERNEL   (__GFP_HIGH | __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS)
 
#define GFP_NOFS   0
 
#define __GFP_NOFAIL   0
 
#define KM_USER0   0
 
#define PAGE_CACHE_SIZE   (PAGE_SIZE)
 
#define PAGE_CACHE_SHIFT   (12)
 
#define MAX_BUF_PER_PAGE   (PAGE_CACHE_SIZE / 512)
 
#define BUFFER_FNS(bit, name)
 
#define TAS_BUFFER_FNS(bit, name)
 
#define bh_offset(bh)   ((unsigned long)(bh)->b_data & ~PAGE_MASK)
 
#define touch_buffer(bh)   mark_page_accessed(bh->b_page)
 
#define page_buffers(page)
 
#define page_has_buffers(page)   PagePrivate(page)
 
#define NLS_MAX_CHARSET_SIZE   6 /* for UTF-8 */
 
#define HZ   (100)
 
#define jiffies   JIFFIES()
 
#define ExFreePoolWithTag(_P, _T)   ExFreePool(_P)
 
#define kmalloc(size, gfp)   Ext2AllocatePool(NonPagedPool, size, 'JBDM')
 
#define kfree(p)   Ext2FreePool(p, 'JBDM')
 
#define SLAB_HWCACHE_ALIGN   0x00002000U /* align objs on a h/w cache lines */
 
#define SLAB_KERNEL   0x00000001U
 
#define SLAB_TEMPORARY   0x00000002U
 
#define BDEVNAME_SIZE   32 /* Largest string for a blockdev identifier */
 
#define RW_MASK   1
 
#define RWA_MASK   2
 
#define READ   0
 
#define WRITE   1
 
#define READA   2 /* read-ahead - don't block if no resources */
 
#define SWRITE   3 /* for ll_rw_block() - wait for buffer lock */
 
#define READ_SYNC   (READ | (1 << BIO_RW_SYNC))
 
#define READ_META   (READ | (1 << BIO_RW_META))
 
#define WRITE_SYNC   (WRITE | (1 << BIO_RW_SYNC))
 
#define WRITE_BARRIER   ((1 << BIO_RW) | (1 << BIO_RW_BARRIER))
 
#define typecheck(x, y)   (TRUE)
 
#define time_after(a, b)
 
#define time_before(a, b)   time_after(b,a)
 
#define time_after_eq(a, b)
 
#define time_before_eq(a, b)   time_after_eq(b,a)
 
#define time_in_range(a, b, c)
 
#define smp_rmb()   do {}while(0)
 
#define do_div(n, b)   do_div64(&(n), (__u64)b)
 

Typedefs

typedef struct _spinlock_t spinlock_t
 
typedef struct mutex mutex_t
 
typedef PVOID wait_queue_t
 
typedef struct __wait_queue_head wait_queue_head_t
 
typedef struct kmem_cache kmem_cache_t
 
typedef struct page mem_map_t
 
typedef void() bh_end_io_t(struct buffer_head *bh, int uptodate)
 
typedef GUID UUID
 
typedef void(* kmem_cache_cb_t) (void *, kmem_cache_t *, unsigned long)
 

Enumerations

enum  bh_state_bits {
  BH_Uptodate , BH_Dirty , BH_Verified , BH_Lock ,
  BH_Req , BH_Uptodate_Lock , BH_Mapped , BH_New ,
  BH_Async_Read , BH_Async_Write , BH_Delay , BH_Boundary ,
  BH_Write_EIO , BH_Ordered , BH_Eopnotsupp , BH_Unwritten ,
  BH_PrivateStart
}
 

Functions

USHORT FASTCALL RtlUshortByteSwap (IN USHORT Source)
 
ULONG FASTCALL RtlUlongByteSwap (IN ULONG Source)
 
ULONGLONG FASTCALL RtlUlonglongByteSwap (IN ULONGLONG Source)
 
static void le16_add_cpu (__le16 *var, u16 val)
 
static void le32_add_cpu (__le32 *var, u32 val)
 
static void le64_add_cpu (__le64 *var, u64 val)
 
static voidERR_PTR (long error)
 
static long PTR_ERR (const void *ptr)
 
static long IS_ERR (const void *ptr)
 
static int spin_needbreak (spinlock_t *lock)
 
static int set_bit (int nr, volatile unsigned long *addr)
 
static int clear_bit (int nr, volatile unsigned long *addr)
 
static int test_and_clear_bit (int nr, volatile unsigned long *addr)
 
static int test_bit (int nr, volatile const unsigned long *addr)
 
static int test_and_set_bit (int nr, volatile unsigned long *addr)
 
static cond_resched ()
 
static need_resched ()
 
void init_waitqueue_head (wait_queue_head_t *q)
 
int wake_up (wait_queue_head_t *queue)
 
struct __wait_queuewait_queue_create ()
 
void wait_queue_destroy (struct __wait_queue *)
 
void prepare_to_wait (wait_queue_head_t *q, wait_queue_t *wait, int state)
 
void prepare_to_wait_exclusive (wait_queue_head_t *q, wait_queue_t *wait, int state)
 
void finish_wait (wait_queue_head_t *q, wait_queue_t *wait)
 
int autoremove_wake_function (wait_queue_t *wait, unsigned mode, int sync, void *key)
 
int wake_bit_function (wait_queue_t *wait, unsigned mode, int sync, void *key)
 
unsigned long __get_free_pages (unsigned int gfp_mask, unsigned int order)
 
void __free_pages (struct page *page, unsigned int order)
 
void free_pages (unsigned long addr, unsigned int order)
 
void truncate_inode_pages (struct address_space *, loff_t)
 
void mark_buffer_dirty (struct buffer_head *bh)
 
void init_buffer (struct buffer_head *, bh_end_io_t *, void *)
 
void set_bh_page (struct buffer_head *bh, struct page *page, unsigned long offset)
 
int try_to_free_buffers (struct page *)
 
struct buffer_headalloc_page_buffers (struct page *page, unsigned long size, int retry)
 
void create_empty_buffers (struct page *, unsigned long, unsigned long b_state)
 
void mark_buffer_dirty_inode (struct buffer_head *bh, struct inode *inode)
 
int inode_has_buffers (struct inode *)
 
void invalidate_inode_buffers (struct inode *)
 
int remove_inode_buffers (struct inode *inode)
 
int sync_mapping_buffers (struct address_space *mapping)
 
void unmap_underlying_metadata (struct block_device *bdev, sector_t block)
 
void mark_buffer_async_write (struct buffer_head *bh)
 
void invalidate_bdev (struct block_device *)
 
int sync_blockdev (struct block_device *bdev)
 
void __wait_on_buffer (struct buffer_head *)
 
wait_queue_head_tbh_waitq_head (struct buffer_head *bh)
 
int fsync_bdev (struct block_device *)
 
struct super_blockfreeze_bdev (struct block_device *)
 
void thaw_bdev (struct block_device *, struct super_block *)
 
int fsync_super (struct super_block *)
 
int fsync_no_super (struct block_device *)
 
struct buffer_head__find_get_block (struct block_device *bdev, sector_t block, unsigned long size)
 
struct buffer_headget_block_bh (struct block_device *bdev, sector_t block, unsigned long size, int zero)
 
struct buffer_head__getblk (struct block_device *bdev, sector_t block, unsigned long size)
 
void __brelse (struct buffer_head *)
 
void __bforget (struct buffer_head *)
 
void __breadahead (struct block_device *, sector_t block, unsigned int size)
 
struct buffer_head__bread (struct block_device *, sector_t block, unsigned size)
 
void invalidate_bh_lrus (void)
 
struct buffer_headalloc_buffer_head (gfp_t gfp_flags)
 
void free_buffer_head (struct buffer_head *bh)
 
void unlock_buffer (struct buffer_head *bh)
 
void __lock_buffer (struct buffer_head *bh)
 
void ll_rw_block (int, int, struct buffer_head *bh[])
 
int sync_dirty_buffer (struct buffer_head *bh)
 
int submit_bh (int, struct buffer_head *)
 
void write_boundary_block (struct block_device *bdev, sector_t bblock, unsigned blocksize)
 
int bh_uptodate_or_lock (struct buffer_head *bh)
 
int bh_submit_read (struct buffer_head *bh)
 
struct buffer_headextents_bread (struct super_block *sb, sector_t block)
 
struct buffer_headextents_bwrite (struct super_block *sb, sector_t block)
 
void extents_mark_buffer_dirty (struct buffer_head *bh)
 
void extents_brelse (struct buffer_head *bh)
 
void extents_bforget (struct buffer_head *bh)
 
void buffer_head_remove (struct block_device *bdev, struct buffer_head *bh)
 
void block_invalidatepage (struct page *page, unsigned long offset)
 
void page_zero_new_buffers (struct page *page, unsigned from, unsigned to)
 
int block_commit_write (struct page *page, unsigned from, unsigned to)
 
void block_sync_page (struct page *)
 
void buffer_init (void)
 
static void get_bh (struct buffer_head *bh)
 
static void put_bh (struct buffer_head *bh)
 
static void brelse (struct buffer_head *bh)
 
static void fini_bh (struct buffer_head **bh)
 
static void bforget (struct buffer_head *bh)
 
static struct buffer_headsb_getblk (struct super_block *sb, sector_t block)
 
static struct buffer_headsb_getblk_zero (struct super_block *sb, sector_t block)
 
static struct buffer_headsb_bread (struct super_block *sb, sector_t block)
 
static struct buffer_headsb_find_get_block (struct super_block *sb, sector_t block)
 
static void map_bh (struct buffer_head *bh, struct super_block *sb, sector_t block)
 
static void wait_on_buffer (struct buffer_head *bh)
 
static void lock_buffer (struct buffer_head *bh)
 
int __set_page_dirty_buffers (struct page *page)
 
int register_nls (struct nls_table *)
 
int unregister_nls (struct nls_table *)
 
struct nls_tableload_nls (char *)
 
void unload_nls (struct nls_table *)
 
struct nls_tableload_nls_default (void)
 
int utf8_mbtowc (wchar_t *, const __u8 *, int)
 
int utf8_mbstowcs (wchar_t *, const __u8 *, int)
 
int utf8_wctomb (__u8 *, wchar_t, int)
 
int utf8_wcstombs (__u8 *, const wchar_t *, int)
 
static __u32 JIFFIES ()
 
NTKERNELAPI NTSTATUS ExUuidCreate (OUT UUID *Uuid)
 
NTKERNELAPI PVOID NTAPI ExAllocatePoolWithTag (IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
 
PVOID Ext2AllocatePool (IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
 
VOID Ext2FreePool (IN PVOID P, IN ULONG Tag)
 
voidkzalloc (int size, int flags)
 
kmem_cache_tkmem_cache_create (const char *name, size_t size, size_t offset, unsigned long flags, kmem_cache_cb_t ctor)
 
voidkmem_cache_alloc (kmem_cache_t *kc, int flags)
 
void kmem_cache_free (kmem_cache_t *kc, void *p)
 
int kmem_cache_destroy (kmem_cache_t *kc)
 
static __u32 do_div64 (__u64 *n, __u64 b)
 

Variables

struct task_structcurrent
 
int buffer_heads_over_limit
 

Macro Definition Documentation

◆ __be16_to_cpu

#define __be16_to_cpu (   x)    __swab16((x))

Definition at line 119 of file module.h.

◆ __be16_to_cpup

#define __be16_to_cpup (   x)    __swab16p((x))

Definition at line 131 of file module.h.

◆ __be16_to_cpus

#define __be16_to_cpus (   x)    __swab16s((x))

Definition at line 143 of file module.h.

◆ __be32_to_cpu

#define __be32_to_cpu (   x)    __swab32((x))

Definition at line 117 of file module.h.

◆ __be32_to_cpup

#define __be32_to_cpup (   x)    __swab32p((x))

Definition at line 129 of file module.h.

◆ __be32_to_cpus

#define __be32_to_cpus (   x)    __swab32s((x))

Definition at line 141 of file module.h.

◆ __be64_to_cpu

#define __be64_to_cpu (   x)    __swab64((x))

Definition at line 115 of file module.h.

◆ __be64_to_cpup

#define __be64_to_cpup (   x)    __swab64p((x))

Definition at line 127 of file module.h.

◆ __be64_to_cpus

#define __be64_to_cpus (   x)    __swab64s((x))

Definition at line 139 of file module.h.

◆ __constant_be16_to_cpu

#define __constant_be16_to_cpu (   x)    __constant_swab16((x))

Definition at line 107 of file module.h.

◆ __constant_be32_to_cpu

#define __constant_be32_to_cpu (   x)    __constant_swab32((x))

Definition at line 105 of file module.h.

◆ __constant_be64_to_cpu

#define __constant_be64_to_cpu (   x)    __constant_swab64((x))

Definition at line 103 of file module.h.

◆ __constant_cpu_to_be16

#define __constant_cpu_to_be16 (   x)    __constant_swab16((x))

Definition at line 106 of file module.h.

◆ __constant_cpu_to_be32

#define __constant_cpu_to_be32 (   x)    __constant_swab32((x))

Definition at line 104 of file module.h.

◆ __constant_cpu_to_be64

#define __constant_cpu_to_be64 (   x)    __constant_swab64((x))

Definition at line 102 of file module.h.

◆ __constant_cpu_to_le16

#define __constant_cpu_to_le16 (   x)    ((__u16)(x))

Definition at line 100 of file module.h.

◆ __constant_cpu_to_le32

#define __constant_cpu_to_le32 (   x)    ((__u32)(x))

Definition at line 98 of file module.h.

◆ __constant_cpu_to_le64

#define __constant_cpu_to_le64 (   x)    ((__u64)(x))

Definition at line 96 of file module.h.

◆ __constant_htonl

#define __constant_htonl (   x)    __constant_swab32((x))

Definition at line 92 of file module.h.

◆ __constant_htons

#define __constant_htons (   x)    __constant_swab16((x))

Definition at line 94 of file module.h.

◆ __constant_le16_to_cpu

#define __constant_le16_to_cpu (   x)    ((__u16)(x))

Definition at line 101 of file module.h.

◆ __constant_le32_to_cpu

#define __constant_le32_to_cpu (   x)    ((__u32)(x))

Definition at line 99 of file module.h.

◆ __constant_le64_to_cpu

#define __constant_le64_to_cpu (   x)    ((__u64)(x))

Definition at line 97 of file module.h.

◆ __constant_ntohl

#define __constant_ntohl (   x)    __constant_swab32((x))

Definition at line 93 of file module.h.

◆ __constant_ntohs

#define __constant_ntohs (   x)    __constant_swab16((x))

Definition at line 95 of file module.h.

◆ __constant_swab32

#define __constant_swab32   __swab32

Definition at line 89 of file module.h.

◆ __constant_swab64

#define __constant_swab64   __swab64

Definition at line 90 of file module.h.

◆ __cpu_to_be16

#define __cpu_to_be16 (   x)    __swab16((x))

Definition at line 118 of file module.h.

◆ __cpu_to_be16p

#define __cpu_to_be16p (   x)    __swab16p((x))

Definition at line 130 of file module.h.

◆ __cpu_to_be16s

#define __cpu_to_be16s (   x)    __swab16s((x))

Definition at line 142 of file module.h.

◆ __cpu_to_be32

#define __cpu_to_be32 (   x)    __swab32((x))

Definition at line 116 of file module.h.

◆ __cpu_to_be32p

#define __cpu_to_be32p (   x)    __swab32p((x))

Definition at line 128 of file module.h.

◆ __cpu_to_be32s

#define __cpu_to_be32s (   x)    __swab32s((x))

Definition at line 140 of file module.h.

◆ __cpu_to_be64

#define __cpu_to_be64 (   x)    __swab64((x))

Definition at line 114 of file module.h.

◆ __cpu_to_be64p

#define __cpu_to_be64p (   x)    __swab64p((x))

Definition at line 126 of file module.h.

◆ __cpu_to_be64s

#define __cpu_to_be64s (   x)    __swab64s((x))

Definition at line 138 of file module.h.

◆ __cpu_to_le16

#define __cpu_to_le16 (   x)    ((__u16)(x))

Definition at line 112 of file module.h.

◆ __cpu_to_le16p

#define __cpu_to_le16p (   x)    (*(__u16*)(x))

Definition at line 124 of file module.h.

◆ __cpu_to_le16s

#define __cpu_to_le16s (   x)    ((__s16)(x))

Definition at line 136 of file module.h.

◆ __cpu_to_le32

#define __cpu_to_le32 (   x)    ((__u32)(x))

Definition at line 110 of file module.h.

◆ __cpu_to_le32p

#define __cpu_to_le32p (   x)    (*(__u32*)(x))

Definition at line 122 of file module.h.

◆ __cpu_to_le32s

#define __cpu_to_le32s (   x)    ((__s32)(x))

Definition at line 134 of file module.h.

◆ __cpu_to_le64

#define __cpu_to_le64 (   x)    ((__u64)(x))

Definition at line 108 of file module.h.

◆ __cpu_to_le64p

#define __cpu_to_le64p (   x)    (*(__u64*)(x))

Definition at line 120 of file module.h.

◆ __cpu_to_le64s

#define __cpu_to_le64s (   x)    ((__s64)(x))

Definition at line 132 of file module.h.

◆ __exit

#define __exit

Definition at line 267 of file module.h.

◆ __free_page

#define __free_page (   page)    __free_pages((page), 0)

Definition at line 650 of file module.h.

◆ __get_free_page

#define __get_free_page (   gfp_mask)     __get_free_pages((gfp_mask),0)

Definition at line 644 of file module.h.

◆ __GFP_FS

#define __GFP_FS   0x100 /* Can call down to low-level FS? */

Definition at line 663 of file module.h.

◆ __GFP_HIGH

#define __GFP_HIGH   0x20 /* Should access emergency pools? */

Definition at line 660 of file module.h.

◆ __GFP_HIGHIO

#define __GFP_HIGHIO   0x80 /* Can start high mem physical IO? */

Definition at line 662 of file module.h.

◆ __GFP_HIGHMEM

#define __GFP_HIGHMEM   0x02

Definition at line 657 of file module.h.

◆ __GFP_IO

#define __GFP_IO   0x40 /* Can start low memory physical IO? */

Definition at line 661 of file module.h.

◆ __GFP_NOFAIL

#define __GFP_NOFAIL   0

Definition at line 670 of file module.h.

◆ __GFP_WAIT

#define __GFP_WAIT   0x10 /* Can wait and reschedule? */

Definition at line 659 of file module.h.

◆ __init

#define __init

Definition at line 266 of file module.h.

◆ __le16_to_cpu

#define __le16_to_cpu (   x)    ((__u16)(x))

Definition at line 113 of file module.h.

◆ __le16_to_cpup

#define __le16_to_cpup (   x)    (*(__u16*)(x))

Definition at line 125 of file module.h.

◆ __le16_to_cpus

#define __le16_to_cpus (   x)    ((__s16)(x))

Definition at line 137 of file module.h.

◆ __le32_to_cpu

#define __le32_to_cpu (   x)    ((__u32)(x))

Definition at line 111 of file module.h.

◆ __le32_to_cpup

#define __le32_to_cpup (   x)    (*(__u32*)(x))

Definition at line 123 of file module.h.

◆ __le32_to_cpus

#define __le32_to_cpus (   x)    ((__s32)(x))

Definition at line 135 of file module.h.

◆ __le64_to_cpu

#define __le64_to_cpu (   x)    ((__u64)(x))

Definition at line 109 of file module.h.

◆ __le64_to_cpup

#define __le64_to_cpup (   x)    (*(__u64*)(x))

Definition at line 121 of file module.h.

◆ __le64_to_cpus

#define __le64_to_cpus (   x)    ((__s64)(x))

Definition at line 133 of file module.h.

◆ __set_current_state

#define __set_current_state (   state)    do {} while(0)

Definition at line 506 of file module.h.

◆ __swab16

#define __swab16 (   x)    RtlUshortByteSwap(x)

Definition at line 85 of file module.h.

◆ __swab32

#define __swab32 (   x)    RtlUlongByteSwap(x)

Definition at line 86 of file module.h.

◆ __swab64

#define __swab64 (   x)    RtlUlonglongByteSwap(x)

Definition at line 87 of file module.h.

◆ _WIN2K_TARGET_

#define _WIN2K_TARGET_   1

Definition at line 23 of file module.h.

◆ arch_set_page_uptodate

#define arch_set_page_uptodate (   page)

Definition at line 605 of file module.h.

◆ assert_spin_locked

#define assert_spin_locked (   x)    do {} while(0)

Definition at line 311 of file module.h.

◆ BDEVNAME_SIZE

#define BDEVNAME_SIZE   32 /* Largest string for a blockdev identifier */

Definition at line 1166 of file module.h.

◆ be16_to_cpu

#define be16_to_cpu   __be16_to_cpu

Definition at line 159 of file module.h.

◆ be16_to_cpup

#define be16_to_cpup   __be16_to_cpup

Definition at line 171 of file module.h.

◆ be16_to_cpus

#define be16_to_cpus   __be16_to_cpus

Definition at line 183 of file module.h.

◆ be32_to_cpu

#define be32_to_cpu   __be32_to_cpu

Definition at line 157 of file module.h.

◆ be32_to_cpup

#define be32_to_cpup   __be32_to_cpup

Definition at line 169 of file module.h.

◆ be32_to_cpus

#define be32_to_cpus   __be32_to_cpus

Definition at line 181 of file module.h.

◆ be64_to_cpu

#define be64_to_cpu   __be64_to_cpu

Definition at line 155 of file module.h.

◆ be64_to_cpup

#define be64_to_cpup   __be64_to_cpup

Definition at line 167 of file module.h.

◆ be64_to_cpus

#define be64_to_cpus   __be64_to_cpus

Definition at line 179 of file module.h.

◆ bh_offset

#define bh_offset (   bh)    ((unsigned long)(bh)->b_data & ~PAGE_MASK)

Definition at line 803 of file module.h.

◆ BUFFER_FNS

#define BUFFER_FNS (   bit,
  name 
)
Value:
static inline void set_buffer_##name(struct buffer_head *bh) \
{ \
set_bit(BH_##bit, &(bh)->b_state); \
} \
static inline void clear_buffer_##name(struct buffer_head *bh) \
{ \
clear_bit(BH_##bit, &(bh)->b_state); \
} \
static inline int buffer_##name(const struct buffer_head *bh) \
{ \
return test_bit(BH_##bit, &(bh)->b_state); \
}
static int test_bit(int nr, volatile const unsigned long *addr)
Definition: module.h:383
Definition: name.c:39

Definition at line 752 of file module.h.

◆ BUG_ON

#define BUG_ON (   c)    assert(!(c))

Definition at line 255 of file module.h.

◆ ClearPageActive

#define ClearPageActive (   page)    clear_bit(PG_active, &(page)->flags)

Definition at line 640 of file module.h.

◆ ClearPageArch1

#define ClearPageArch1 (   page)    clear_bit(PG_arch_1, &(page)->flags)

Definition at line 629 of file module.h.

◆ ClearPageChecked

#define ClearPageChecked (   page)    clear_bit(PG_checked, &(page)->flags)

Definition at line 625 of file module.h.

◆ ClearPageDirty

#define ClearPageDirty (   page)    clear_bit(PG_dirty, &(page)->flags)

Definition at line 619 of file module.h.

◆ ClearPageError

#define ClearPageError (   page)    clear_bit(PG_error, &(page)->flags)

Definition at line 633 of file module.h.

◆ ClearPageLaunder

#define ClearPageLaunder (   page)    clear_bit(PG_launder, &(page)->flags)

Definition at line 628 of file module.h.

◆ ClearPageReferenced

#define ClearPageReferenced (   page)    clear_bit(PG_referenced, &(page)->flags)

Definition at line 636 of file module.h.

◆ ClearPageUptodate

#define ClearPageUptodate (   page)    clear_bit(PG_uptodate, &(page)->flags)

Definition at line 616 of file module.h.

◆ container_of

#define container_of (   ptr,
  type,
  member 
)     ((type *)((char *)ptr - (char *)offsetof(type, member)))

Definition at line 33 of file module.h.

◆ cpu_to_be16

#define cpu_to_be16   __cpu_to_be16

Definition at line 158 of file module.h.

◆ cpu_to_be16p

#define cpu_to_be16p   __cpu_to_be16p

Definition at line 170 of file module.h.

◆ cpu_to_be16s

#define cpu_to_be16s   __cpu_to_be16s

Definition at line 182 of file module.h.

◆ cpu_to_be32

#define cpu_to_be32   __cpu_to_be32

Definition at line 156 of file module.h.

◆ cpu_to_be32p

#define cpu_to_be32p   __cpu_to_be32p

Definition at line 168 of file module.h.

◆ cpu_to_be32s

#define cpu_to_be32s   __cpu_to_be32s

Definition at line 180 of file module.h.

◆ cpu_to_be64

#define cpu_to_be64   __cpu_to_be64

Definition at line 154 of file module.h.

◆ cpu_to_be64p

#define cpu_to_be64p   __cpu_to_be64p

Definition at line 166 of file module.h.

◆ cpu_to_be64s

#define cpu_to_be64s   __cpu_to_be64s

Definition at line 178 of file module.h.

◆ cpu_to_le16

#define cpu_to_le16   __cpu_to_le16

Definition at line 150 of file module.h.

◆ cpu_to_le16p

#define cpu_to_le16p   __cpu_to_le16p

Definition at line 164 of file module.h.

◆ cpu_to_le16s

#define cpu_to_le16s   __cpu_to_le16s

Definition at line 176 of file module.h.

◆ cpu_to_le32

#define cpu_to_le32   __cpu_to_le32

Definition at line 148 of file module.h.

◆ cpu_to_le32p

#define cpu_to_le32p   __cpu_to_le32p

Definition at line 162 of file module.h.

◆ cpu_to_le32s

#define cpu_to_le32s   __cpu_to_le32s

Definition at line 174 of file module.h.

◆ cpu_to_le64

#define cpu_to_le64   __cpu_to_le64

Definition at line 146 of file module.h.

◆ cpu_to_le64p

#define cpu_to_le64p   __cpu_to_le64p

Definition at line 160 of file module.h.

◆ cpu_to_le64s

#define cpu_to_le64s   __cpu_to_le64s

Definition at line 172 of file module.h.

◆ DECLARE_EXIT

#define DECLARE_EXIT (   X)    void __exit module_##X(void)

Definition at line 282 of file module.h.

◆ DECLARE_INIT

#define DECLARE_INIT (   X)    int __init module_##X(void)

Definition at line 281 of file module.h.

◆ DEFINE_WAIT

#define DEFINE_WAIT (   name)     wait_queue_t name = (PVOID)wait_queue_create();

Definition at line 483 of file module.h.

◆ do_div

#define do_div (   n,
  b 
)    do_div64(&(n), (__u64)b)

Definition at line 1230 of file module.h.

◆ ExFreePoolWithTag

#define ExFreePoolWithTag (   _P,
  _T 
)    ExFreePool(_P)

Definition at line 1109 of file module.h.

◆ EXPORT_SYMBOL

#define EXPORT_SYMBOL (   x)

Definition at line 272 of file module.h.

◆ free_page

#define free_page (   addr)    free_pages((addr),0)

Definition at line 651 of file module.h.

◆ get_page

#define get_page (   p)    atomic_inc(&(p)->count)

Definition at line 585 of file module.h.

◆ GFP_ATOMIC

#define GFP_ATOMIC   (__GFP_HIGH)

Definition at line 665 of file module.h.

◆ GFP_HIGHUSER

Definition at line 667 of file module.h.

◆ GFP_KERNEL

Definition at line 668 of file module.h.

◆ GFP_NOFS

#define GFP_NOFS   0

Definition at line 669 of file module.h.

◆ GFP_USER

#define GFP_USER   ( __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS)

Definition at line 666 of file module.h.

◆ htonl

#define htonl (   x)    ntohl(x)

Definition at line 214 of file module.h.

◆ htons

#define htons (   x)    ntohs(x)

Definition at line 215 of file module.h.

◆ HZ

#define HZ   (100)

Definition at line 1072 of file module.h.

◆ IS_ERR_VALUE

#define IS_ERR_VALUE (   x)    ((x) >= (unsigned long)-MAX_ERRNO)

Definition at line 237 of file module.h.

◆ is_sync_wait

#define is_sync_wait (   wait)    (TRUE)

Definition at line 504 of file module.h.

◆ jiffies

#define jiffies   JIFFIES()

Definition at line 1085 of file module.h.

◆ KERN_ALERT

#define KERN_ALERT   "<1>" /* action must be taken immediately */

Definition at line 223 of file module.h.

◆ KERN_CRIT

#define KERN_CRIT   "<2>" /* critical conditions */

Definition at line 224 of file module.h.

◆ KERN_DEBUG

#define KERN_DEBUG   "<7>" /* debug-level messages */

Definition at line 229 of file module.h.

◆ KERN_EMERG

#define KERN_EMERG   "<0>" /* system is unusable */

Definition at line 222 of file module.h.

◆ KERN_ERR

#define KERN_ERR   "<3>" /* error conditions */

Definition at line 225 of file module.h.

◆ KERN_INFO

#define KERN_INFO   "<6>" /* informational */

Definition at line 228 of file module.h.

◆ KERN_NOTICE

#define KERN_NOTICE   "<5>" /* normal but significant condition */

Definition at line 227 of file module.h.

◆ KERN_WARNING

#define KERN_WARNING   "<4>" /* warning conditions */

Definition at line 226 of file module.h.

◆ kfree

#define kfree (   p)    Ext2FreePool(p, 'JBDM')

Definition at line 1126 of file module.h.

◆ KM_USER0

#define KM_USER0   0

Definition at line 673 of file module.h.

◆ kmalloc

#define kmalloc (   size,
  gfp 
)    Ext2AllocatePool(NonPagedPool, size, 'JBDM')

Definition at line 1125 of file module.h.

◆ le16_to_cpu

#define le16_to_cpu   __le16_to_cpu

Definition at line 151 of file module.h.

◆ le16_to_cpup

#define le16_to_cpup   __le16_to_cpup

Definition at line 165 of file module.h.

◆ le16_to_cpus

#define le16_to_cpus   __le16_to_cpus

Definition at line 177 of file module.h.

◆ le32_to_cpu

#define le32_to_cpu   __le32_to_cpu

Definition at line 149 of file module.h.

◆ le32_to_cpup

#define le32_to_cpup   __le32_to_cpup

Definition at line 163 of file module.h.

◆ le32_to_cpus

#define le32_to_cpus   __le32_to_cpus

Definition at line 175 of file module.h.

◆ le64_to_cpu

#define le64_to_cpu   __le64_to_cpu

Definition at line 147 of file module.h.

◆ le64_to_cpup

#define le64_to_cpup   __le64_to_cpup

Definition at line 161 of file module.h.

◆ le64_to_cpus

#define le64_to_cpus   __le64_to_cpus

Definition at line 173 of file module.h.

◆ likely

#define likely

Definition at line 263 of file module.h.

◆ LOAD_MODULE

#define LOAD_MODULE (   X)
Value:
do { \
rc = module_##X(); \
} while(0)
#define X(b, s)

Definition at line 284 of file module.h.

◆ LOAD_NLS

#define LOAD_NLS   LOAD_MODULE

Definition at line 292 of file module.h.

◆ LockPage

#define LockPage (   page)    set_bit(PG_locked, &(page)->flags)

Definition at line 621 of file module.h.

◆ MAX_BUF_PER_PAGE

#define MAX_BUF_PER_PAGE   (PAGE_CACHE_SIZE / 512)

Definition at line 707 of file module.h.

◆ MAX_ERRNO

#define MAX_ERRNO   4095

Definition at line 236 of file module.h.

◆ might_sleep

#define might_sleep ( )    do {} while(0)

Definition at line 450 of file module.h.

◆ MODULE_ALIAS_NLS

#define MODULE_ALIAS_NLS (   x)

Definition at line 271 of file module.h.

◆ module_exit

#define module_exit (   X)    void __exit module_##X() {X();}

Definition at line 279 of file module.h.

◆ module_init

#define module_init (   X)    int __init module_##X() {return X();}

Definition at line 278 of file module.h.

◆ MODULE_LICENSE

#define MODULE_LICENSE (   x)

Definition at line 270 of file module.h.

◆ module_put

#define module_put (   x)

Definition at line 276 of file module.h.

◆ mutex_init

#define mutex_init (   x)    ExInitializeFastMutex(&((x)->lock))

Definition at line 460 of file module.h.

◆ mutex_lock

#define mutex_lock (   x)    ExAcquireFastMutex(&((x)->lock))

Definition at line 461 of file module.h.

◆ mutex_unlock

#define mutex_unlock (   x)    ExReleaseFastMutex(&((x)->lock))

Definition at line 462 of file module.h.

◆ NLS_MAX_CHARSET_SIZE

#define NLS_MAX_CHARSET_SIZE   6 /* for UTF-8 */

Definition at line 1054 of file module.h.

◆ ntohl

#define ntohl (   x)
Value:
( ( ( ( x ) & 0x000000ff ) << 24 ) | \
( ( ( x ) & 0x0000ff00 ) << 8 ) | \
( ( ( x ) & 0x00ff0000 ) >> 8 ) | \
( ( ( x ) & 0xff000000 ) >> 24 ) )
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Definition at line 205 of file module.h.

◆ ntohs

#define ntohs (   x)
Value:
( ( ( ( x ) & 0xff00 ) >> 8 ) | \
( ( ( x ) & 0x00ff ) << 8 ) )

Definition at line 210 of file module.h.

◆ offsetof

#define offsetof (   type,
  member 
)    ((ULONG_PTR)&(((type *)0)->member))

Definition at line 29 of file module.h.

◆ page_address

#define page_address (   _page)    ((char*)_page + sizeof(struct page))

Definition at line 574 of file module.h.

◆ page_buffers

#define page_buffers (   page)
Value:
( \
BUG_ON(!PagePrivate(page)), \
((struct buffer_head *)page_private(page)) \
)
Definition: module.h:576

Definition at line 808 of file module.h.

◆ PAGE_CACHE_SHIFT

#define PAGE_CACHE_SHIFT   (12)

Definition at line 706 of file module.h.

◆ PAGE_CACHE_SIZE

#define PAGE_CACHE_SIZE   (PAGE_SIZE)

Definition at line 705 of file module.h.

◆ page_has_buffers

#define page_has_buffers (   page)    PagePrivate(page)

Definition at line 813 of file module.h.

◆ Page_Uptodate

#define Page_Uptodate (   page)    test_bit(PG_uptodate, &(page)->flags)

Definition at line 610 of file module.h.

◆ PageActive

#define PageActive (   page)    test_bit(PG_active, &(page)->flags)

Definition at line 638 of file module.h.

◆ PageChecked

#define PageChecked (   page)    test_bit(PG_checked, &(page)->flags)

Definition at line 623 of file module.h.

◆ PageDirty

#define PageDirty (   page)    test_bit(PG_dirty, &(page)->flags)

Definition at line 617 of file module.h.

◆ PageError

#define PageError (   page)    test_bit(PG_error, &(page)->flags)

Definition at line 631 of file module.h.

◆ PageLaunder

#define PageLaunder (   page)    test_bit(PG_launder, &(page)->flags)

Definition at line 626 of file module.h.

◆ PageLocked

#define PageLocked (   page)    test_bit(PG_locked, &(page)->flags)

Definition at line 620 of file module.h.

◆ PageReferenced

#define PageReferenced (   page)    test_bit(PG_referenced, &(page)->flags)

Definition at line 634 of file module.h.

◆ PG_active

#define PG_active   7

Definition at line 594 of file module.h.

◆ PG_arch_1

#define PG_arch_1   13

Definition at line 599 of file module.h.

◆ PG_checked

#define PG_checked   12 /* kill me in 2.5.<early>. */

Definition at line 598 of file module.h.

◆ PG_dirty

#define PG_dirty   4

Definition at line 591 of file module.h.

◆ PG_error

#define PG_error   1

Definition at line 588 of file module.h.

◆ PG_fs_1

#define PG_fs_1   16 /* Filesystem specific */

Definition at line 602 of file module.h.

◆ PG_highmem

#define PG_highmem   11

Definition at line 597 of file module.h.

◆ PG_launder

#define PG_launder   15 /* written out by VM pressure.. */

Definition at line 601 of file module.h.

◆ PG_locked

#define PG_locked   0 /* Page is locked. Don't touch. */

Definition at line 587 of file module.h.

◆ PG_lru

#define PG_lru   6

Definition at line 593 of file module.h.

◆ PG_referenced

#define PG_referenced   2

Definition at line 589 of file module.h.

◆ PG_reserved

#define PG_reserved   14

Definition at line 600 of file module.h.

◆ PG_skip

#define PG_skip   10

Definition at line 596 of file module.h.

◆ PG_slab

#define PG_slab   8

Definition at line 595 of file module.h.

◆ PG_unused

#define PG_unused   5

Definition at line 592 of file module.h.

◆ PG_uptodate

#define PG_uptodate   3

Definition at line 590 of file module.h.

◆ printk

#define printk   DbgPrint

Definition at line 231 of file module.h.

◆ READ

#define READ   0

Definition at line 1175 of file module.h.

◆ READ_META

#define READ_META   (READ | (1 << BIO_RW_META))

Definition at line 1180 of file module.h.

◆ READ_SYNC

#define READ_SYNC   (READ | (1 << BIO_RW_SYNC))

Definition at line 1179 of file module.h.

◆ READA

#define READA   2 /* read-ahead - don't block if no resources */

Definition at line 1177 of file module.h.

◆ RW_MASK

#define RW_MASK   1

Definition at line 1173 of file module.h.

◆ RWA_MASK

#define RWA_MASK   2

Definition at line 1174 of file module.h.

◆ set_current_state

#define set_current_state (   state)    do {} while(0)

Definition at line 505 of file module.h.

◆ SetPageActive

#define SetPageActive (   page)    set_bit(PG_active, &(page)->flags)

Definition at line 639 of file module.h.

◆ SetPageChecked

#define SetPageChecked (   page)    set_bit(PG_checked, &(page)->flags)

Definition at line 624 of file module.h.

◆ SetPageDirty

#define SetPageDirty (   page)    set_bit(PG_dirty, &(page)->flags)

Definition at line 618 of file module.h.

◆ SetPageError

#define SetPageError (   page)    set_bit(PG_error, &(page)->flags)

Definition at line 632 of file module.h.

◆ SetPageLaunder

#define SetPageLaunder (   page)    set_bit(PG_launder, &(page)->flags)

Definition at line 627 of file module.h.

◆ SetPageReferenced

#define SetPageReferenced (   page)    set_bit(PG_referenced, &(page)->flags)

Definition at line 635 of file module.h.

◆ SetPageUptodate

#define SetPageUptodate (   page)
Value:
do { \
arch_set_page_uptodate(page); \
set_bit(PG_uptodate, &(page)->flags); \
} while (0)
GLbitfield flags
Definition: glext.h:7161
#define PG_uptodate
Definition: module.h:590

Definition at line 611 of file module.h.

◆ SLAB_HWCACHE_ALIGN

#define SLAB_HWCACHE_ALIGN   0x00002000U /* align objs on a h/w cache lines */

Definition at line 1131 of file module.h.

◆ SLAB_KERNEL

#define SLAB_KERNEL   0x00000001U

Definition at line 1132 of file module.h.

◆ SLAB_TEMPORARY

#define SLAB_TEMPORARY   0x00000002U

Definition at line 1133 of file module.h.

◆ smp_rmb

#define smp_rmb ( )    do {}while(0)

Definition at line 1219 of file module.h.

◆ spin_lock

#define spin_lock (   sl)    KeAcquireSpinLock(&((sl)->lock), &((sl)->irql))

Definition at line 306 of file module.h.

◆ spin_lock_init

#define spin_lock_init (   sl)    KeInitializeSpinLock(&((sl)->lock))

Definition at line 305 of file module.h.

◆ spin_lock_irqsave

#define spin_lock_irqsave (   sl,
  flags 
)    do {spin_lock(sl); flags=(sl)->irql;} while(0)

Definition at line 308 of file module.h.

◆ spin_unlock

#define spin_unlock (   sl)    KeReleaseSpinLock(&((sl)->lock), (sl)->irql)

Definition at line 307 of file module.h.

◆ spin_unlock_irqrestore

#define spin_unlock_irqrestore (   sl,
  flags 
)    do {ASSERT((KIRQL)(flags)==(sl)->irql); spin_unlock(sl);} while(0)

Definition at line 309 of file module.h.

◆ SWRITE

#define SWRITE   3 /* for ll_rw_block() - wait for buffer lock */

Definition at line 1178 of file module.h.

◆ TAS_BUFFER_FNS

#define TAS_BUFFER_FNS (   bit,
  name 
)
Value:
static inline int test_set_buffer_##name(struct buffer_head *bh) \
{ \
return test_and_set_bit(BH_##bit, &(bh)->b_state); \
} \
static inline int test_clear_buffer_##name(struct buffer_head *bh) \
{ \
return test_and_clear_bit(BH_##bit, &(bh)->b_state); \
} \
static int test_and_set_bit(int nr, volatile unsigned long *addr)
Definition: module.h:397
static int test_and_clear_bit(int nr, volatile unsigned long *addr)
Definition: module.h:375

Definition at line 769 of file module.h.

◆ TASK_INTERRUPTIBLE

#define TASK_INTERRUPTIBLE   1

Definition at line 417 of file module.h.

◆ TASK_UNINTERRUPTIBLE

#define TASK_UNINTERRUPTIBLE   2

Definition at line 418 of file module.h.

◆ THIS_MODULE

#define THIS_MODULE   NULL

Definition at line 269 of file module.h.

◆ time_after

#define time_after (   a,
  b 
)
Value:
(typecheck(unsigned long, a) && \
typecheck(unsigned long, b) && \
((long)(b) - (long)(a) < 0))
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define typecheck(x, y)
Definition: module.h:1201
#define long
Definition: qsort.c:33

Definition at line 1203 of file module.h.

◆ time_after_eq

#define time_after_eq (   a,
  b 
)
Value:
(typecheck(unsigned long, a) && \
typecheck(unsigned long, b) && \
((long)(a) - (long)(b) >= 0))

Definition at line 1209 of file module.h.

◆ time_before

#define time_before (   a,
  b 
)    time_after(b,a)

Definition at line 1207 of file module.h.

◆ time_before_eq

#define time_before_eq (   a,
  b 
)    time_after_eq(b,a)

Definition at line 1213 of file module.h.

◆ time_in_range

#define time_in_range (   a,
  b,
  c 
)
Value:
(time_after_eq(a,b) && \
time_before_eq(a,c))
const GLubyte * c
Definition: glext.h:8905
#define time_after_eq(a, b)
Definition: module.h:1209

Definition at line 1215 of file module.h.

◆ touch_buffer

#define touch_buffer (   bh)    mark_page_accessed(bh->b_page)

Definition at line 804 of file module.h.

◆ try_module_get

#define try_module_get (   x)    (TRUE)

Definition at line 275 of file module.h.

◆ TryLockPage

#define TryLockPage (   page)    test_and_set_bit(PG_locked, &(page)->flags)

Definition at line 622 of file module.h.

◆ typecheck

#define typecheck (   x,
  y 
)    (TRUE)

Definition at line 1201 of file module.h.

◆ unlikely

#define unlikely

Definition at line 264 of file module.h.

◆ UNLOAD_MODULE

#define UNLOAD_MODULE (   X)
Value:
do { \
module_##X(); \
} while(0)

Definition at line 288 of file module.h.

◆ UNLOAD_NLS

#define UNLOAD_NLS   UNLOAD_MODULE

Definition at line 293 of file module.h.

◆ UnlockPage

#define UnlockPage (   page)    unlock_page(page)

Definition at line 609 of file module.h.

◆ WARN_ON

#define WARN_ON (   c)    BUG_ON(c)

Definition at line 257 of file module.h.

◆ WQ_FLAG_AUTO_REMOVAL

#define WQ_FLAG_AUTO_REMOVAL   0x02

Definition at line 473 of file module.h.

◆ WQ_FLAG_EXCLUSIVE

#define WQ_FLAG_EXCLUSIVE   0x01

Definition at line 472 of file module.h.

◆ WRITE

#define WRITE   1

Definition at line 1176 of file module.h.

◆ WRITE_BARRIER

#define WRITE_BARRIER   ((1 << BIO_RW) | (1 << BIO_RW_BARRIER))

Definition at line 1182 of file module.h.

◆ WRITE_SYNC

#define WRITE_SYNC   (WRITE | (1 << BIO_RW_SYNC))

Definition at line 1181 of file module.h.

◆ yield

#define yield ( )    do {} while(0)

Definition at line 449 of file module.h.

Typedef Documentation

◆ bh_end_io_t

typedef void() bh_end_io_t(struct buffer_head *bh, int uptodate)

Definition at line 712 of file module.h.

◆ kmem_cache_cb_t

typedef void(* kmem_cache_cb_t) (void *, kmem_cache_t *, unsigned long)

Definition at line 1135 of file module.h.

◆ kmem_cache_t

Definition at line 544 of file module.h.

◆ mem_map_t

◆ mutex_t

typedef struct mutex mutex_t

◆ spinlock_t

◆ UUID

typedef GUID UUID

Definition at line 1093 of file module.h.

◆ wait_queue_head_t

Definition at line 502 of file module.h.

◆ wait_queue_t

Definition at line 470 of file module.h.

Enumeration Type Documentation

◆ bh_state_bits

Enumerator
BH_Uptodate 
BH_Dirty 
BH_Verified 
BH_Lock 
BH_Req 
BH_Uptodate_Lock 
BH_Mapped 
BH_New 
BH_Async_Read 
BH_Async_Write 
BH_Delay 
BH_Boundary 
BH_Write_EIO 
BH_Ordered 
BH_Eopnotsupp 
BH_Unwritten 
BH_PrivateStart 

Definition at line 679 of file module.h.

679 {
680 BH_Uptodate, /* Contains valid data */
681 BH_Dirty, /* Is dirty */
682 BH_Verified, /* Is verified */
683 BH_Lock, /* Is locked */
684 BH_Req, /* Has been submitted for I/O */
685 BH_Uptodate_Lock, /* Used by the first bh in a page, to serialise
686 * IO completion of other buffers in the page
687 */
688
689 BH_Mapped, /* Has a disk mapping */
690 BH_New, /* Disk mapping was newly created by get_block */
691 BH_Async_Read, /* Is under end_buffer_async_read I/O */
692 BH_Async_Write, /* Is under end_buffer_async_write I/O */
693 BH_Delay, /* Buffer is not yet allocated on disk */
694 BH_Boundary, /* Block is followed by a discontiguity */
695 BH_Write_EIO, /* I/O error on write */
696 BH_Ordered, /* ordered write */
697 BH_Eopnotsupp, /* operation not supported (barrier) */
698 BH_Unwritten, /* Buffer is allocated on disk but not written */
699
700 BH_PrivateStart, /* not a state bit, but the first bit available
701 * for private allocation by other entities
702 */
703};
@ BH_PrivateStart
Definition: module.h:700
@ BH_Uptodate
Definition: module.h:680
@ BH_Req
Definition: module.h:684
@ BH_Async_Write
Definition: module.h:692
@ BH_Ordered
Definition: module.h:696
@ BH_Unwritten
Definition: module.h:698
@ BH_Write_EIO
Definition: module.h:695
@ BH_Verified
Definition: module.h:682
@ BH_Async_Read
Definition: module.h:691
@ BH_Eopnotsupp
Definition: module.h:697
@ BH_Mapped
Definition: module.h:689
@ BH_Uptodate_Lock
Definition: module.h:685
@ BH_Delay
Definition: module.h:693
@ BH_Boundary
Definition: module.h:694
@ BH_Lock
Definition: module.h:683
@ BH_Dirty
Definition: module.h:681
@ BH_New
Definition: module.h:690

Function Documentation

◆ __bforget()

void __bforget ( struct buffer_head bh)

Definition at line 843 of file linux.c.

844{
845 clear_buffer_dirty(bh);
846 __brelse(bh);
847}
void __brelse(struct buffer_head *bh)
Definition: linux.c:808

Referenced by bforget(), and journal_forget().

◆ __bread()

struct buffer_head * __bread ( struct block_device ,
sector_t  block,
unsigned  size 
)

◆ __breadahead()

void __breadahead ( struct block_device ,
sector_t  block,
unsigned int  size 
)

◆ __brelse()

void __brelse ( struct buffer_head bh)

Definition at line 808 of file linux.c.

809{
810 struct block_device *bdev = bh->b_bdev;
812
813 ASSERT(Vcb->Identifier.Type == EXT2VCB);
814
815 /* write data in case it's dirty */
816 while (buffer_dirty(bh)) {
817 ll_rw_block(WRITE, 1, &bh);
818 }
819
821 if (atomic_dec_and_test(&bh->b_count)) {
822 ASSERT(0 == atomic_read(&bh->b_count));
823 } else {
825 return;
826 }
828#ifdef __REACTOS__
829 if (!IsListEmpty(&bh->b_link))
830#endif
832 InsertTailList(&Vcb->bd.bd_bh_free, &bh->b_link);
833 KeClearEvent(&Vcb->bd.bd_bh_notify);
836
837 DEBUG(DL_BH, ("brelse: cnt=%u size=%u blk=%10.10xh bh=%p ptr=%p\n",
838 atomic_read(&g_jbh.bh_count) - 1, bh->b_size,
839 bh->b_blocknr, bh, bh->b_data ));
840}
#define atomic_read(v)
Definition: atomic.h:23
static int atomic_dec_and_test(atomic_t volatile *v)
Definition: atomic.h:121
#define DEBUG(args)
Definition: rdesktop.h:129
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define KeSetEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:476
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
#define ExAcquireResourceExclusiveLite(res, wait)
Definition: env_spec_w32.h:615
VOID NTAPI KeClearEvent(IN PKEVENT Event)
Definition: eventobj.c:22
@ EXT2VCB
Definition: ext2fs.h:462
#define DL_BH
Definition: ext2fs.h:1448
struct _EXT2_VCB * PEXT2_VCB
PEXT2_GLOBAL Ext2Global
Definition: init.c:16
struct _EXT2_BUFFER_HEAD g_jbh
void ll_rw_block(int rw, int nr, struct buffer_head *bhs[])
Definition: linux.c:862
#define ASSERT(a)
Definition: mode.c:44
#define WRITE
Definition: module.h:1176
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1822
#define Vcb
Definition: cdprocs.h:1415
EXT2_REAPER bhReaper
Definition: ext2fs.h:550
KEVENT Wait
Definition: ext2fs.h:506
void * bd_priv
Definition: module.h:554
ERESOURCE bd_bh_lock
Definition: module.h:560
struct block_device * b_bdev
Definition: module.h:731
size_t b_size
Definition: module.h:734
LIST_ENTRY b_link
Definition: module.h:724
blkcnt_t b_blocknr
Definition: module.h:733
atomic_t b_count
Definition: module.h:740
char * b_data
Definition: module.h:735
LARGE_INTEGER b_ts_drop
Definition: module.h:744

Referenced by __bforget(), __dispose_buffer(), __journal_remove_journal_head(), add_dirent_to_buf(), brelse(), Ext2AddDotEntries(), Ext2GetInodeLba(), Ext2ScanDir(), ext3_bread(), ext4_check_descriptors(), journal_forget(), journal_put_journal_head(), and put_bh().

◆ __find_get_block()

struct buffer_head * __find_get_block ( struct block_device bdev,
sector_t  block,
unsigned long  size 
)

Definition at line 932 of file linux.c.

933{
934 return __getblk(bdev, block, size);
935}
GLsizeiptr size
Definition: glext.h:5919
struct buffer_head * __getblk(struct block_device *bdev, sector_t block, unsigned long size)
Definition: linux.c:799
static unsigned int block
Definition: xmlmemory.c:101

Referenced by sb_find_get_block().

◆ __free_pages()

void __free_pages ( struct page page,
unsigned int  order 
)

◆ __get_free_pages()

unsigned long __get_free_pages ( unsigned int  gfp_mask,
unsigned int  order 
)

◆ __getblk()

struct buffer_head * __getblk ( struct block_device bdev,
sector_t  block,
unsigned long  size 
)

Definition at line 799 of file linux.c.

804{
805 return get_block_bh(bdev, block, size, 0);
806}
struct buffer_head * get_block_bh(struct block_device *bdev, sector_t block, unsigned long size, int zero)
Definition: linux.c:782

Referenced by __find_get_block(), do_one_pass(), journal_get_descriptor_buffer(), journal_init_inode(), jread(), and sb_bread().

◆ __lock_buffer()

void __lock_buffer ( struct buffer_head bh)

Definition at line 849 of file linux.c.

850{
851}

Referenced by lock_buffer().

◆ __set_page_dirty_buffers()

int __set_page_dirty_buffers ( struct page page)

◆ __wait_on_buffer()

void __wait_on_buffer ( struct buffer_head bh)

Definition at line 858 of file linux.c.

859{
860}

Referenced by wait_on_buffer().

◆ alloc_buffer_head()

struct buffer_head * alloc_buffer_head ( gfp_t  gfp_flags)

◆ alloc_page_buffers()

struct buffer_head * alloc_page_buffers ( struct page page,
unsigned long  size,
int  retry 
)

◆ autoremove_wake_function()

int autoremove_wake_function ( wait_queue_t wait,
unsigned  mode,
int  sync,
void key 
)

◆ bforget()

static void bforget ( struct buffer_head bh)
inlinestatic

Definition at line 969 of file module.h.

970{
971 if (bh)
972 __bforget(bh);
973}
void __bforget(struct buffer_head *)
Definition: linux.c:843

Referenced by extents_bforget().

◆ bh_submit_read()

int bh_submit_read ( struct buffer_head bh)

Definition at line 892 of file linux.c.

893{
894 ll_rw_block(READ, 1, &bh);
895 return 0;
896}
#define READ(_gif, _buf, _len)
Definition: ungif.c:107

Referenced by Ext2FreeInode(), Ext2LoadBlock(), Ext2LoadBuffer(), Ext2NewBlock(), Ext2NewInode(), Ext2SaveBuffer(), Ext2ZeroBuffer(), ext3_bread(), and sb_bread().

◆ bh_uptodate_or_lock()

int bh_uptodate_or_lock ( struct buffer_head bh)

◆ bh_waitq_head()

wait_queue_head_t * bh_waitq_head ( struct buffer_head bh)

◆ block_commit_write()

int block_commit_write ( struct page page,
unsigned  from,
unsigned  to 
)

◆ block_invalidatepage()

void block_invalidatepage ( struct page page,
unsigned long  offset 
)

◆ block_sync_page()

void block_sync_page ( struct page )

◆ brelse()

static void brelse ( struct buffer_head bh)
inlinestatic

◆ buffer_head_remove()

void buffer_head_remove ( struct block_device bdev,
struct buffer_head bh 
)

Definition at line 424 of file linux.c.

425{
426 rb_erase(&bh->b_rb_node, &bdev->bd_bh_root);
427}
void rb_erase(struct rb_node *, struct rb_root *)
Definition: rbtree.c:223
struct rb_root bd_bh_root
Definition: module.h:561
struct rb_node b_rb_node
Definition: module.h:741

Referenced by Ext2DropBH(), and Ext2QueryUnusedBH().

◆ buffer_init()

void buffer_init ( void  )

◆ clear_bit()

static int clear_bit ( int  nr,
volatile unsigned long addr 
)
inlinestatic

clear_bit - Clears a bit in memory @nr: Bit to clear @addr: Address to start counting from

clear_bit() is atomic and may not be reordered. However, it does not contain a memory barrier, so if it is used for locking purposes, you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() in order to ensure changes are visible on other processors.

Definition at line 359 of file module.h.

360{
361 addr += (nr >> ORDER_PER_LONG);
362 nr &= (BITS_PER_LONG - 1);
363
364 return !!(InterlockedAnd(addr, ~(1 << nr)) & (1 << nr));
365}
#define BITS_PER_LONG
Definition: types.h:86
#define ORDER_PER_LONG
Definition: types.h:87
GLenum const GLvoid * addr
Definition: glext.h:9621
#define InterlockedAnd
Definition: interlocked.h:62
ULONG nr
Definition: thread.c:7

Referenced by test_and_clear_bit().

◆ cond_resched()

static cond_resched ( )
inlinestatic

Definition at line 437 of file module.h.

437 {
438#endif
439 return FALSE;
440}

Referenced by do_one_pass().

◆ create_empty_buffers()

void create_empty_buffers ( struct page ,
unsigned long  ,
unsigned long  b_state 
)

◆ do_div64()

static __u32 do_div64 ( __u64 n,
__u64  b 
)
inlinestatic

Definition at line 1222 of file module.h.

1223{
1224 __u64 mod;
1225
1226 mod = *n % b;
1227 *n = *n / b;
1228 return (__u32) mod;
1229}
std::map< E_MODULE, HMODULE > mod
Definition: LocaleTests.cpp:66
u32 __u32
Definition: btrfs.h:19
u64 __u64
Definition: btrfs.h:20
GLdouble n
Definition: glext.h:7729
#define b
Definition: ke_i.h:79

◆ ERR_PTR()

static void * ERR_PTR ( long  error)
inlinestatic

Definition at line 239 of file module.h.

240{
241 return (void *)(long_ptr_t) error;
242}
long long_ptr_t
Definition: types.h:95
#define error(str)
Definition: mkdosfs.c:1605

Referenced by __read_extent_tree_block(), and ext4_find_extent().

◆ ExAllocatePoolWithTag()

NTKERNELAPI PVOID NTAPI ExAllocatePoolWithTag ( IN POOL_TYPE  PoolType,
IN SIZE_T  NumberOfBytes,
IN ULONG  Tag 
)

Definition at line 554 of file heap.c.

558{
560}
PVOID FrLdrHeapAllocateEx(PVOID HeapHandle, SIZE_T ByteSize, ULONG Tag)
Definition: heap.c:321
PVOID FrLdrDefaultHeap
Definition: heap.c:34
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1036

◆ Ext2AllocatePool()

PVOID Ext2AllocatePool ( IN POOL_TYPE  PoolType,
IN SIZE_T  NumberOfBytes,
IN ULONG  Tag 
)

Definition at line 2684 of file debug.c.

2689{
2690 return ExAllocatePoolWithTag(
2691 PoolType,
2693 Tag);
2694}
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815

◆ Ext2FreePool()

VOID Ext2FreePool ( IN PVOID  P,
IN ULONG  Tag 
)

Definition at line 2697 of file debug.c.

2701{
2703}
#define P(row, col)
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109

◆ extents_bforget()

void extents_bforget ( struct buffer_head bh)

Definition at line 64 of file ext4_bh.c.

65{
66 clear_buffer_uptodate(bh);
67 bforget(bh);
68}
static void bforget(struct buffer_head *bh)
Definition: module.h:969

Referenced by ext4_fs_put_xattr_ref().

◆ extents_bread()

struct buffer_head * extents_bread ( struct super_block sb,
sector_t  block 
)

Definition at line 15 of file ext4_bh.c.

16{
17 return sb_getblk(sb, block);
18}
superblock * sb
Definition: btrfs.c:4261
static struct buffer_head * sb_getblk(struct super_block *sb, sector_t block)
Definition: module.h:976

Referenced by __read_extent_tree_block(), and ext4_fs_get_xattr_ref().

◆ extents_brelse()

◆ extents_bwrite()

struct buffer_head * extents_bwrite ( struct super_block sb,
sector_t  block 
)

Definition at line 27 of file ext4_bh.c.

28{
29 return sb_getblk_zero(sb, block);
30
31}
static struct buffer_head * sb_getblk_zero(struct super_block *sb, sector_t block)
Definition: module.h:982

Referenced by ext4_ext_grow_indepth(), ext4_ext_split(), and ext4_xattr_try_alloc_block().

◆ extents_mark_buffer_dirty()

void extents_mark_buffer_dirty ( struct buffer_head bh)

Definition at line 39 of file ext4_bh.c.

40{
41 set_buffer_dirty(bh);
42}

Referenced by __ext4_handle_dirty_metadata(), and ext4_xattr_write_to_disk().

◆ ExUuidCreate()

NTKERNELAPI NTSTATUS ExUuidCreate ( OUT UUID Uuid)

Definition at line 380 of file uuid.c.

381{
383 LONG AllocatedCount;
385 BOOLEAN Valid;
386
387 PAGED_CODE();
388
390 /* Loop until we have an UUID to return */
391 while (TRUE)
392 {
393 /* Try to gather node values */
394 do
395 {
397
398 RtlCopyMemory(Uuid->Data4,
400 sizeof(Uuid->Data4));
401
402 Valid = ExpUuidCacheValid;
404 }
405 /* Loop till we can do it without being disturbed */
407
408 /* We have more than an allocated UUID left, that's OK to return! */
409 if (AllocatedCount >= 0)
410 {
411 break;
412 }
413
414 /*
415 * Here, we're out of UUIDs, we need to allocate more
416 * We need to be alone to do it, so lock the mutex
417 */
420 {
421 /* If allocation fails, bail out! */
423 if (Status != STATUS_SUCCESS)
424 {
426 return Status;
427 }
428
429 /* Save our current sequence if changed */
431 }
433 }
434
435 /*
436 * Once here, we've got an UUID to return
437 * But, if our init wasn't sane, then, make
438 * sure it's only used locally
439 */
440 if (!Valid)
441 {
443 }
444
445 /* Set our timestamp - see RFC4211 */
446 Time.QuadPart -= AllocatedCount;
447 Uuid->Data1 = Time.LowPart;
448 Uuid->Data2 = Time.HighPart;
449 /* We also set the bit for GUIDv1 */
450 Uuid->Data3 = ((Time.HighPart >> 16) & 0x0FFF) | 0x1000;
451
452 return Status;
453}
#define PAGED_CODE()
unsigned char BOOLEAN
#define InterlockedDecrement
Definition: armddk.h:52
LONG NTSTATUS
Definition: precomp.h:26
Status
Definition: gdiplustypes.h:25
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
static PLARGE_INTEGER Time
Definition: time.c:105
FAST_MUTEX ExpUuidLock
Definition: uuid.c:35
UUID_CACHED_VALUES_STRUCT ExpUuidCachedValues
Definition: uuid.c:40
BOOLEAN ExpUuidCacheValid
Definition: uuid.c:41
static VOID ExpUuidSaveSequenceNumberIf(VOID)
Definition: uuid.c:174
static NTSTATUS ExpUuidGetValues(PUUID_CACHED_VALUES_STRUCT CachedValues)
Definition: uuid.c:276
#define RPC_NT_UUID_LOCAL_ONLY
Definition: ntstatus.h:174
long LONG
Definition: pedump.c:60
#define STATUS_SUCCESS
Definition: shellext.h:65
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
LONGLONG QuadPart
Definition: typedefs.h:114
ULONG LowPart
Definition: typedefs.h:106

Referenced by AllocAndInitializeTelemetryContext(), ChanMgrCreateChannel(), CreateNewVolumeName(), CreateNoDriveLetterEntry(), Ext2InitializeVcb(), IntCreateNewRegistryPath(), and START_TEST().

◆ fini_bh()

◆ finish_wait()

void finish_wait ( wait_queue_head_t q,
wait_queue_t wait 
)

Definition at line 250 of file linux.c.

251{
252 unsigned long flags;
253 struct __wait_queue *wait = *waiti;
254
255 __set_current_state(TASK_RUNNING);
256 /*
257 * We can check for list emptiness outside the lock
258 * IFF:
259 * - we use the "careful" check that verifies both
260 * the next and prev pointers, so that there cannot
261 * be any half-pending updates in progress on other
262 * CPU's that we haven't seen yet (and that might
263 * still change the stack area.
264 * and
265 * - all other users take the lock (ie we can only
266 * have _one_ other CPU that looks at or modifies
267 * the list).
268 */
269 if (!list_empty_careful(&wait->task_list)) {
270 spin_lock_irqsave(&q->lock, flags);
271 list_del_init(&wait->task_list);
273 }
274
275 /* free wait */
276 wait_queue_destroy(wait);
277}
static void list_del_init(struct list_head *entry)
Definition: list.h:100
static int list_empty_careful(const struct list_head *head)
Definition: list.h:138
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
void wait_queue_destroy(struct __wait_queue *wait)
Definition: linux.c:142
#define __set_current_state(state)
Definition: module.h:506
#define spin_lock_irqsave(sl, flags)
Definition: module.h:308
#define spin_unlock_irqrestore(sl, flags)
Definition: module.h:309
struct list_head task_list
Definition: module.h:479

◆ free_buffer_head()

void free_buffer_head ( struct buffer_head bh)

Definition at line 346 of file linux.c.

347{
348 if (bh) {
349 if (bh->b_mdl) {
350
351 DEBUG(DL_BH, ("bh=%p mdl=%p (Flags:%xh VA:%p) released.\n", bh, bh->b_mdl,
352 bh->b_mdl->MdlFlags, bh->b_mdl->MappedSystemVa));
353 if (IsFlagOn(bh->b_mdl->MdlFlags, MDL_MAPPED_TO_SYSTEM_VA)) {
354 MmUnmapLockedPages(bh->b_mdl->MappedSystemVa, bh->b_mdl);
355 }
357 }
358 if (bh->b_bcb) {
360 }
361
362 DEBUG(DL_BH, ("bh=%p freed.\n", bh));
363 DEC_MEM_COUNT(PS_BUFF_HEAD, bh, sizeof(struct buffer_head));
364 kmem_cache_free(g_jbh.bh_cache, bh);
365 atomic_dec(&g_jbh.bh_count);
366 }
367}
static void atomic_dec(atomic_t volatile *v)
Definition: atomic.h:107
#define PS_BUFF_HEAD
Definition: common.h:35
#define DEC_MEM_COUNT(_i, _p, _s)
Definition: ext2fs.h:608
VOID Ext2DestroyMdl(IN PMDL Mdl)
Definition: block.c:97
#define IsFlagOn(a, b)
Definition: ext2fs.h:177
void kmem_cache_free(kmem_cache_t *kc, void *p)
Definition: linux.c:103
VOID NTAPI MmUnmapLockedPages(IN PVOID BaseAddress, IN PMDL Mdl)
Definition: mdlsup.c:837
VOID NTAPI CcUnpinDataForThread(IN PVOID Bcb, IN ERESOURCE_THREAD ResourceThreadId)
Definition: pinsup.c:991
void * b_bcb
Definition: module.h:728
PMDL b_mdl
Definition: module.h:727
ULONG_PTR ERESOURCE_THREAD
Definition: extypes.h:208
#define MDL_MAPPED_TO_SYSTEM_VA
Definition: mmtypes.h:18

Referenced by Ext2bhReaperThread(), Ext2DropBH(), get_block_bh_mdl(), and get_block_bh_pin().

◆ free_pages()

void free_pages ( unsigned long  addr,
unsigned int  order 
)

◆ freeze_bdev()

struct super_block * freeze_bdev ( struct block_device )

◆ fsync_bdev()

int fsync_bdev ( struct block_device )

◆ fsync_no_super()

int fsync_no_super ( struct block_device )

◆ fsync_super()

int fsync_super ( struct super_block )

◆ get_bh()

static void get_bh ( struct buffer_head bh)
inlinestatic

Definition at line 944 of file module.h.

945{
946 atomic_inc(&bh->b_count);
947}
static void atomic_inc(atomic_t volatile *v)
Definition: atomic.h:95

Referenced by __journal_remove_journal_head(), get_block_bh_mdl(), get_block_bh_pin(), journal_add_journal_head(), ll_rw_block(), and sync_dirty_buffer().

◆ get_block_bh()

struct buffer_head * get_block_bh ( struct block_device bdev,
sector_t  block,
unsigned long  size,
int  zero 
)

Definition at line 782 of file linux.c.

788{
789 return get_block_bh_pin(bdev, block, size, zero);
790}
struct buffer_head * get_block_bh_pin(struct block_device *bdev, sector_t block, unsigned long size, int zero)
Definition: linux.c:611
int zero
Definition: sehframes.cpp:29

Referenced by __getblk(), sb_getblk(), and sb_getblk_zero().

◆ init_buffer()

void init_buffer ( struct buffer_head ,
bh_end_io_t ,
void  
)

◆ init_waitqueue_head()

void init_waitqueue_head ( wait_queue_head_t q)

Definition at line 115 of file linux.c.

116{
117 spin_lock_init(&q->lock);
118 INIT_LIST_HEAD(&q->task_list);
119}
#define INIT_LIST_HEAD(ptr)
Definition: list.h:24
#define spin_lock_init(sl)
Definition: module.h:305

Referenced by journal_init_common().

◆ inode_has_buffers()

int inode_has_buffers ( struct inode )

◆ invalidate_bdev()

void invalidate_bdev ( struct block_device )

◆ invalidate_bh_lrus()

void invalidate_bh_lrus ( void  )

◆ invalidate_inode_buffers()

void invalidate_inode_buffers ( struct inode )

◆ IS_ERR()

static long IS_ERR ( const void ptr)
inlinestatic

Definition at line 249 of file module.h.

250{
251 return IS_ERR_VALUE((unsigned long)(long_ptr_t)ptr);
252}
#define IS_ERR_VALUE(x)
Definition: module.h:237
static PVOID ptr
Definition: dispmode.c:27

Referenced by ext4_ext_create_new_leaf(), ext4_ext_get_blocks(), ext4_ext_insert_extent(), ext4_ext_remove_space(), ext4_ext_search_right(), and ext4_find_extent().

◆ JIFFIES()

static __u32 JIFFIES ( )
inlinestatic

Definition at line 1074 of file module.h.

1075{
1076 LARGE_INTEGER Tick;
1077
1078 KeQueryTickCount(&Tick);
1080 Tick.QuadPart /= (10000000 / HZ);
1081
1082 return Tick.LowPart;
1083}
#define HZ
Definition: module.h:1072
ULONG NTAPI KeQueryTimeIncrement(VOID)
Definition: clock.c:153
#define KeQueryTickCount(CurrentCount)
Definition: ke.h:43

◆ kmem_cache_alloc()

void * kmem_cache_alloc ( kmem_cache_t kc,
int  flags 
)

Definition at line 92 of file linux.c.

93{
94 PVOID ptr = NULL;
95 ptr = ExAllocateFromNPagedLookasideList(&(kc->la));
96 if (ptr) {
97 atomic_inc(&kc->count);
98 atomic_inc(&kc->acount);
99 }
100 return ptr;
101}
atomic_t acount
Definition: module.h:1142
atomic_t count
Definition: module.h:1141
NPAGED_LOOKASIDE_LIST la
Definition: module.h:1143

Referenced by insert_revoke_hash(), journal_alloc_journal_head(), and journal_init_revoke().

◆ kmem_cache_create()

kmem_cache_t * kmem_cache_create ( const char name,
size_t  size,
size_t  offset,
unsigned long  flags,
kmem_cache_cb_t  ctor 
)

Definition at line 48 of file linux.c.

55{
56 kmem_cache_t *kc = NULL;
57
58 kc = kmalloc(sizeof(kmem_cache_t), GFP_KERNEL);
59 if (kc == NULL) {
60 goto errorout;
61 }
62
63 memset(kc, 0, sizeof(kmem_cache_t));
65 &kc->la,
66 NULL,
67 NULL,
68 0,
69 size,
70 'JBKC',
71 0);
72
73 kc->size = size;
74 strncpy(kc->name, name, 31);
75 kc->constructor = ctor;
76
77errorout:
78
79 return kc;
80}
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
VOID NTAPI ExInitializeNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
Definition: lookas.c:218
#define kmalloc(size, gfp)
Definition: module.h:1125
#define GFP_KERNEL
Definition: module.h:668
LPFNCONSTRUCTOR ctor
Definition: msctf.c:83
#define memset(x, y, z)
Definition: compat.h:39
CHAR name[32]
Definition: module.h:1138
ULONG size
Definition: module.h:1140
kmem_cache_cb_t constructor
Definition: module.h:1144

Referenced by ext2_init_bh(), Ext2InitializeVcb(), journal_init_handle_cache(), journal_init_journal_head_cache(), and journal_init_revoke_caches().

◆ kmem_cache_destroy()

int kmem_cache_destroy ( kmem_cache_t kc)

Definition at line 82 of file linux.c.

83{
84 ASSERT(kc != NULL);
85
87 kfree(kc);
88
89 return 0;
90}
VOID NTAPI ExDeleteNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside)
Definition: lookas.c:170
#define kfree(p)
Definition: module.h:1126

Referenced by Ext2DestroyVcb(), Ext2InitializeVcb(), journal_destroy_handle_cache(), journal_destroy_journal_head_cache(), journal_destroy_revoke_caches(), and journal_init_revoke_caches().

◆ kmem_cache_free()

void kmem_cache_free ( kmem_cache_t kc,
void p 
)

Definition at line 103 of file linux.c.

104{
105 if (p) {
106 atomic_dec(&kc->count);
107 ExFreeToNPagedLookasideList(&(kc->la), p);
108 }
109}
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by journal_clear_revoke(), journal_destroy_revoke(), journal_free_journal_head(), journal_init_revoke(), and tcp_tw_put().

◆ kzalloc()

void * kzalloc ( int  size,
int  flags 
)

Definition at line 34 of file linux.c.

35{
36 void *buffer = kmalloc(size, flags);
37 if (buffer) {
38 memset(buffer, 0, size);
39 }
40 return buffer;
41}
GLuint buffer
Definition: glext.h:5915

Referenced by Ext2LoadGroup(), ext4_ext_split(), ext4_find_extent(), ext4_xattr_item_alloc(), and journal_init_common().

◆ le16_add_cpu()

static void le16_add_cpu ( __le16 var,
u16  val 
)
inlinestatic

Definition at line 186 of file module.h.

187{
189}
GLuint GLfloat * val
Definition: glext.h:7180
#define le16_to_cpu
Definition: module.h:151
#define cpu_to_le16
Definition: module.h:150
const char * var
Definition: shader.c:5666

Referenced by ext4_ext_grow_indepth(), ext4_ext_insert_extent(), ext4_ext_insert_index(), ext4_ext_split(), and ext4_ext_try_to_merge_right().

◆ le32_add_cpu()

static void le32_add_cpu ( __le32 var,
u32  val 
)
inlinestatic

Definition at line 191 of file module.h.

192{
194}
#define cpu_to_le32
Definition: module.h:148
#define le32_to_cpu
Definition: module.h:149

Referenced by ext4_xattr_write_to_disk().

◆ le64_add_cpu()

static void le64_add_cpu ( __le64 var,
u64  val 
)
inlinestatic

Definition at line 196 of file module.h.

197{
199}
#define le64_to_cpu
Definition: module.h:147
#define cpu_to_le64
Definition: module.h:146

◆ ll_rw_block()

void ll_rw_block ( int  rw,
int  nr,
struct buffer_head bh[] 
)

Definition at line 862 of file linux.c.

863{
864 int i;
865
866 for (i = 0; i < nr; i++) {
867
868 struct buffer_head *bh = bhs[i];
869
870 if (rw == SWRITE)
871 lock_buffer(bh);
872 else if (test_set_buffer_locked(bh))
873 continue;
874
875 if (rw == WRITE || rw == SWRITE) {
876 if (test_clear_buffer_dirty(bh)) {
877 get_bh(bh);
878 submit_bh(WRITE, bh);
879 continue;
880 }
881 } else {
882 if (!buffer_uptodate(bh)) {
883 get_bh(bh);
884 submit_bh(rw, bh);
885 continue;
886 }
887 }
888 unlock_buffer(bh);
889 }
890}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void unlock_buffer(struct buffer_head *bh)
Definition: linux.c:853
int submit_bh(int rw, struct buffer_head *bh)
Definition: linux.c:792
#define SWRITE
Definition: module.h:1178
static void lock_buffer(struct buffer_head *bh)
Definition: module.h:1028
static void get_bh(struct buffer_head *bh)
Definition: module.h:944
#define rw
Definition: rosglue.h:38

Referenced by __brelse(), bh_submit_read(), journal_get_superblock(), and journal_update_superblock().

◆ load_nls()

struct nls_table * load_nls ( char charset)

Definition at line 218 of file nls_base.c.

219{
220 struct nls_table *nls;
221#ifdef CONFIG_KMOD
222 int ret;
223#endif
224
226 if (nls)
227 return nls;
228
229#ifdef CONFIG_KMOD
230 ret = request_module("nls_%s", charset);
231 if (ret != 0) {
232 printk("Unable to load NLS charset %s\n", charset);
233 return NULL;
234 }
236#endif
237 return nls;
238}
CFF_Charset charset
Definition: cffcmap.c:138
#define nls
Definition: kernel32.h:13
#define printk
Definition: module.h:231
static struct nls_table * find_nls(char *charset)
Definition: nls_base.c:202
int ret

Referenced by DriverEntry(), Ext2ProcessGlobalProperty(), Ext2ProcessVolumeProperty(), init_nls_euc_jp(), and init_nls_koi8_ru().

◆ load_nls_default()

struct nls_table * load_nls_default ( void  )

◆ lock_buffer()

static void lock_buffer ( struct buffer_head bh)
inlinestatic

Definition at line 1028 of file module.h.

1029{
1030 might_sleep();
1031 if (test_set_buffer_locked(bh))
1032 __lock_buffer(bh);
1033}
void __lock_buffer(struct buffer_head *bh)
Definition: linux.c:849
#define might_sleep()
Definition: module.h:450

Referenced by do_one_pass(), journal_get_descriptor_buffer(), ll_rw_block(), sync_dirty_buffer(), test_createbitmap(), and test_createbitmapfromsource().

◆ map_bh()

static void map_bh ( struct buffer_head bh,
struct super_block sb,
sector_t  block 
)
inlinestatic

Definition at line 1007 of file module.h.

1008{
1009 set_buffer_mapped(bh);
1010 bh->b_bdev = sb->s_bdev;
1011 bh->b_blocknr = block;
1012 bh->b_size = sb->s_blocksize;
1013}

◆ mark_buffer_async_write()

void mark_buffer_async_write ( struct buffer_head bh)

◆ mark_buffer_dirty()

◆ mark_buffer_dirty_inode()

void mark_buffer_dirty_inode ( struct buffer_head bh,
struct inode inode 
)

◆ need_resched()

static need_resched ( )
inlinestatic

Definition at line 444 of file module.h.

444 {
445#endif
446 return FALSE;
447}

◆ page_zero_new_buffers()

void page_zero_new_buffers ( struct page page,
unsigned  from,
unsigned  to 
)

◆ prepare_to_wait()

void prepare_to_wait ( wait_queue_head_t q,
wait_queue_t wait,
int  state 
)

Definition at line 212 of file linux.c.

213{
214 unsigned long flags;
215 struct __wait_queue *wait = *waiti;
216
217 wait->flags &= ~WQ_FLAG_EXCLUSIVE;
218 spin_lock_irqsave(&q->lock, flags);
219 if (list_empty(&wait->task_list))
220 __add_wait_queue(q, wait);
221 /*
222 * don't alter the task state if this is just going to
223 * queue an async wait queue callback
224 */
225 if (is_sync_wait(wait))
228}
static int state
Definition: maze.c:121
static int list_empty(struct list_entry *head)
Definition: list.h:58
static void __add_wait_queue(wait_queue_head_t *head, struct __wait_queue *new)
Definition: linux.c:147
#define is_sync_wait(wait)
Definition: module.h:504
#define set_current_state(state)
Definition: module.h:505
unsigned int flags
Definition: module.h:476

◆ prepare_to_wait_exclusive()

void prepare_to_wait_exclusive ( wait_queue_head_t q,
wait_queue_t wait,
int  state 
)

Definition at line 231 of file linux.c.

232{
233 unsigned long flags;
234 struct __wait_queue *wait = *waiti;
235
236 wait->flags |= WQ_FLAG_EXCLUSIVE;
237 spin_lock_irqsave(&q->lock, flags);
238 if (list_empty(&wait->task_list))
240 /*
241 * don't alter the task state if this is just going to
242 * queue an async wait queue callback
243 */
244 if (is_sync_wait(wait))
247}
static void __add_wait_queue_tail(wait_queue_head_t *head, struct __wait_queue *new)
Definition: linux.c:155
#define WQ_FLAG_EXCLUSIVE
Definition: module.h:472

◆ PTR_ERR()

static long PTR_ERR ( const void ptr)
inlinestatic

Definition at line 244 of file module.h.

245{
246 return (long)(long_ptr_t) ptr;
247}

Referenced by ext4_ext_create_new_leaf(), ext4_ext_get_blocks(), ext4_ext_insert_extent(), ext4_ext_search_right(), and ext4_find_extent().

◆ put_bh()

static void put_bh ( struct buffer_head bh)
inlinestatic

Definition at line 949 of file module.h.

950{
951 if (bh)
952 __brelse(bh);
953}

Referenced by submit_bh_mdl(), and submit_bh_pin().

◆ register_nls()

int register_nls ( struct nls_table nls)

Definition at line 162 of file nls_base.c.

163{
164 struct nls_table ** tmp = &tables;
165
166 if (!nls)
167 return -EINVAL;
168 if (nls->next)
169 return -EBUSY;
170
172 while (*tmp) {
173 if (nls == *tmp) {
175 return -EBUSY;
176 }
177 tmp = &(*tmp)->next;
178 }
179 nls->next = tables;
180 tables = nls;
182 return 0;
183}
#define EINVAL
Definition: acclib.h:90
#define EBUSY
Definition: acclib.h:87
#define spin_unlock(sl)
Definition: module.h:307
#define spin_lock(sl)
Definition: module.h:306
struct nls_table * tables
Definition: nls_base.c:22
spinlock_t nls_lock
Definition: nls_base.c:23
struct define * next
Definition: compiler.c:65
struct nls_table * next
Definition: module.h:1050

Referenced by init_nls_ascii(), init_nls_cp1250(), init_nls_cp1251(), init_nls_cp1255(), init_nls_cp437(), init_nls_cp737(), init_nls_cp775(), init_nls_cp850(), init_nls_cp852(), init_nls_cp855(), init_nls_cp857(), init_nls_cp860(), init_nls_cp861(), init_nls_cp862(), init_nls_cp863(), init_nls_cp864(), init_nls_cp865(), init_nls_cp866(), init_nls_cp869(), init_nls_cp874(), init_nls_cp932(), init_nls_cp936(), init_nls_cp949(), init_nls_cp950(), init_nls_euc_jp(), init_nls_iso8859_1(), init_nls_iso8859_13(), init_nls_iso8859_14(), init_nls_iso8859_15(), init_nls_iso8859_2(), init_nls_iso8859_3(), init_nls_iso8859_4(), init_nls_iso8859_5(), init_nls_iso8859_6(), init_nls_iso8859_7(), init_nls_iso8859_9(), init_nls_koi8_r(), init_nls_koi8_ru(), init_nls_koi8_u(), and init_nls_utf8().

◆ remove_inode_buffers()

int remove_inode_buffers ( struct inode inode)

◆ RtlUlongByteSwap()

ULONG FASTCALL RtlUlongByteSwap ( IN ULONG  Source)

Definition at line 61 of file byteswap.c.

63{
64#if defined(_M_AMD64)
65 return _byteswap_ulong(Source);
66#else
68#endif
69}
_Check_return_ unsigned long __cdecl _byteswap_ulong(_In_ unsigned long _Long)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
unsigned short USHORT
Definition: pedump.c:61
uint32_t ULONG
Definition: typedefs.h:59
#define RtlUshortByteSwap(_x)
Definition: rtlfuncs.h:3214

◆ RtlUlonglongByteSwap()

ULONGLONG FASTCALL RtlUlonglongByteSwap ( IN ULONGLONG  Source)

Definition at line 86 of file byteswap.c.

88{
89#if defined(_M_AMD64)
91#else
92 return ((ULONGLONG) RtlUlongByteSwap (Source) << 32) | RtlUlongByteSwap (Source>>32);
93#endif
94}
#define RtlUlongByteSwap(_x)
Definition: compat.h:815
_Check_return_ unsigned __int64 __cdecl _byteswap_uint64(_In_ unsigned __int64)
uint64_t ULONGLONG
Definition: typedefs.h:67

◆ RtlUshortByteSwap()

USHORT FASTCALL RtlUshortByteSwap ( IN USHORT  Source)

Definition at line 37 of file byteswap.c.

39{
40#if defined(_M_AMD64)
42#else
43 return (Source >> 8) | (Source << 8);
44#endif
45}
_Check_return_ unsigned short __cdecl _byteswap_ushort(_In_ unsigned short _Short)

◆ sb_bread()

static struct buffer_head * sb_bread ( struct super_block sb,
sector_t  block 
)
inlinestatic

Definition at line 988 of file module.h.

989{
990 struct buffer_head *bh = __getblk(sb->s_bdev, block, sb->s_blocksize);
991 if (!bh)
992 return NULL;
993 if (!buffer_uptodate(bh) && (bh_submit_read(bh) < 0)) {
994 brelse(bh);
995 return NULL;
996 }
997 return bh;
998}
struct buffer_head * __getblk(struct block_device *bdev, sector_t block, unsigned long size)
Definition: linux.c:799
int bh_submit_read(struct buffer_head *bh)
Definition: linux.c:892

◆ sb_find_get_block()

static struct buffer_head * sb_find_get_block ( struct super_block sb,
sector_t  block 
)
inlinestatic

Definition at line 1001 of file module.h.

1002{
1003 return __find_get_block(sb->s_bdev, block, sb->s_blocksize);
1004}
struct buffer_head * __find_get_block(struct block_device *bdev, sector_t block, unsigned long size)
Definition: linux.c:932

◆ sb_getblk()

static struct buffer_head * sb_getblk ( struct super_block sb,
sector_t  block 
)
inlinestatic

Definition at line 976 of file module.h.

977{
978 return get_block_bh(sb->s_bdev, block, sb->s_blocksize, 0);
979}
struct buffer_head * get_block_bh(struct block_device *bdev, sector_t block, unsigned long size, int zero)
Definition: linux.c:782

Referenced by Ext2CheckSetBlock(), Ext2FreeInode(), Ext2LoadBlock(), Ext2LoadBuffer(), Ext2LoadGroupBH(), Ext2NewBlock(), Ext2NewInode(), Ext2SaveBuffer(), Ext2ZeroBuffer(), ext3_bread(), and extents_bread().

◆ sb_getblk_zero()

static struct buffer_head * sb_getblk_zero ( struct super_block sb,
sector_t  block 
)
inlinestatic

Definition at line 982 of file module.h.

983{
984 return get_block_bh(sb->s_bdev, block, sb->s_blocksize, 1);
985}

Referenced by Ext2NewBlock(), Ext2NewInode(), Ext2SaveBlock(), Ext2SaveBuffer(), Ext2ZeroBuffer(), and extents_bwrite().

◆ set_bh_page()

void set_bh_page ( struct buffer_head bh,
struct page page,
unsigned long  offset 
)

◆ set_bit()

static int set_bit ( int  nr,
volatile unsigned long addr 
)
inlinestatic

__set_bit - Set a bit in memory @nr: the bit to set @addr: the address to start counting from

Unlike set_bit(), this function is non-atomic and may be reordered. If it's called on the same region of memory simultaneously, the effect may be that only one operation succeeds.

Definition at line 340 of file module.h.

341{
342 addr += (nr >> ORDER_PER_LONG);
343 nr &= (BITS_PER_LONG - 1);
344
345 return !!(InterlockedOr(addr, (1 << nr)) & (1 << nr));
346}
#define InterlockedOr
Definition: interlocked.h:224

Referenced by test_and_set_bit().

◆ spin_needbreak()

static int spin_needbreak ( spinlock_t lock)
inlinestatic

Definition at line 318 of file module.h.

319{
320#ifdef CONFIG_PREEMPT
321 return spin_is_contended(lock);
322#else
323 return 0;
324#endif
325}
rwlock_t lock
Definition: tcpcore.h:0

◆ submit_bh()

int submit_bh ( int  rw,
struct buffer_head bh 
)

Definition at line 792 of file linux.c.

793{
794 return submit_bh_pin(rw, bh);
795}
int submit_bh_pin(int rw, struct buffer_head *bh)
Definition: linux.c:727

Referenced by ll_rw_block(), and sync_dirty_buffer().

◆ sync_blockdev()

int sync_blockdev ( struct block_device bdev)

Definition at line 919 of file linux.c.

920{
921 PEXT2_VCB Vcb = (PEXT2_VCB) bdev->bd_priv;
923 return 0;
924}
NTSTATUS Ext2FlushVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
Definition: flush.c:43

Referenced by Ext2RecoverJournal(), and journal_recover().

◆ sync_dirty_buffer()

int sync_dirty_buffer ( struct buffer_head bh)

Definition at line 898 of file linux.c.

899{
900 int ret = 0;
901
902 ASSERT(atomic_read(&bh->b_count) <= 1);
903 lock_buffer(bh);
904 if (test_clear_buffer_dirty(bh)) {
905 get_bh(bh);
906 ret = submit_bh(WRITE, bh);
907 wait_on_buffer(bh);
908 } else {
909 unlock_buffer(bh);
910 }
911 return ret;
912}
static void wait_on_buffer(struct buffer_head *bh)
Definition: module.h:1021

Referenced by journal_convert_superblock_v1(), and journal_update_superblock().

◆ sync_mapping_buffers()

int sync_mapping_buffers ( struct address_space *  mapping)

◆ test_and_clear_bit()

static int test_and_clear_bit ( int  nr,
volatile unsigned long addr 
)
inlinestatic

test_and_clear_bit - Clear a bit and return its old value @nr: Bit to clear @addr: Address to count from

This operation is atomic and cannot be reordered. It also implies a memory barrier.

Definition at line 375 of file module.h.

376{
377 return clear_bit(nr, addr);
378}
static int clear_bit(int nr, volatile unsigned long *addr)
Definition: module.h:359

◆ test_and_set_bit()

static int test_and_set_bit ( int  nr,
volatile unsigned long addr 
)
inlinestatic

test_and_set_bit - Set a bit and return its old value @nr: Bit to set @addr: Address to count from

This operation is atomic and cannot be reordered. It also implies a memory barrier.

Definition at line 397 of file module.h.

398{
399 return set_bit(nr, addr);
400}
static int set_bit(int nr, volatile unsigned long *addr)
Definition: module.h:340

◆ test_bit()

static int test_bit ( int  nr,
volatile const unsigned long addr 
)
static

Definition at line 383 of file module.h.

384{
385 return !!((1 << (nr & (BITS_PER_LONG - 1))) &
386 (addr[nr >> ORDER_PER_LONG]));
387}

Referenced by __bit_spin_unlock(), bit_spin_is_locked(), bit_spin_lock(), and bit_spin_unlock().

◆ thaw_bdev()

void thaw_bdev ( struct block_device ,
struct super_block  
)

◆ truncate_inode_pages()

void truncate_inode_pages ( struct address_space *  ,
loff_t   
)

◆ try_to_free_buffers()

int try_to_free_buffers ( struct page )

◆ unload_nls()

void unload_nls ( struct nls_table nls)

Definition at line 240 of file nls_base.c.

241{
242 module_put(nls->owner);
243}
#define module_put(x)
Definition: module.h:276

Referenced by exit_nls_euc_jp(), and exit_nls_koi8_ru().

◆ unlock_buffer()

void unlock_buffer ( struct buffer_head bh)

Definition at line 853 of file linux.c.

854{
855 clear_buffer_locked(bh);
856}

Referenced by do_one_pass(), journal_get_descriptor_buffer(), ll_rw_block(), submit_bh_mdl(), submit_bh_pin(), and sync_dirty_buffer().

◆ unmap_underlying_metadata()

void unmap_underlying_metadata ( struct block_device bdev,
sector_t  block 
)

◆ unregister_nls()

◆ utf8_mbstowcs()

int utf8_mbstowcs ( wchar_t pwcs,
const __u8 s,
int  n 
)

Definition at line 79 of file nls_base.c.

80{
81 __u16 *op;
82 const __u8 *ip;
83 int size;
84
85 op = pwcs;
86 ip = s;
87 while (*ip && n > 0) {
88 if (*ip & 0x80) {
89 size = utf8_mbtowc(op, ip, n);
90 if (size == -1) {
91 /* Ignore character and move on */
92 ip++;
93 n--;
94 } else {
95 op++;
96 ip += size;
97 n -= size;
98 }
99 } else {
100 *op++ = *ip++;
101 n--;
102 }
103 }
104 return (int)(op - pwcs);
105}
u16 __u16
Definition: btrfs.h:18
u8 __u8
Definition: btrfs.h:17
UINT op
Definition: effect.c:236
GLdouble s
Definition: gl.h:2039
int utf8_mbtowc(wchar_t *p, const __u8 *s, int n)
Definition: nls_base.c:49
Definition: dhcpd.h:62

◆ utf8_mbtowc()

int utf8_mbtowc ( wchar_t p,
const __u8 s,
int  n 
)

Definition at line 49 of file nls_base.c.

50{
51 long l;
52 int c0, c, nc;
53 struct utf8_table *t;
54
55 nc = 0;
56 c0 = *s;
57 l = c0;
58 for (t = utf8_table; t->cmask; t++) {
59 nc++;
60 if ((c0 & t->cmask) == t->cval) {
61 l &= t->lmask;
62 if (l < t->lval)
63 return -1;
64 *p = (wchar_t)l;
65 return nc;
66 }
67 if (n <= nc)
68 return -1;
69 s++;
70 c = (*s ^ 0x80) & 0xFF;
71 if (c & 0xC0)
72 return -1;
73 l = (l << 6) | c;
74 }
75 return -1;
76}
r l[0]
Definition: byte_order.h:168
GLdouble GLdouble t
Definition: gl.h:2047
#define c
Definition: ke_i.h:80
int cmask
Definition: nls_base.c:30
long lval
Definition: nls_base.c:34
#define wchar_t
Definition: wchar.h:102

Referenced by char2uni(), and utf8_mbstowcs().

◆ utf8_wcstombs()

int utf8_wcstombs ( __u8 s,
const wchar_t pwcs,
int  maxlen 
)

Definition at line 136 of file nls_base.c.

137{
138 const __u16 *ip;
139 __u8 *op;
140 int size;
141
142 op = s;
143 ip = pwcs;
144 while (*ip && maxlen > 0) {
145 if (*ip > 0x7f) {
146 size = utf8_wctomb(op, *ip, maxlen);
147 if (size == -1) {
148 /* Ignore character and move on */
149 maxlen--;
150 } else {
151 op += size;
152 maxlen -= size;
153 }
154 } else {
155 *op++ = (__u8) *ip;
156 }
157 ip++;
158 }
159 return (int)(op - s);
160}
int utf8_wctomb(__u8 *s, wchar_t wc, int maxlen)
Definition: nls_base.c:108
#define __u8
Definition: types.h:12

◆ utf8_wctomb()

int utf8_wctomb ( __u8 s,
wchar_t  wc,
int  maxlen 
)

Definition at line 108 of file nls_base.c.

109{
110 long l;
111 int c, nc;
112 struct utf8_table *t;
113
114 if (s == 0)
115 return 0;
116
117 l = wc;
118 nc = 0;
119 for (t = utf8_table; t->cmask && maxlen; t++, maxlen--) {
120 nc++;
121 if (l <= t->lmask) {
122 c = t->shift;
123 *s = (__u8)(t->cval | (l >> c));
124 while (c > 0) {
125 c -= 6;
126 s++;
127 *s = 0x80 | (__u8)((l >> c) & 0x3F);
128 }
129 return nc;
130 }
131 }
132 return -1;
133}
long lmask
Definition: nls_base.c:33

Referenced by uni2char(), and utf8_wcstombs().

◆ wait_on_buffer()

static void wait_on_buffer ( struct buffer_head bh)
inlinestatic

Definition at line 1021 of file module.h.

1022{
1023 might_sleep();
1024 if (buffer_locked(bh) || atomic_read(&bh->b_count) == 0)
1025 __wait_on_buffer(bh);
1026}
void __wait_on_buffer(struct buffer_head *)
Definition: linux.c:858

Referenced by ext3_find_entry(), journal_get_superblock(), jread(), and sync_dirty_buffer().

◆ wait_queue_create()

struct __wait_queue * wait_queue_create ( )

Definition at line 122 of file linux.c.

123{
124 struct __wait_queue * wait = NULL;
125 wait = kmalloc(sizeof(struct __wait_queue), GFP_KERNEL);
126 if (!wait) {
127 return NULL;
128 }
129
130 memset(wait, 0, sizeof(struct __wait_queue));
132 wait->private = (void *)KeGetCurrentThread();
134 KeInitializeEvent(&(wait->event),
136 FALSE);
137
138 return wait;
139}
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define KeGetCurrentThread
Definition: hal.h:55
#define WQ_FLAG_AUTO_REMOVAL
Definition: module.h:473
@ SynchronizationEvent
void * private
Definition: module.h:477
KEVENT event
Definition: module.h:478

◆ wait_queue_destroy()

void wait_queue_destroy ( struct __wait_queue wait)

Definition at line 142 of file linux.c.

143{
144 kfree(wait);
145}

Referenced by finish_wait().

◆ wake_bit_function()

int wake_bit_function ( wait_queue_t wait,
unsigned  mode,
int  sync,
void key 
)

◆ wake_up()

int wake_up ( wait_queue_head_t queue)

Definition at line 279 of file linux.c.

280{
281 return 0; /* KeSetEvent(&wait->event, 0, FALSE); */
282}

Referenced by __log_start_commit().

◆ write_boundary_block()

void write_boundary_block ( struct block_device bdev,
sector_t  bblock,
unsigned  blocksize 
)

Variable Documentation

◆ buffer_heads_over_limit

int buffer_heads_over_limit
extern

◆ current

struct task_struct* current
extern

Definition at line 32 of file linux.c.

Referenced by _initterm(), _RTC_CheckStackVars2(), _svcauth_des(), apply_patch(), reverse_bidirectional_iterator< _BidirectionalIterator, _Tp,, _STLP_DFL_TYPE_PARAM >::base(), CcRosCreateVacb(), CcRosFlushDirtyPages(), CcRosFreeOneUnusedVacb(), CcRosGetVacb(), CcRosLookupVacb(), CcRosTraceCacheMap(), CcRosTrimCache(), cfgets(), check_access(), check_rr_dates(), check_sharing(), FxTagTracker::CheckForAbandondedTags(), chmc_section_lookup(), ConSrvConsoleProcessCtrlEvent(), ConSrvGetConsoleProcessList(), ConSrvSetConsoleProcessFocus(), context_set_pixel_format(), convertHexToHexCSV(), cs_txt(), ddraw_surface7_Flip(), DelOld(), DwDecodeSleb128(), DwDecodeUleb128(), EDIT_PaintText(), enable_allowed_controls(), enumx_Next(), enumx_Skip(), TTelnetHandler::escapeIAC(), FDICopy(), file_add(), FT_GlyphLoader_Add(), FT_GlyphLoader_Adjust_Points(), FT_GlyphLoader_Adjust_Subglyphs(), FT_GlyphLoader_CheckPoints(), FT_GlyphLoader_CheckSubGlyphs(), FT_GlyphLoader_Prepare(), FT_GlyphLoader_Rewind(), get_input_bytes(), HEXEDIT_PaintLines(), HUF_readCTable(), HUF_readDTableX1_wksp(), HUF_readDTableX2_wksp(), HUF_sort(), IMAPIPROP_GetValue(), insertIntoTree(), InsNew(), IPropData_fnGetPropList(), IPropData_fnRelease(), join_modify_update(), mallocspy_is_allocation_spyed(), MmFindRegion(), MsfsCreate(), MsfsCreateMailslot(), mystrrchr(), np_enum(), reverse_bidirectional_iterator< _BidirectionalIterator, _Tp,, _STLP_DFL_TYPE_PARAM >::operator*(), reverse_bidirectional_iterator< _BidirectionalIterator, _Tp,, _STLP_DFL_TYPE_PARAM >::operator++(), reverse_bidirectional_iterator< _BidirectionalIterator, _Tp,, _STLP_DFL_TYPE_PARAM >::operator--(), ReadCommand(), RPCRT4_RemoveThreadContextHandle(), Save(), TScroller::ScrollBack(), set_parse_status(), SetPixelFormat(), settime_how(), skip_input_bytes(), Sort(), START_TEST(), surface_load_drawable(), SYSLINK_ParseText(), test_EM_GETHANDLE(), test_GetTimeZoneInformation(), test_locking(), test_media_event(), test_one(), test_PBM_STEPIT(), test_try_transform(), test_ZombifyActCtx(), TOOLTIPS_Show(), TransactedSnapshotImpl_FindNextChild(), triangulate(), TT_Process_Composite_Component(), UDFDOSName100(), UDFDOSName200(), UDFDOSName201(), validate_patch(), validate_state_table(), VARIANT_MakeDate(), wined3d_texture_load_location(), xdrrec_getbytes(), xdrrec_putbytes(), xmlParseAttValueComplex(), xmlStringLenDecodeEntities(), xsltAddKey(), xsltApplyStripSpaces(), xsltCompilePatternInternal(), ZSTD_buildSeqStore(), ZSTD_compressBlock_btultra2(), ZSTD_compressBlock_doubleFast_extDict_generic(), ZSTD_compressBlock_doubleFast_generic(), ZSTD_compressBlock_fast_dictMatchState_generic(), ZSTD_compressBlock_fast_extDict_generic(), ZSTD_compressBlock_fast_generic(), ZSTD_compressBlock_lazy_extDict_generic(), ZSTD_compressBlock_lazy_generic(), ZSTD_DUBT_findBestMatch(), ZSTD_DUBT_findBetterDictMatch(), ZSTD_fillDoubleHashTable(), ZSTD_fillHashTable(), ZSTD_HcFindBestMatch_generic(), ZSTD_insertBt1(), ZSTD_insertBtAndGetAllMatches(), ZSTD_insertDUBT1(), ZSTD_ldm_generateSequences_internal(), ZSTD_ldm_limitTableUpdate(), ZSTD_window_needOverflowCorrection(), and FxTagTracker::~FxTagTracker().