+typedef unsigned long int ulint;
+typedef long int lint;
+typedef struct rw_lock_struct rw_lock_t;
+struct rw_lock_struct {
+ volatile lint lock_word;
+ volatile ulint reader_count;
+ volatile ulint writer;
+};
+static inline ulint rw_lock_x_lock_func_nowait(rw_lock_t * lock,
+ const char *file_name,
+ ulint line)
+{
+ if (lock->reader_count == 0) {
+ if (__sync_lock_test_and_set(&(lock->writer), 351) == 350) {
+ retry_x_lock:if (__sync_sub_and_fetch(&(lock->lock_word), 0x00100000)
+ == 0) {
+ if (__sync_fetch_and_add
+ (&(lock->lock_word), 0x00100000) == 0)
+ goto retry_x_lock;
+ }
+ }
+ }
+}
+
+typedef struct mtr_struct mtr_t;
+typedef struct buf_block_struct buf_block_t;
+typedef unsigned char buf_frame_t;
+struct buf_block_struct {
+ rw_lock_t lock;
+ struct {
+ } awe_LRU_free_mapped;
+};
+buf_frame_t *buf_page_get_gen(ulint space, ulint offset, ulint rw_latch,
+ buf_frame_t * guess, ulint mode, const char *file,
+ ulint line, mtr_t * mtr)
+{
+ buf_block_t *block;
+ ulint success;
+ if (mode == 12) {
+ if (rw_latch == 1) {
+ success =
+ rw_lock_x_lock_func_nowait(&(block->lock), file,
+ line);
+ }
+ }
+}