1 typedef unsigned long int ulint;
3 typedef struct rw_lock_struct rw_lock_t;
4 struct rw_lock_struct {
5 volatile lint lock_word;
6 volatile ulint reader_count;
9 static inline ulint rw_lock_x_lock_func_nowait(rw_lock_t * lock,
10 const char *file_name,
13 if (lock->reader_count == 0) {
14 if (__sync_lock_test_and_set(&(lock->writer), 351) == 350) {
15 retry_x_lock:if (__sync_sub_and_fetch(&(lock->lock_word), 0x00100000)
17 if (__sync_fetch_and_add
18 (&(lock->lock_word), 0x00100000) == 0)
25 typedef struct mtr_struct mtr_t;
26 typedef struct buf_block_struct buf_block_t;
27 typedef unsigned char buf_frame_t;
28 struct buf_block_struct {
31 } awe_LRU_free_mapped;
33 buf_frame_t *buf_page_get_gen(ulint space, ulint offset, ulint rw_latch,
34 buf_frame_t * guess, ulint mode, const char *file,
35 ulint line, mtr_t * mtr)
42 rw_lock_x_lock_func_nowait(&(block->lock), file,