Back to index

lightning-sunbird  0.9+nobinonly
Functions
prmmap.c File Reference
#include "primpl.h"

Go to the source code of this file.

Functions

 PR_IMPLEMENT (PRFileMap *)
 PR_IMPLEMENT (PRInt32)
 PR_IMPLEMENT (void *)
 PR_IMPLEMENT (PRStatus)

Function Documentation

Definition at line 48 of file prmmap.c.

{
    PRFileMap *fmap;

    PR_ASSERT(prot == PR_PROT_READONLY || prot == PR_PROT_READWRITE
            || prot == PR_PROT_WRITECOPY);
    fmap = PR_NEWZAP(PRFileMap);
    if (NULL == fmap) {
       PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
       return NULL;
    }
    fmap->fd = fd;
    fmap->prot = prot;
    if (_PR_MD_CREATE_FILE_MAP(fmap, size) == PR_SUCCESS) {
       return fmap;
    } else {
       PR_DELETE(fmap);
       return NULL;
    }
}

Definition at line 72 of file prmmap.c.

PR_IMPLEMENT ( void )

Definition at line 77 of file prmmap.c.

{
    return _PR_MD_MEM_MAP(fmap, offset, len);
}

Definition at line 85 of file prmmap.c.

{
    return _PR_MD_MEM_UNMAP(addr, len);
}