diff --git a/config/check_spidermonkey_style.py b/config/check_spidermonkey_style.py index 8a074cc98d0f..d771b589e86f 100644 --- a/config/check_spidermonkey_style.py +++ b/config/check_spidermonkey_style.py @@ -71,6 +71,8 @@ included_inclnames_to_ignore = set([ 'prcvar.h', # NSPR 'prerror.h', # NSPR 'prinit.h', # NSPR + 'prio.h', # NSPR + 'private/pprio.h', # NSPR 'prlink.h', # NSPR 'prlock.h', # NSPR 'prprf.h', # NSPR diff --git a/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h b/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h index 78f1f30f683c..a876546ba1bd 100644 --- a/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h +++ b/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h @@ -726,7 +726,7 @@ struct AssemblerBufferWithConstantPools : public AssemblerBuffer -#include + +#include "jspubtd.h" namespace nspr { class Thread; @@ -138,6 +139,58 @@ PR_TicksPerSecond(); PRStatus PR_WaitCondVar(PRCondVar* cvar, PRIntervalTime timeout); +int32_t +PR_FileDesc2NativeHandle(PRFileDesc* fd); + +enum PRFileType +{ + PR_FILE_FILE = 1, + PR_FILE_DIRECTORY = 2, + PR_FILE_OTHER = 3 +}; + +struct PRFileInfo +{ + PRFileType type; + int32_t size; + int64_t creationTime; + int64_t modifyTime; +}; + +PRStatus +PR_GetOpenFileInfo(PRFileDesc *fd, PRFileInfo *info); + +enum PRSeekWhence +{ + PR_SEEK_SET = 0, + PR_SEEK_CUR = 1, + PR_SEEK_END = 2 +}; + +int32_t +PR_Seek(PRFileDesc *fd, int32_t offset, PRSeekWhence whence); + +enum PRFileMapProtect +{ + PR_PROT_READONLY, + PR_PROT_READWRITE, + PR_PROT_WRITECOPY +}; + +struct PRFileMap; + +PRFileMap* +PR_CreateFileMap(PRFileDesc *fd, int64_t size, PRFileMapProtect prot); + +void* +PR_MemMap(PRFileMap *fmap, int64_t offset, uint32_t len); + +PRStatus +PR_MemUnmap(void *addr, uint32_t len); + +PRStatus +PR_CloseFileMap(PRFileMap *fmap); + #endif /* JS_POSIX_NSPR */ #endif /* vm_PosixNSPR_h */