Documentation Fix

This commit is contained in:
Sears Russell 2006-10-05 00:46:18 +00:00
parent 212e3c4626
commit 84dcdf228f
7 changed files with 22 additions and 12 deletions

View file

@ -97,6 +97,7 @@ typedef struct Page_s Page_s;
typedef struct Page_s Page;
/**
* @param xid The transaction that is pinning the page (used by page-level locking implementations.)
* @param pageid ID of the page you want to load
* @return fully formed Page type
*/

View file

@ -41,7 +41,9 @@ terms specified in this license.
---*/
/**
* @file Functions to manage the in-memory pool of free page buffers.
* @file
*
* Functions to manage the in-memory pool of free page buffers.
* $Id$
*/

View file

@ -47,10 +47,10 @@ terms specified in this license.
* http://sources.redhat.com/autobook/
*
* The idea behind this file is twofold. First, we want to keep as
* much of the #ifdef portability nonsense in here as possible.
* Second, we allow users to #include headers that in turn #include
* much of the \#ifdef portability nonsense in here as possible.
* Second, we allow users to \#include headers that in turn \#include
* common.h. If they do so, then their code should continue to 'do
* the right thing' and build, even though they do not #include the
* the right thing' and build, even though they do not \#include the
* config.h file that all of the LLADD stuff uses.
*
* @todo Need to make sure every .c file actually includes this thing, and

View file

@ -44,7 +44,7 @@ terms specified in this license.
*
* defines various constants
*
* @todo Sometime, LLADD's #includes need to be cleaned up. In
* @todo Sometime, LLADD's \#includes need to be cleaned up. In
* particular, we should make sure everything directly or indirectly
* includes this file, common.h, and constants.h
*
@ -222,5 +222,6 @@ extern const short SLOT_TYPE_LENGTHS[];
#define TALLOC_REGION_SIZE 100 // Pages
#define FILE_PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
#endif

View file

@ -28,7 +28,9 @@ void Tconsumer_close(int xid, lladdConsumer_t * it);
@param xid Transaction id @param it The consumer
@param key Can be null if there is no key.
@param value Can be null if there is no value, but both can't be null. (Or can they???)
@param keySize Length of key in bytes
@param val Can be null if there is no value, but both can't be null. (Or can they???)
@param valSize Length of value in bytes.
@return Error. Blocks when full.

View file

@ -204,6 +204,9 @@ void pageDeInit();
* does not update dirtyPages. Similarly, if the page is already
* dirty, there is no need to udpate dirtyPages.
*
* @param xid The transaction that is writing to the page, or -1 if
* outside of a transaction.
*
* @param page You must have a writelock on page before calling this
* function.
*
@ -243,6 +246,7 @@ void writeRecord(int xid, Page * page, lsn_t lsn, recordid rid, const void *dat)
void writeRecordUnlocked(int xid, Page * page, lsn_t lsn, recordid rid, const void *dat);
/**
* @param xid transaction ID
* @param page a pointer to the pinned page that contains the record.
* @param rid the record to be written
* @param dat buffer for data
* @return 0 on success, lladd error code on failure

View file

@ -13,7 +13,7 @@
#include <sys/types.h>
#include <sys/stat.h>
/** For O_DIRECT. It's unclear that this is the correct thing to #define, but it works under linux. */
/** For O_DIRECT. It's unclear that this is the correct thing to \#define, but it works under linux. */
#define __USE_GNU
#include <fcntl.h>
@ -122,17 +122,15 @@ void pageWrite(Page * ret) {
void openPageFile() {
DEBUG("Opening storefile.\n");
if(pageFile_isDurable) {
#ifdef PAGE_FILE_O_DIRECT
stable = open (STORE_FILE, O_CREAT | O_RDWR | O_DIRECT, S_IRWXU | S_IRWXG | S_IRWXO);
stable = open (STORE_FILE, O_CREAT | O_RDWR | O_DIRECT, FILE_PERM); //S_IRWXU | S_IRWXG | S_IRWXO);
#else
stable = open (STORE_FILE, O_CREAT | O_RDWR, S_IRWXU | S_IRWXG | S_IRWXO);
stable = open (STORE_FILE, O_CREAT | O_RDWR, FILE_PERM);//S_IRWXU | S_IRWXG | S_IRWXO);
#endif
} else {
if(!pageFile_isDurable) {
fprintf(stderr, "\n**********\n");
fprintf (stderr, "pageFile.c: pageFile_isDurable==0; the page file will not force writes to disk.\n");
fprintf (stderr, " Transactions will not be durable if the system crashes.\n**********\n");
stable = open (STORE_FILE, O_CREAT | O_RDWR , S_IRWXU | S_IRWXG | S_IRWXO);
}
if(stable == -1) {
perror("couldn't open storefile");
@ -145,6 +143,7 @@ void openPageFile() {
}
void forcePageFile() {
if(pageFile_isDurable) {
#ifndef PAGE_FILE_O_DIRECT
#ifdef HAVE_FDATASYNC
fdatasync(stable);
@ -152,6 +151,7 @@ void forcePageFile() {
fsync(stable);
#endif // HAVE_FDATASYNC
#endif // PAGE_FILE_O_DIRECT
}
}
void closePageFile() {