From c0d9e7b96ab574a565b1795d87b21a06bc1d724a Mon Sep 17 00:00:00 2001 From: marko <> Date: Tue, 19 May 2009 09:05:50 +0000 Subject: [PATCH] branches/zip: Add proper comments to some file page accessors. --- fil/fil0fil.c | 16 ++++++++++++---- include/fil0fil.h | 17 +++++++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/fil/fil0fil.c b/fil/fil0fil.c index 22fe94f6e2b..a1e5bb22d84 100644 --- a/fil/fil0fil.c +++ b/fil/fil0fil.c @@ -4687,17 +4687,25 @@ fil_addr_is_null( } /************************************************************************ -Accessor functions for a file page */ +Get the predecessor of a file page. */ UNIV_INTERN ulint -fil_page_get_prev(const byte* page) +fil_page_get_prev( +/*==============*/ + /* out: FIL_PAGE_PREV */ + const byte* page) /* in: file page */ { return(mach_read_from_4(page + FIL_PAGE_PREV)); } +/************************************************************************ +Get the successor of a file page. */ UNIV_INTERN ulint -fil_page_get_next(const byte* page) +fil_page_get_next( +/*==============*/ + /* out: FIL_PAGE_NEXT */ + const byte* page) /* in: file page */ { return(mach_read_from_4(page + FIL_PAGE_NEXT)); } @@ -4708,7 +4716,7 @@ UNIV_INTERN void fil_page_set_type( /*==============*/ - byte* page, /* in: file page */ + byte* page, /* in/out: file page */ ulint type) /* in: type */ { ut_ad(page); diff --git a/include/fil0fil.h b/include/fil0fil.h index 6e2ace232f6..f1496c01f12 100644 --- a/include/fil0fil.h +++ b/include/fil0fil.h @@ -684,19 +684,28 @@ fil_addr_is_null( /* out: TRUE if undefined */ fil_addr_t addr); /* in: address */ /************************************************************************ -Accessor functions for a file page */ +Get the predecessor of a file page. */ UNIV_INTERN ulint -fil_page_get_prev(const byte* page); +fil_page_get_prev( +/*==============*/ + /* out: FIL_PAGE_PREV */ + const byte* page); /* in: file page */ +/************************************************************************ +Get the successor of a file page. */ +UNIV_INTERN ulint -fil_page_get_next(const byte* page); +fil_page_get_next( +/*==============*/ + /* out: FIL_PAGE_NEXT */ + const byte* page): /* in: file page */ /************************************************************************* Sets the file page type. */ UNIV_INTERN void fil_page_set_type( /*==============*/ - byte* page, /* in: file page */ + byte* page, /* in/out: file page */ ulint type); /* in: type */ /************************************************************************* Gets the file page type. */