зеркало из https://github.com/mozilla/pjs.git
Add new API declaration, NSPR_API. Bugzilla #12913.
This commit is contained in:
Родитель
485ff760cf
Коммит
52c2625777
|
@ -379,189 +379,189 @@ struct protoent* getprotobynumber(int number);
|
||||||
|
|
||||||
/* Miscellaneous */
|
/* Miscellaneous */
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_cleanup_before_exit(void);
|
NSPR_API(void) _MD_cleanup_before_exit(void);
|
||||||
PR_EXTERN(void) _MD_exit(PRIntn status);
|
NSPR_API(void) _MD_exit(PRIntn status);
|
||||||
|
|
||||||
PR_EXTERN(char*) _MD_get_env(const char *name);
|
NSPR_API(char*) _MD_get_env(const char *name);
|
||||||
PR_EXTERN(PRIntn) _MD_put_env(const char *name);
|
NSPR_API(PRIntn) _MD_put_env(const char *name);
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_early_init(void);
|
NSPR_API(void) _MD_early_init(void);
|
||||||
PR_EXTERN(void) _MD_final_init(void);
|
NSPR_API(void) _MD_final_init(void);
|
||||||
|
|
||||||
/* CPU Stuff */
|
/* CPU Stuff */
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_init_cpus();
|
NSPR_API(void) _MD_init_cpus();
|
||||||
PR_EXTERN(void) _MD_wakeup_cpus();
|
NSPR_API(void) _MD_wakeup_cpus();
|
||||||
PR_EXTERN(void) _MD_start_interrupts(void);
|
NSPR_API(void) _MD_start_interrupts(void);
|
||||||
PR_EXTERN(void) _MD_stop_interrupts(void);
|
NSPR_API(void) _MD_stop_interrupts(void);
|
||||||
PR_EXTERN(void) _MD_disable_clock_interrupts(void);
|
NSPR_API(void) _MD_disable_clock_interrupts(void);
|
||||||
PR_EXTERN(void) _MD_block_clock_interrupts(void);
|
NSPR_API(void) _MD_block_clock_interrupts(void);
|
||||||
PR_EXTERN(void) _MD_unblock_clock_interrupts(void);
|
NSPR_API(void) _MD_unblock_clock_interrupts(void);
|
||||||
PR_EXTERN(void) _MD_clock_interrupt(void);
|
NSPR_API(void) _MD_clock_interrupt(void);
|
||||||
// PR_EXTERN(void) _MD_init_stack(PRThreadStack *ts, PRIntn redzone);
|
// NSPR_API(void) _MD_init_stack(PRThreadStack *ts, PRIntn redzone);
|
||||||
// PR_EXTERN(void) _MD_clear_stack(PRThreadStack* ts);
|
// NSPR_API(void) _MD_clear_stack(PRThreadStack* ts);
|
||||||
// PR_EXTERN(PRInt32) _MD_get_intsoff(void);
|
// NSPR_API(PRInt32) _MD_get_intsoff(void);
|
||||||
// PR_EXTERN(void) _MD_set_intsoff(PRInt32 _val);
|
// NSPR_API(void) _MD_set_intsoff(PRInt32 _val);
|
||||||
// PR_EXTERN(_PRCPU*) _MD_current_cpu(void);
|
// NSPR_API(_PRCPU*) _MD_current_cpu(void);
|
||||||
// PR_EXTERN(void) _MD_set_current_cpu(_PRCPU *cpu);
|
// NSPR_API(void) _MD_set_current_cpu(_PRCPU *cpu);
|
||||||
// PR_EXTERN(void) _MD_init_running_cpu(_PRCPU *cpu);
|
// NSPR_API(void) _MD_init_running_cpu(_PRCPU *cpu);
|
||||||
PR_EXTERN(PRInt32) _MD_pause_cpu(PRIntervalTime timeout);
|
NSPR_API(PRInt32) _MD_pause_cpu(PRIntervalTime timeout);
|
||||||
|
|
||||||
/* Thread stuff */
|
/* Thread stuff */
|
||||||
|
|
||||||
// PR_EXTERN(PRThread*) _MD_current_thread(void);
|
// NSPR_API(PRThread*) _MD_current_thread(void);
|
||||||
PR_EXTERN(PRThread*) _MD_get_attached_thread(void);
|
NSPR_API(PRThread*) _MD_get_attached_thread(void);
|
||||||
PR_EXTERN(PRThread*) _MD_last_thread(void);
|
NSPR_API(PRThread*) _MD_last_thread(void);
|
||||||
PR_EXTERN(void) _MD_set_current_thread(PRThread *thread);
|
NSPR_API(void) _MD_set_current_thread(PRThread *thread);
|
||||||
PR_EXTERN(void) _MD_set_last_thread(PRThread *thread);
|
NSPR_API(void) _MD_set_last_thread(PRThread *thread);
|
||||||
PR_EXTERN(PRStatus) _MD_init_thread(PRThread *thread);
|
NSPR_API(PRStatus) _MD_init_thread(PRThread *thread);
|
||||||
PR_EXTERN(void) _MD_exit_thread(PRThread *thread);
|
NSPR_API(void) _MD_exit_thread(PRThread *thread);
|
||||||
PR_EXTERN(PRStatus) _MD_init_attached_thread(PRThread *thread);
|
NSPR_API(PRStatus) _MD_init_attached_thread(PRThread *thread);
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_suspend_thread(PRThread *thread);
|
NSPR_API(void) _MD_suspend_thread(PRThread *thread);
|
||||||
PR_EXTERN(void) _MD_resume_thread(PRThread *thread);
|
NSPR_API(void) _MD_resume_thread(PRThread *thread);
|
||||||
// PR_EXTERN(void) _MD_suspend_cpu(_PRCPU *cpu);
|
// NSPR_API(void) _MD_suspend_cpu(_PRCPU *cpu);
|
||||||
// PR_EXTERN(void) _MD_resume_cpu(_PRCPU *cpu);
|
// NSPR_API(void) _MD_resume_cpu(_PRCPU *cpu);
|
||||||
PR_EXTERN(void) _MD_begin_suspend_all(void);
|
NSPR_API(void) _MD_begin_suspend_all(void);
|
||||||
PR_EXTERN(void) _MD_end_suspend_all(void);
|
NSPR_API(void) _MD_end_suspend_all(void);
|
||||||
PR_EXTERN(void) _MD_begin_resume_all(void);
|
NSPR_API(void) _MD_begin_resume_all(void);
|
||||||
PR_EXTERN(void) _MD_end_resume_all(void);
|
NSPR_API(void) _MD_end_resume_all(void);
|
||||||
|
|
||||||
PR_EXTERN(void *) _MD_get_sp(PRThread *thread);
|
NSPR_API(void *) _MD_get_sp(PRThread *thread);
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_clean_thread(PRThread *thread);
|
NSPR_API(void) _MD_clean_thread(PRThread *thread);
|
||||||
PR_EXTERN(void) _MD_create_primordial_user_thread(PRThread *);
|
NSPR_API(void) _MD_create_primordial_user_thread(PRThread *);
|
||||||
PR_EXTERN(PRThread*) _MD_create_user_thread(PRUint32 stacksize, void (*start)(void *), void *arg);
|
NSPR_API(PRThread*) _MD_create_user_thread(PRUint32 stacksize, void (*start)(void *), void *arg);
|
||||||
PR_EXTERN(void) _MD_init_primordial_thread(PRThread *thread);
|
NSPR_API(void) _MD_init_primordial_thread(PRThread *thread);
|
||||||
PR_EXTERN(PRStatus) _MD_create_thread(PRThread *thread, void (*start)(void *), PRThreadPriority priority, PRThreadScope scope, PRThreadState state, PRUint32 stackSize);
|
NSPR_API(PRStatus) _MD_create_thread(PRThread *thread, void (*start)(void *), PRThreadPriority priority, PRThreadScope scope, PRThreadState state, PRUint32 stackSize);
|
||||||
PR_EXTERN(void) _MD_yield(void);
|
NSPR_API(void) _MD_yield(void);
|
||||||
PR_EXTERN(void) _MD_set_priority(struct _MDThread *md, PRThreadPriority newPri);
|
NSPR_API(void) _MD_set_priority(struct _MDThread *md, PRThreadPriority newPri);
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_suspendall(void);
|
NSPR_API(void) _MD_suspendall(void);
|
||||||
PR_EXTERN(void) _MD_resumeall(void);
|
NSPR_API(void) _MD_resumeall(void);
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_init_context(PRThread *thread, char *top, void (*start) (void), PRBool *status);
|
NSPR_API(void) _MD_init_context(PRThread *thread, char *top, void (*start) (void), PRBool *status);
|
||||||
PR_EXTERN(void) _MD_switch_context(PRThread *thread);
|
NSPR_API(void) _MD_switch_context(PRThread *thread);
|
||||||
PR_EXTERN(void) _MD_restore_context(PRThread *thread);
|
NSPR_API(void) _MD_restore_context(PRThread *thread);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_wait(PRThread *, PRIntervalTime timeout);
|
NSPR_API(PRStatus) _MD_wait(PRThread *, PRIntervalTime timeout);
|
||||||
PR_EXTERN(PRStatus) _MD_wakeup_waiter(PRThread *);
|
NSPR_API(PRStatus) _MD_wakeup_waiter(PRThread *);
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) _MD_setthreadaffinitymask(PRThread *thread, PRUint32 mask );
|
NSPR_API(PRInt32) _MD_setthreadaffinitymask(PRThread *thread, PRUint32 mask );
|
||||||
PR_EXTERN(PRInt32) _MD_getthreadaffinitymask(PRThread *thread, PRUint32 *mask);
|
NSPR_API(PRInt32) _MD_getthreadaffinitymask(PRThread *thread, PRUint32 *mask);
|
||||||
|
|
||||||
/* Thread Synchronization */
|
/* Thread Synchronization */
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_init_locks(void);
|
NSPR_API(void) _MD_init_locks(void);
|
||||||
PR_EXTERN(PRStatus) _MD_new_lock(struct _MDLock *md);
|
NSPR_API(PRStatus) _MD_new_lock(struct _MDLock *md);
|
||||||
PR_EXTERN(void) _MD_free_lock(struct _MDLock *md);
|
NSPR_API(void) _MD_free_lock(struct _MDLock *md);
|
||||||
PR_EXTERN(void) _MD_lock(struct _MDLock *md);
|
NSPR_API(void) _MD_lock(struct _MDLock *md);
|
||||||
PR_EXTERN(PRBool) _MD_test_and_lock(struct _MDLock *md);
|
NSPR_API(PRBool) _MD_test_and_lock(struct _MDLock *md);
|
||||||
PR_EXTERN(void) _MD_unlock(struct _MDLock *md);
|
NSPR_API(void) _MD_unlock(struct _MDLock *md);
|
||||||
PR_EXTERN(void) _MD_ioq_lock(void);
|
NSPR_API(void) _MD_ioq_lock(void);
|
||||||
PR_EXTERN(void) _MD_ioq_unlock(void);
|
NSPR_API(void) _MD_ioq_unlock(void);
|
||||||
PR_EXTERN(void) _MD_new_sem(struct _MDSemaphore *md, PRUintn value);
|
NSPR_API(void) _MD_new_sem(struct _MDSemaphore *md, PRUintn value);
|
||||||
PR_EXTERN(void) _MD_destroy_sem(struct _MDSemaphore *md);
|
NSPR_API(void) _MD_destroy_sem(struct _MDSemaphore *md);
|
||||||
PR_EXTERN(PRStatus) _MD_timed_wait_sem(struct _MDSemaphore *md, PRIntervalTime timeout);
|
NSPR_API(PRStatus) _MD_timed_wait_sem(struct _MDSemaphore *md, PRIntervalTime timeout);
|
||||||
PR_EXTERN(PRStatus) _MD_wait_sem(struct _MDSemaphore *md);
|
NSPR_API(PRStatus) _MD_wait_sem(struct _MDSemaphore *md);
|
||||||
PR_EXTERN(void) _MD_post_sem(struct _MDSemaphore *md);
|
NSPR_API(void) _MD_post_sem(struct _MDSemaphore *md);
|
||||||
// PR_EXTERN(PRInt32) _MD_new_cv(struct _MDCVar *md);
|
// NSPR_API(PRInt32) _MD_new_cv(struct _MDCVar *md);
|
||||||
// PR_EXTERN(void) _MD_free_cv(struct _MDCVar *md);
|
// NSPR_API(void) _MD_free_cv(struct _MDCVar *md);
|
||||||
// PR_EXTERN(void) _MD_wait_cv(struct _MDCVar *mdCVar, struct _MDLock *mdLock, PRIntervalTime timeout);
|
// NSPR_API(void) _MD_wait_cv(struct _MDCVar *mdCVar, struct _MDLock *mdLock, PRIntervalTime timeout);
|
||||||
// PR_EXTERN(void) _MD_notify_cv(struct _MDCVar *md, struct _MDLock *lock);
|
// NSPR_API(void) _MD_notify_cv(struct _MDCVar *md, struct _MDLock *lock);
|
||||||
// PR_EXTERN(void) _MD_notifyall_cv(struct _MDCVar *md, struct _MDLock *lock);
|
// NSPR_API(void) _MD_notifyall_cv(struct _MDCVar *md, struct _MDLock *lock);
|
||||||
|
|
||||||
/* File I/O */
|
/* File I/O */
|
||||||
|
|
||||||
// PR_EXTERN(void) _MD_init_io(void);
|
// NSPR_API(void) _MD_init_io(void);
|
||||||
PR_EXTERN(PRStatus) _MD_open_dir(struct _MDDir *md,const char *name);
|
NSPR_API(PRStatus) _MD_open_dir(struct _MDDir *md,const char *name);
|
||||||
PR_EXTERN(char *) _MD_read_dir(struct _MDDir *md, PRIntn flags);
|
NSPR_API(char *) _MD_read_dir(struct _MDDir *md, PRIntn flags);
|
||||||
PR_EXTERN(PRInt32) _MD_close_dir(struct _MDDir *md);
|
NSPR_API(PRInt32) _MD_close_dir(struct _MDDir *md);
|
||||||
PR_EXTERN(void) _MD_make_nonblock(PRFileDesc *fd);
|
NSPR_API(void) _MD_make_nonblock(PRFileDesc *fd);
|
||||||
PR_EXTERN(PRInt32) _MD_open(const char *name, PRIntn osflags, PRIntn mode);
|
NSPR_API(PRInt32) _MD_open(const char *name, PRIntn osflags, PRIntn mode);
|
||||||
PR_EXTERN(PRInt32) _MD_close_file(PRInt32 osfd);
|
NSPR_API(PRInt32) _MD_close_file(PRInt32 osfd);
|
||||||
PR_EXTERN(PRInt32) _MD_read(PRFileDesc *fd, void *buf, PRInt32 amount);
|
NSPR_API(PRInt32) _MD_read(PRFileDesc *fd, void *buf, PRInt32 amount);
|
||||||
PR_EXTERN(PRInt32) _MD_write(PRFileDesc *fd, const void *buf, PRInt32 amount);
|
NSPR_API(PRInt32) _MD_write(PRFileDesc *fd, const void *buf, PRInt32 amount);
|
||||||
PR_EXTERN(PRInt32) _MD_writev(PRFileDesc *fd, struct PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout);
|
NSPR_API(PRInt32) _MD_writev(PRFileDesc *fd, struct PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout);
|
||||||
PR_EXTERN(PRInt32) _MD_lseek(PRFileDesc *fd, PRInt32 offset, int whence);
|
NSPR_API(PRInt32) _MD_lseek(PRFileDesc *fd, PRInt32 offset, int whence);
|
||||||
PR_EXTERN(PRInt64) _MD_lseek64(PRFileDesc *fd, PRInt64 offset, int whence);
|
NSPR_API(PRInt64) _MD_lseek64(PRFileDesc *fd, PRInt64 offset, int whence);
|
||||||
PR_EXTERN(PRInt32) _MD_fsync(PRFileDesc *fd);
|
NSPR_API(PRInt32) _MD_fsync(PRFileDesc *fd);
|
||||||
PR_EXTERN(PRInt32) _MD_delete(const char *name);
|
NSPR_API(PRInt32) _MD_delete(const char *name);
|
||||||
PR_EXTERN(PRInt32) _MD_getfileinfo(const char *fn, PRFileInfo *info);
|
NSPR_API(PRInt32) _MD_getfileinfo(const char *fn, PRFileInfo *info);
|
||||||
PR_EXTERN(PRInt32) _MD_getfileinfo64(const char *fn, PRFileInfo64 *info);
|
NSPR_API(PRInt32) _MD_getfileinfo64(const char *fn, PRFileInfo64 *info);
|
||||||
PR_EXTERN(PRInt32) _MD_getopenfileinfo(const PRFileDesc *fd, PRFileInfo *info);
|
NSPR_API(PRInt32) _MD_getopenfileinfo(const PRFileDesc *fd, PRFileInfo *info);
|
||||||
PR_EXTERN(PRInt32) _MD_getopenfileinfo64(const PRFileDesc *fd, PRFileInfo64 *info);
|
NSPR_API(PRInt32) _MD_getopenfileinfo64(const PRFileDesc *fd, PRFileInfo64 *info);
|
||||||
PR_EXTERN(PRInt32) _MD_rename(const char *from, const char *to);
|
NSPR_API(PRInt32) _MD_rename(const char *from, const char *to);
|
||||||
PR_EXTERN(PRInt32) _MD_access(const char *name, PRIntn how);
|
NSPR_API(PRInt32) _MD_access(const char *name, PRIntn how);
|
||||||
PR_EXTERN(PRInt32) _MD_stat(const char *name, struct stat *buf);
|
NSPR_API(PRInt32) _MD_stat(const char *name, struct stat *buf);
|
||||||
PR_EXTERN(PRInt32) _MD_mkdir(const char *name, PRIntn mode);
|
NSPR_API(PRInt32) _MD_mkdir(const char *name, PRIntn mode);
|
||||||
PR_EXTERN(PRInt32) _MD_rmdir(const char *name);
|
NSPR_API(PRInt32) _MD_rmdir(const char *name);
|
||||||
PR_EXTERN(PRInt32) _MD_pr_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout);
|
NSPR_API(PRInt32) _MD_pr_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout);
|
||||||
|
|
||||||
/* Network I/O */
|
/* Network I/O */
|
||||||
PR_EXTERN(PRInt32) _MD_close_socket(PRInt32 osfd);
|
NSPR_API(PRInt32) _MD_close_socket(PRInt32 osfd);
|
||||||
PR_EXTERN(PRInt32) _MD_connect(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout);
|
NSPR_API(PRInt32) _MD_connect(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout);
|
||||||
PR_EXTERN(PRInt32) _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout);
|
NSPR_API(PRInt32) _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout);
|
||||||
PR_EXTERN(PRInt32) _MD_bind(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen);
|
NSPR_API(PRInt32) _MD_bind(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen);
|
||||||
PR_EXTERN(PRInt32) _MD_listen(PRFileDesc *fd, PRIntn backlog);
|
NSPR_API(PRInt32) _MD_listen(PRFileDesc *fd, PRIntn backlog);
|
||||||
PR_EXTERN(PRInt32) _MD_shutdown(PRFileDesc *fd, PRIntn how);
|
NSPR_API(PRInt32) _MD_shutdown(PRFileDesc *fd, PRIntn how);
|
||||||
PR_EXTERN(PRInt32) _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout);
|
NSPR_API(PRInt32) _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout);
|
||||||
PR_EXTERN(PRInt32) _MD_send(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout);
|
NSPR_API(PRInt32) _MD_send(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout);
|
||||||
PR_EXTERN(PRInt32) _MD_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout);
|
NSPR_API(PRInt32) _MD_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout);
|
||||||
// PR_EXTERN(PRInt32) _MD_fast_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg);
|
// NSPR_API(PRInt32) _MD_fast_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg);
|
||||||
// PR_EXTERN(PRInt32) _MD_fast_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg);
|
// NSPR_API(PRInt32) _MD_fast_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg);
|
||||||
// PR_EXTERN(void) _MD_update_accept_context(PRInt32 s, PRInt32 ls);
|
// NSPR_API(void) _MD_update_accept_context(PRInt32 s, PRInt32 ls);
|
||||||
PR_EXTERN(PRStatus) _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen);
|
NSPR_API(PRStatus) _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen);
|
||||||
PR_EXTERN(PRStatus) _MD_getpeername(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen);
|
NSPR_API(PRStatus) _MD_getpeername(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen);
|
||||||
PR_EXTERN(PRStatus) _MD_getsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, char* optval, PRInt32* optlen);
|
NSPR_API(PRStatus) _MD_getsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, char* optval, PRInt32* optlen);
|
||||||
PR_EXTERN(PRStatus) _MD_setsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, const char* optval, PRInt32 optlen);
|
NSPR_API(PRStatus) _MD_setsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, const char* optval, PRInt32 optlen);
|
||||||
PR_EXTERN(PRInt32) _MD_recvfrom(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout);
|
NSPR_API(PRInt32) _MD_recvfrom(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout);
|
||||||
PR_EXTERN(PRInt32) _MD_sendto(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout);
|
NSPR_API(PRInt32) _MD_sendto(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout);
|
||||||
PR_EXTERN(PRInt32) _MD_socketpair(int af, int type, int flags, PRInt32 *osfd);
|
NSPR_API(PRInt32) _MD_socketpair(int af, int type, int flags, PRInt32 *osfd);
|
||||||
PR_EXTERN(PRInt32) _MD_socket(int af, int type, int flags);
|
NSPR_API(PRInt32) _MD_socket(int af, int type, int flags);
|
||||||
PR_EXTERN(PRInt32) _MD_socketavailable(PRFileDesc *fd);
|
NSPR_API(PRInt32) _MD_socketavailable(PRFileDesc *fd);
|
||||||
|
|
||||||
// PR_EXTERN(PRInt32) _MD_get_socket_error(void);
|
// NSPR_API(PRInt32) _MD_get_socket_error(void);
|
||||||
PR_EXTERN(PRStatus) _MD_gethostname(char *name, PRUint32 namelen);
|
NSPR_API(PRStatus) _MD_gethostname(char *name, PRUint32 namelen);
|
||||||
|
|
||||||
/* Process management */
|
/* Process management */
|
||||||
|
|
||||||
PR_EXTERN(PRProcess *) _MD_create_process(const char *path, char *const *argv, char *const *envp, const PRProcessAttr *attr);
|
NSPR_API(PRProcess *) _MD_create_process(const char *path, char *const *argv, char *const *envp, const PRProcessAttr *attr);
|
||||||
PR_EXTERN(PRStatus) _MD_detach_process(PRProcess *process);
|
NSPR_API(PRStatus) _MD_detach_process(PRProcess *process);
|
||||||
PR_EXTERN(PRStatus) _MD_wait_process(PRProcess *process, PRInt32 *exitCode);
|
NSPR_API(PRStatus) _MD_wait_process(PRProcess *process, PRInt32 *exitCode);
|
||||||
PR_EXTERN(PRStatus) _MD_kill_process(PRProcess *process);
|
NSPR_API(PRStatus) _MD_kill_process(PRProcess *process);
|
||||||
|
|
||||||
/* Atomic data operations */
|
/* Atomic data operations */
|
||||||
|
|
||||||
// PR_EXTERN(void) _MD_init_atomic(void);
|
// NSPR_API(void) _MD_init_atomic(void);
|
||||||
// PR_EXTERN(PRInt32) _MD_atomic_increment(PRInt32 *);
|
// NSPR_API(PRInt32) _MD_atomic_increment(PRInt32 *);
|
||||||
// PR_EXTERN(PRInt32) _MD_atomic_decrement(PRInt32 *);
|
// NSPR_API(PRInt32) _MD_atomic_decrement(PRInt32 *);
|
||||||
// PR_EXTERN(PRInt32) _MD_atomic_set(PRInt32 *, PRInt32);
|
// NSPR_API(PRInt32) _MD_atomic_set(PRInt32 *, PRInt32);
|
||||||
|
|
||||||
/* Memory management */
|
/* Memory management */
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_init_segs(void);
|
NSPR_API(void) _MD_init_segs(void);
|
||||||
PR_EXTERN(PRStatus) _MD_alloc_segment(PRSegment *seg, PRUint32 size, void *vaddr);
|
NSPR_API(PRStatus) _MD_alloc_segment(PRSegment *seg, PRUint32 size, void *vaddr);
|
||||||
PR_EXTERN(void) _MD_free_segment(PRSegment *seg);
|
NSPR_API(void) _MD_free_segment(PRSegment *seg);
|
||||||
|
|
||||||
/* Memory mapped file I/O */
|
/* Memory mapped file I/O */
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_create_file_map(PRFileMap *fmap, PRInt64 size);
|
NSPR_API(PRStatus) _MD_create_file_map(PRFileMap *fmap, PRInt64 size);
|
||||||
PR_EXTERN(void *) _MD_mem_map(PRFileMap *fmap, PRInt64 offset, PRUint32 len);
|
NSPR_API(void *) _MD_mem_map(PRFileMap *fmap, PRInt64 offset, PRUint32 len);
|
||||||
PR_EXTERN(PRStatus) _MD_mem_unmap(void *addr, PRUint32 size);
|
NSPR_API(PRStatus) _MD_mem_unmap(void *addr, PRUint32 size);
|
||||||
PR_EXTERN(PRStatus) _MD_close_file_map(PRFileMap *fmap);
|
NSPR_API(PRStatus) _MD_close_file_map(PRFileMap *fmap);
|
||||||
|
|
||||||
/* Time related */
|
/* Time related */
|
||||||
|
|
||||||
PR_EXTERN(PRTime) _MD_now(void);
|
NSPR_API(PRTime) _MD_now(void);
|
||||||
PR_EXTERN(void) _MD_interval_init(void);
|
NSPR_API(void) _MD_interval_init(void);
|
||||||
PR_EXTERN(PRIntervalTime) _MD_get_interval(void);
|
NSPR_API(PRIntervalTime) _MD_get_interval(void);
|
||||||
PR_EXTERN(PRIntervalTime) _MD_interval_per_sec(void);
|
NSPR_API(PRIntervalTime) _MD_interval_per_sec(void);
|
||||||
|
|
||||||
/* File locking */
|
/* File locking */
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_lockfile(PRInt32 osfd);
|
NSPR_API(PRStatus) _MD_lockfile(PRInt32 osfd);
|
||||||
PR_EXTERN(PRStatus) _MD_tlockfile(PRInt32 osfd);
|
NSPR_API(PRStatus) _MD_tlockfile(PRInt32 osfd);
|
||||||
PR_EXTERN(PRStatus) _MD_unlockfile(PRInt32 osfd);
|
NSPR_API(PRStatus) _MD_unlockfile(PRInt32 osfd);
|
||||||
|
|
||||||
#endif /* _nspr_beos_defs_h___*/
|
#endif /* _nspr_beos_defs_h___*/
|
||||||
|
|
|
@ -62,23 +62,23 @@
|
||||||
#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY
|
#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY
|
||||||
|
|
||||||
/* Initialization entry points */
|
/* Initialization entry points */
|
||||||
PR_EXTERN(void) _MD_EarlyInit(void);
|
NSPR_API(void) _MD_EarlyInit(void);
|
||||||
#define _MD_EARLY_INIT _MD_EarlyInit
|
#define _MD_EARLY_INIT _MD_EarlyInit
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_IrixInit(void);
|
NSPR_API(void) _MD_IrixInit(void);
|
||||||
#define _MD_FINAL_INIT _MD_IrixInit
|
#define _MD_FINAL_INIT _MD_IrixInit
|
||||||
|
|
||||||
#define _MD_INIT_IO()
|
#define _MD_INIT_IO()
|
||||||
|
|
||||||
/* Timer operations */
|
/* Timer operations */
|
||||||
PR_EXTERN(PRIntervalTime) _MD_IrixGetInterval(void);
|
NSPR_API(PRIntervalTime) _MD_IrixGetInterval(void);
|
||||||
#define _MD_GET_INTERVAL _MD_IrixGetInterval
|
#define _MD_GET_INTERVAL _MD_IrixGetInterval
|
||||||
|
|
||||||
PR_EXTERN(PRIntervalTime) _MD_IrixIntervalPerSec(void);
|
NSPR_API(PRIntervalTime) _MD_IrixIntervalPerSec(void);
|
||||||
#define _MD_INTERVAL_PER_SEC _MD_IrixIntervalPerSec
|
#define _MD_INTERVAL_PER_SEC _MD_IrixIntervalPerSec
|
||||||
|
|
||||||
/* GC operations */
|
/* GC operations */
|
||||||
PR_EXTERN(void *) _MD_GetSP(PRThread *thread);
|
NSPR_API(void *) _MD_GetSP(PRThread *thread);
|
||||||
#define _MD_GET_SP _MD_GetSP
|
#define _MD_GET_SP _MD_GetSP
|
||||||
|
|
||||||
/* The atomic operations */
|
/* The atomic operations */
|
||||||
|
@ -134,8 +134,8 @@ extern char *_nspr_sproc_private;
|
||||||
#define _MD_SET_SPROC_PID(_val) (_PR_PRDA()->sproc_pid = _val)
|
#define _MD_SET_SPROC_PID(_val) (_PR_PRDA()->sproc_pid = _val)
|
||||||
#define _MD_GET_SPROC_PID() (_PR_PRDA()->sproc_pid)
|
#define _MD_GET_SPROC_PID() (_PR_PRDA()->sproc_pid)
|
||||||
|
|
||||||
PR_EXTERN(struct PRThread*) _MD_get_attached_thread(void);
|
NSPR_API(struct PRThread*) _MD_get_attached_thread(void);
|
||||||
PR_EXTERN(struct PRThread*) _MD_get_current_thread(void);
|
NSPR_API(struct PRThread*) _MD_get_current_thread(void);
|
||||||
#define _MD_GET_ATTACHED_THREAD() _MD_get_attached_thread()
|
#define _MD_GET_ATTACHED_THREAD() _MD_get_attached_thread()
|
||||||
#define _MD_CURRENT_THREAD() _MD_get_current_thread()
|
#define _MD_CURRENT_THREAD() _MD_get_current_thread()
|
||||||
|
|
||||||
|
@ -218,8 +218,8 @@ struct _MDLock {
|
||||||
_PR_FAST_INTSON(_is); \
|
_PR_FAST_INTSON(_is); \
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_NEW_LOCK(struct _MDLock *md);
|
NSPR_API(PRStatus) _MD_NEW_LOCK(struct _MDLock *md);
|
||||||
PR_EXTERN(void) _MD_FREE_LOCK(struct _MDLock *lockp);
|
NSPR_API(void) _MD_FREE_LOCK(struct _MDLock *lockp);
|
||||||
|
|
||||||
#define _MD_LOCK(_lockp) _PR_LOCK((_lockp)->lock)
|
#define _MD_LOCK(_lockp) _PR_LOCK((_lockp)->lock)
|
||||||
#define _MD_UNLOCK(_lockp) _PR_UNLOCK((_lockp)->lock)
|
#define _MD_UNLOCK(_lockp) _PR_UNLOCK((_lockp)->lock)
|
||||||
|
@ -345,27 +345,27 @@ struct _MDCPU {
|
||||||
longjmp(jb, 1); \
|
longjmp(jb, 1); \
|
||||||
PR_END_MACRO
|
PR_END_MACRO
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_InitThread(struct PRThread *thread,
|
NSPR_API(PRStatus) _MD_InitThread(struct PRThread *thread,
|
||||||
PRBool wakeup_parent);
|
PRBool wakeup_parent);
|
||||||
PR_EXTERN(PRStatus) _MD_InitAttachedThread(struct PRThread *thread,
|
NSPR_API(PRStatus) _MD_InitAttachedThread(struct PRThread *thread,
|
||||||
PRBool wakeup_parent);
|
PRBool wakeup_parent);
|
||||||
#define _MD_INIT_THREAD(thread) _MD_InitThread(thread, PR_TRUE)
|
#define _MD_INIT_THREAD(thread) _MD_InitThread(thread, PR_TRUE)
|
||||||
#define _MD_INIT_ATTACHED_THREAD(thread) \
|
#define _MD_INIT_ATTACHED_THREAD(thread) \
|
||||||
_MD_InitAttachedThread(thread, PR_FALSE)
|
_MD_InitAttachedThread(thread, PR_FALSE)
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_ExitThread(struct PRThread *thread);
|
NSPR_API(void) _MD_ExitThread(struct PRThread *thread);
|
||||||
#define _MD_EXIT_THREAD _MD_ExitThread
|
#define _MD_EXIT_THREAD _MD_ExitThread
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_SuspendThread(struct PRThread *thread);
|
NSPR_API(void) _MD_SuspendThread(struct PRThread *thread);
|
||||||
#define _MD_SUSPEND_THREAD _MD_SuspendThread
|
#define _MD_SUSPEND_THREAD _MD_SuspendThread
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_ResumeThread(struct PRThread *thread);
|
NSPR_API(void) _MD_ResumeThread(struct PRThread *thread);
|
||||||
#define _MD_RESUME_THREAD _MD_ResumeThread
|
#define _MD_RESUME_THREAD _MD_ResumeThread
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_SuspendCPU(struct _PRCPU *thread);
|
NSPR_API(void) _MD_SuspendCPU(struct _PRCPU *thread);
|
||||||
#define _MD_SUSPEND_CPU _MD_SuspendCPU
|
#define _MD_SUSPEND_CPU _MD_SuspendCPU
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_ResumeCPU(struct _PRCPU *thread);
|
NSPR_API(void) _MD_ResumeCPU(struct _PRCPU *thread);
|
||||||
#define _MD_RESUME_CPU _MD_ResumeCPU
|
#define _MD_RESUME_CPU _MD_ResumeCPU
|
||||||
|
|
||||||
#define _MD_BEGIN_SUSPEND_ALL()
|
#define _MD_BEGIN_SUSPEND_ALL()
|
||||||
|
@ -373,10 +373,10 @@ PR_EXTERN(void) _MD_ResumeCPU(struct _PRCPU *thread);
|
||||||
#define _MD_BEGIN_RESUME_ALL()
|
#define _MD_BEGIN_RESUME_ALL()
|
||||||
#define _MD_END_RESUME_ALL()
|
#define _MD_END_RESUME_ALL()
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_InitLocks(void);
|
NSPR_API(void) _MD_InitLocks(void);
|
||||||
#define _MD_INIT_LOCKS _MD_InitLocks
|
#define _MD_INIT_LOCKS _MD_InitLocks
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_CleanThread(struct PRThread *thread);
|
NSPR_API(void) _MD_CleanThread(struct PRThread *thread);
|
||||||
#define _MD_CLEAN_THREAD _MD_CleanThread
|
#define _MD_CLEAN_THREAD _MD_CleanThread
|
||||||
|
|
||||||
#define _MD_YIELD() sginap(0)
|
#define _MD_YIELD() sginap(0)
|
||||||
|
@ -384,25 +384,25 @@ PR_EXTERN(void) _MD_CleanThread(struct PRThread *thread);
|
||||||
/* The _PR_MD_WAIT_LOCK and _PR_MD_WAKEUP_WAITER functions put to sleep and
|
/* The _PR_MD_WAIT_LOCK and _PR_MD_WAKEUP_WAITER functions put to sleep and
|
||||||
* awaken a thread which is waiting on a lock or cvar.
|
* awaken a thread which is waiting on a lock or cvar.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) _MD_wait(struct PRThread *, PRIntervalTime timeout);
|
NSPR_API(PRStatus) _MD_wait(struct PRThread *, PRIntervalTime timeout);
|
||||||
#define _MD_WAIT _MD_wait
|
#define _MD_WAIT _MD_wait
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_primordial_cpu();
|
NSPR_API(void) _PR_MD_primordial_cpu();
|
||||||
PR_EXTERN(void) _PR_MD_WAKEUP_PRIMORDIAL_CPU();
|
NSPR_API(void) _PR_MD_WAKEUP_PRIMORDIAL_CPU();
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_WakeupWaiter(struct PRThread *);
|
NSPR_API(PRStatus) _MD_WakeupWaiter(struct PRThread *);
|
||||||
#define _MD_WAKEUP_WAITER _MD_WakeupWaiter
|
#define _MD_WAKEUP_WAITER _MD_WakeupWaiter
|
||||||
|
|
||||||
PR_EXTERN(void ) _MD_exit(PRIntn status);
|
NSPR_API(void ) _MD_exit(PRIntn status);
|
||||||
#define _MD_EXIT _MD_exit
|
#define _MD_EXIT _MD_exit
|
||||||
|
|
||||||
#include "prthread.h"
|
#include "prthread.h"
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_SetPriority(struct _MDThread *thread,
|
NSPR_API(void) _MD_SetPriority(struct _MDThread *thread,
|
||||||
PRThreadPriority newPri);
|
PRThreadPriority newPri);
|
||||||
#define _MD_SET_PRIORITY _MD_SetPriority
|
#define _MD_SET_PRIORITY _MD_SetPriority
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_CreateThread(
|
NSPR_API(PRStatus) _MD_CreateThread(
|
||||||
struct PRThread *thread,
|
struct PRThread *thread,
|
||||||
void (*start) (void *),
|
void (*start) (void *),
|
||||||
PRThreadPriority priority,
|
PRThreadPriority priority,
|
||||||
|
@ -414,7 +414,7 @@ PR_EXTERN(PRStatus) _MD_CreateThread(
|
||||||
extern void _MD_CleanupBeforeExit(void);
|
extern void _MD_CleanupBeforeExit(void);
|
||||||
#define _MD_CLEANUP_BEFORE_EXIT _MD_CleanupBeforeExit
|
#define _MD_CLEANUP_BEFORE_EXIT _MD_CleanupBeforeExit
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_PRE_CLEANUP(PRThread *me);
|
NSPR_API(void) _PR_MD_PRE_CLEANUP(PRThread *me);
|
||||||
|
|
||||||
|
|
||||||
/* The following defines the unwrapped versions of select() and poll(). */
|
/* The following defines the unwrapped versions of select() and poll(). */
|
||||||
|
@ -430,10 +430,10 @@ extern int _poll(struct pollfd *fds, unsigned long nfds, int timeout);
|
||||||
|
|
||||||
#define HAVE_THREAD_AFFINITY 1
|
#define HAVE_THREAD_AFFINITY 1
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) _MD_GetThreadAffinityMask(PRThread *unused, PRUint32 *mask);
|
NSPR_API(PRInt32) _MD_GetThreadAffinityMask(PRThread *unused, PRUint32 *mask);
|
||||||
#define _MD_GETTHREADAFFINITYMASK _MD_GetThreadAffinityMask
|
#define _MD_GETTHREADAFFINITYMASK _MD_GetThreadAffinityMask
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_InitRunningCPU(struct _PRCPU *cpu);
|
NSPR_API(void) _MD_InitRunningCPU(struct _PRCPU *cpu);
|
||||||
#define _MD_INIT_RUNNING_CPU _MD_InitRunningCPU
|
#define _MD_INIT_RUNNING_CPU _MD_InitRunningCPU
|
||||||
|
|
||||||
#endif /* defined(_PR_PTHREADS) */
|
#endif /* defined(_PR_PTHREADS) */
|
||||||
|
|
|
@ -180,7 +180,7 @@ extern PRStatus _MD_KillProcess(PRProcess *process);
|
||||||
** Thread Related definitions
|
** Thread Related definitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRThread *) PR_GetPrimaryThread();
|
NSPR_API(PRThread *) PR_GetPrimaryThread();
|
||||||
|
|
||||||
#if defined(powerc) || defined(__powerc)
|
#if defined(powerc) || defined(__powerc)
|
||||||
#define _MD_GET_PC(_t) (*((PRUint32 *)((_t)->md.jb)))
|
#define _MD_GET_PC(_t) (*((PRUint32 *)((_t)->md.jb)))
|
||||||
|
|
|
@ -185,8 +185,8 @@ extern pthread_mutex_t _pr_heapLock;
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_NEW_LOCK(struct _MDLock *md);
|
NSPR_API(PRStatus) _MD_NEW_LOCK(struct _MDLock *md);
|
||||||
PR_EXTERN(void) _MD_FREE_LOCK(struct _MDLock *lockp);
|
NSPR_API(void) _MD_FREE_LOCK(struct _MDLock *lockp);
|
||||||
|
|
||||||
#define _MD_LOCK(_lockp) _PR_LOCK(&(_lockp)->mutex)
|
#define _MD_LOCK(_lockp) _PR_LOCK(&(_lockp)->mutex)
|
||||||
#define _MD_UNLOCK(_lockp) _PR_UNLOCK(&(_lockp)->mutex)
|
#define _MD_UNLOCK(_lockp) _PR_UNLOCK(&(_lockp)->mutex)
|
||||||
|
@ -196,23 +196,23 @@ PR_EXTERN(void) _MD_FREE_LOCK(struct _MDLock *lockp);
|
||||||
#define _MD_IOQ_UNLOCK()
|
#define _MD_IOQ_UNLOCK()
|
||||||
#define _MD_CHECK_FOR_EXIT()
|
#define _MD_CHECK_FOR_EXIT()
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_InitThread(struct PRThread *thread);
|
NSPR_API(PRStatus) _MD_InitThread(struct PRThread *thread);
|
||||||
#define _MD_INIT_THREAD _MD_InitThread
|
#define _MD_INIT_THREAD _MD_InitThread
|
||||||
#define _MD_INIT_ATTACHED_THREAD _MD_InitThread
|
#define _MD_INIT_ATTACHED_THREAD _MD_InitThread
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_ExitThread(struct PRThread *thread);
|
NSPR_API(void) _MD_ExitThread(struct PRThread *thread);
|
||||||
#define _MD_EXIT_THREAD _MD_ExitThread
|
#define _MD_EXIT_THREAD _MD_ExitThread
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_SuspendThread(struct PRThread *thread);
|
NSPR_API(void) _MD_SuspendThread(struct PRThread *thread);
|
||||||
#define _MD_SUSPEND_THREAD _MD_SuspendThread
|
#define _MD_SUSPEND_THREAD _MD_SuspendThread
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_ResumeThread(struct PRThread *thread);
|
NSPR_API(void) _MD_ResumeThread(struct PRThread *thread);
|
||||||
#define _MD_RESUME_THREAD _MD_ResumeThread
|
#define _MD_RESUME_THREAD _MD_ResumeThread
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_SuspendCPU(struct _PRCPU *thread);
|
NSPR_API(void) _MD_SuspendCPU(struct _PRCPU *thread);
|
||||||
#define _MD_SUSPEND_CPU _MD_SuspendCPU
|
#define _MD_SUSPEND_CPU _MD_SuspendCPU
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_ResumeCPU(struct _PRCPU *thread);
|
NSPR_API(void) _MD_ResumeCPU(struct _PRCPU *thread);
|
||||||
#define _MD_RESUME_CPU _MD_ResumeCPU
|
#define _MD_RESUME_CPU _MD_ResumeCPU
|
||||||
|
|
||||||
#define _MD_BEGIN_SUSPEND_ALL()
|
#define _MD_BEGIN_SUSPEND_ALL()
|
||||||
|
@ -220,18 +220,18 @@ PR_EXTERN(void) _MD_ResumeCPU(struct _PRCPU *thread);
|
||||||
#define _MD_BEGIN_RESUME_ALL()
|
#define _MD_BEGIN_RESUME_ALL()
|
||||||
#define _MD_END_RESUME_ALL()
|
#define _MD_END_RESUME_ALL()
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_EarlyInit(void);
|
NSPR_API(void) _MD_EarlyInit(void);
|
||||||
#define _MD_EARLY_INIT _MD_EarlyInit
|
#define _MD_EARLY_INIT _MD_EarlyInit
|
||||||
|
|
||||||
#define _MD_FINAL_INIT _PR_UnixInit
|
#define _MD_FINAL_INIT _PR_UnixInit
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_InitLocks(void);
|
NSPR_API(void) _MD_InitLocks(void);
|
||||||
#define _MD_INIT_LOCKS _MD_InitLocks
|
#define _MD_INIT_LOCKS _MD_InitLocks
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_CleanThread(struct PRThread *thread);
|
NSPR_API(void) _MD_CleanThread(struct PRThread *thread);
|
||||||
#define _MD_CLEAN_THREAD _MD_CleanThread
|
#define _MD_CLEAN_THREAD _MD_CleanThread
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_CreateThread(
|
NSPR_API(PRStatus) _MD_CreateThread(
|
||||||
struct PRThread *thread,
|
struct PRThread *thread,
|
||||||
void (*start) (void *),
|
void (*start) (void *),
|
||||||
PRThreadPriority priority,
|
PRThreadPriority priority,
|
||||||
|
@ -243,19 +243,19 @@ PR_EXTERN(PRStatus) _MD_CreateThread(
|
||||||
extern void _MD_CleanupBeforeExit(void);
|
extern void _MD_CleanupBeforeExit(void);
|
||||||
#define _MD_CLEANUP_BEFORE_EXIT _MD_CleanupBeforeExit
|
#define _MD_CLEANUP_BEFORE_EXIT _MD_CleanupBeforeExit
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_InitRunningCPU(struct _PRCPU *cpu);
|
NSPR_API(void) _MD_InitRunningCPU(struct _PRCPU *cpu);
|
||||||
#define _MD_INIT_RUNNING_CPU _MD_InitRunningCPU
|
#define _MD_INIT_RUNNING_CPU _MD_InitRunningCPU
|
||||||
|
|
||||||
/* The _PR_MD_WAIT_LOCK and _PR_MD_WAKEUP_WAITER functions put to sleep and
|
/* The _PR_MD_WAIT_LOCK and _PR_MD_WAKEUP_WAITER functions put to sleep and
|
||||||
* awaken a thread which is waiting on a lock or cvar.
|
* awaken a thread which is waiting on a lock or cvar.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) _MD_wait(struct PRThread *, PRIntervalTime timeout);
|
NSPR_API(PRStatus) _MD_wait(struct PRThread *, PRIntervalTime timeout);
|
||||||
#define _MD_WAIT _MD_wait
|
#define _MD_WAIT _MD_wait
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_WakeupWaiter(struct PRThread *);
|
NSPR_API(PRStatus) _MD_WakeupWaiter(struct PRThread *);
|
||||||
#define _MD_WAKEUP_WAITER _MD_WakeupWaiter
|
#define _MD_WAKEUP_WAITER _MD_WakeupWaiter
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_SetPriority(struct _MDThread *thread,
|
NSPR_API(void) _MD_SetPriority(struct _MDThread *thread,
|
||||||
PRThreadPriority newPri);
|
PRThreadPriority newPri);
|
||||||
#define _MD_SET_PRIORITY _MD_SetPriority
|
#define _MD_SET_PRIORITY _MD_SetPriority
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,7 @@ void _MD_EarlyInit(void);
|
||||||
#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu)
|
#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu)
|
||||||
#define _MD_INIT_THREAD _MD_InitializeThread
|
#define _MD_INIT_THREAD _MD_InitializeThread
|
||||||
#ifdef _VMS_NOT_YET
|
#ifdef _VMS_NOT_YET
|
||||||
PR_EXTERN(void) _PR_InitThreads(
|
NSPR_API(void) _PR_InitThreads(
|
||||||
PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs);
|
PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs);
|
||||||
#endif
|
#endif
|
||||||
#define _MD_EXIT_THREAD(thread)
|
#define _MD_EXIT_THREAD(thread)
|
||||||
|
@ -242,8 +242,8 @@ extern int __poll(struct pollfd filedes[], unsigned int nfds, int timeout);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __VMS
|
#ifdef __VMS
|
||||||
PR_EXTERN(void) _PR_InitCPUs(void);
|
NSPR_API(void) _PR_InitCPUs(void);
|
||||||
PR_EXTERN(void) _PR_MD_START_INTERRUPTS(void);
|
NSPR_API(void) _PR_MD_START_INTERRUPTS(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -401,7 +401,7 @@ typedef struct __NSPR_TLS
|
||||||
} _NSPR_TLS;
|
} _NSPR_TLS;
|
||||||
|
|
||||||
extern _NSPR_TLS* pThreadLocalStorage;
|
extern _NSPR_TLS* pThreadLocalStorage;
|
||||||
PR_EXTERN(void) _PR_MD_ENSURE_TLS(void);
|
NSPR_API(void) _PR_MD_ENSURE_TLS(void);
|
||||||
|
|
||||||
#define _MD_CURRENT_THREAD() pThreadLocalStorage->_pr_currentThread
|
#define _MD_CURRENT_THREAD() pThreadLocalStorage->_pr_currentThread
|
||||||
#define _MD_SET_CURRENT_THREAD(_thread) _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_currentThread = (_thread)
|
#define _MD_SET_CURRENT_THREAD(_thread) _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_currentThread = (_thread)
|
||||||
|
|
|
@ -24,109 +24,109 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_opendir_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_opendir_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_OPENDIR_ERROR _MD_os2_map_opendir_error
|
#define _PR_MD_MAP_OPENDIR_ERROR _MD_os2_map_opendir_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_closedir_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_closedir_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_CLOSEDIR_ERROR _MD_os2_map_closedir_error
|
#define _PR_MD_MAP_CLOSEDIR_ERROR _MD_os2_map_closedir_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_readdir_error(PRInt32 err);
|
NSPR_API(void) _MD_unix_readdir_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_READDIR_ERROR _MD_unix_readdir_error
|
#define _PR_MD_MAP_READDIR_ERROR _MD_unix_readdir_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_delete_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_delete_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_DELETE_ERROR _MD_os2_map_delete_error
|
#define _PR_MD_MAP_DELETE_ERROR _MD_os2_map_delete_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_stat_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_stat_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_STAT_ERROR _MD_os2_map_stat_error
|
#define _PR_MD_MAP_STAT_ERROR _MD_os2_map_stat_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_fstat_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_fstat_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_FSTAT_ERROR _MD_os2_map_fstat_error
|
#define _PR_MD_MAP_FSTAT_ERROR _MD_os2_map_fstat_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_rename_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_rename_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_RENAME_ERROR _MD_os2_map_rename_error
|
#define _PR_MD_MAP_RENAME_ERROR _MD_os2_map_rename_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_access_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_access_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_ACCESS_ERROR _MD_os2_map_access_error
|
#define _PR_MD_MAP_ACCESS_ERROR _MD_os2_map_access_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_mkdir_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_mkdir_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_MKDIR_ERROR _MD_os2_map_mkdir_error
|
#define _PR_MD_MAP_MKDIR_ERROR _MD_os2_map_mkdir_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_rmdir_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_rmdir_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_RMDIR_ERROR _MD_os2_map_rmdir_error
|
#define _PR_MD_MAP_RMDIR_ERROR _MD_os2_map_rmdir_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_read_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_read_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_READ_ERROR _MD_os2_map_read_error
|
#define _PR_MD_MAP_READ_ERROR _MD_os2_map_read_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_transmitfile_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_transmitfile_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_TRANSMITFILE_ERROR _MD_os2_map_transmitfile_error
|
#define _PR_MD_MAP_TRANSMITFILE_ERROR _MD_os2_map_transmitfile_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_write_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_write_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_WRITE_ERROR _MD_os2_map_write_error
|
#define _PR_MD_MAP_WRITE_ERROR _MD_os2_map_write_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_lseek_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_lseek_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_LSEEK_ERROR _MD_os2_map_lseek_error
|
#define _PR_MD_MAP_LSEEK_ERROR _MD_os2_map_lseek_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_fsync_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_fsync_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_FSYNC_ERROR _MD_os2_map_fsync_error
|
#define _PR_MD_MAP_FSYNC_ERROR _MD_os2_map_fsync_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_close_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_close_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_CLOSE_ERROR _MD_os2_map_close_error
|
#define _PR_MD_MAP_CLOSE_ERROR _MD_os2_map_close_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_socket_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_socket_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_SOCKET_ERROR _MD_os2_map_socket_error
|
#define _PR_MD_MAP_SOCKET_ERROR _MD_os2_map_socket_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_recv_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_recv_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_RECV_ERROR _MD_os2_map_recv_error
|
#define _PR_MD_MAP_RECV_ERROR _MD_os2_map_recv_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_recvfrom_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_recvfrom_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_RECVFROM_ERROR _MD_os2_map_recvfrom_error
|
#define _PR_MD_MAP_RECVFROM_ERROR _MD_os2_map_recvfrom_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_send_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_send_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_SEND_ERROR _MD_os2_map_send_error
|
#define _PR_MD_MAP_SEND_ERROR _MD_os2_map_send_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_sendto_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_sendto_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_SENDTO_ERROR _MD_os2_map_sendto_error
|
#define _PR_MD_MAP_SENDTO_ERROR _MD_os2_map_sendto_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_accept_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_accept_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_ACCEPT_ERROR _MD_os2_map_accept_error
|
#define _PR_MD_MAP_ACCEPT_ERROR _MD_os2_map_accept_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_acceptex_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_acceptex_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_ACCEPTEX_ERROR _MD_os2_map_acceptex_error
|
#define _PR_MD_MAP_ACCEPTEX_ERROR _MD_os2_map_acceptex_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_connect_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_connect_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_CONNECT_ERROR _MD_os2_map_connect_error
|
#define _PR_MD_MAP_CONNECT_ERROR _MD_os2_map_connect_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_bind_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_bind_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_BIND_ERROR _MD_os2_map_bind_error
|
#define _PR_MD_MAP_BIND_ERROR _MD_os2_map_bind_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_listen_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_listen_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_LISTEN_ERROR _MD_os2_map_listen_error
|
#define _PR_MD_MAP_LISTEN_ERROR _MD_os2_map_listen_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_shutdown_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_shutdown_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_SHUTDOWN_ERROR _MD_os2_map_shutdown_error
|
#define _PR_MD_MAP_SHUTDOWN_ERROR _MD_os2_map_shutdown_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_getsockname_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_getsockname_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_GETSOCKNAME_ERROR _MD_os2_map_getsockname_error
|
#define _PR_MD_MAP_GETSOCKNAME_ERROR _MD_os2_map_getsockname_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_getpeername_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_getpeername_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_GETPEERNAME_ERROR _MD_os2_map_getpeername_error
|
#define _PR_MD_MAP_GETPEERNAME_ERROR _MD_os2_map_getpeername_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_getsockopt_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_getsockopt_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_GETSOCKOPT_ERROR _MD_os2_map_getsockopt_error
|
#define _PR_MD_MAP_GETSOCKOPT_ERROR _MD_os2_map_getsockopt_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_setsockopt_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_setsockopt_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_SETSOCKOPT_ERROR _MD_os2_map_setsockopt_error
|
#define _PR_MD_MAP_SETSOCKOPT_ERROR _MD_os2_map_setsockopt_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_open_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_open_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_OPEN_ERROR _MD_os2_map_open_error
|
#define _PR_MD_MAP_OPEN_ERROR _MD_os2_map_open_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_gethostname_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_gethostname_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_GETHOSTNAME_ERROR _MD_os2_map_gethostname_error
|
#define _PR_MD_MAP_GETHOSTNAME_ERROR _MD_os2_map_gethostname_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_select_error(PRInt32 err);
|
NSPR_API(void) _MD_os2_map_select_error(PRInt32 err);
|
||||||
#define _PR_MD_MAP_SELECT_ERROR _MD_os2_map_select_error
|
#define _PR_MD_MAP_SELECT_ERROR _MD_os2_map_select_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_os2_map_lockf_error(int err);
|
NSPR_API(void) _MD_os2_map_lockf_error(int err);
|
||||||
#define _PR_MD_MAP_LOCKF_ERROR _MD_os2_map_lockf_error
|
#define _PR_MD_MAP_LOCKF_ERROR _MD_os2_map_lockf_error
|
||||||
|
|
||||||
#endif /* nspr_os2_errors_h___ */
|
#endif /* nspr_os2_errors_h___ */
|
||||||
|
|
|
@ -75,9 +75,9 @@
|
||||||
#define _PR_HAVE_GETIPNODEBYNAME
|
#define _PR_HAVE_GETIPNODEBYNAME
|
||||||
|
|
||||||
#include "prinrval.h"
|
#include "prinrval.h"
|
||||||
PR_EXTERN(PRIntervalTime) _MD_Solaris_GetInterval(void);
|
NSPR_API(PRIntervalTime) _MD_Solaris_GetInterval(void);
|
||||||
#define _MD_GET_INTERVAL _MD_Solaris_GetInterval
|
#define _MD_GET_INTERVAL _MD_Solaris_GetInterval
|
||||||
PR_EXTERN(PRIntervalTime) _MD_Solaris_TicksPerSecond(void);
|
NSPR_API(PRIntervalTime) _MD_Solaris_TicksPerSecond(void);
|
||||||
#define _MD_INTERVAL_PER_SEC _MD_Solaris_TicksPerSecond
|
#define _MD_INTERVAL_PER_SEC _MD_Solaris_TicksPerSecond
|
||||||
|
|
||||||
#if defined(_PR_HAVE_ATOMIC_OPS)
|
#if defined(_PR_HAVE_ATOMIC_OPS)
|
||||||
|
@ -86,22 +86,22 @@ PR_EXTERN(PRIntervalTime) _MD_Solaris_TicksPerSecond(void);
|
||||||
*/
|
*/
|
||||||
#define _MD_INIT_ATOMIC()
|
#define _MD_INIT_ATOMIC()
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) _MD_AtomicIncrement(PRInt32 *val);
|
NSPR_API(PRInt32) _MD_AtomicIncrement(PRInt32 *val);
|
||||||
#define _MD_ATOMIC_INCREMENT _MD_AtomicIncrement
|
#define _MD_ATOMIC_INCREMENT _MD_AtomicIncrement
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) _MD_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
NSPR_API(PRInt32) _MD_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||||
#define _MD_ATOMIC_ADD _MD_AtomicAdd
|
#define _MD_ATOMIC_ADD _MD_AtomicAdd
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) _MD_AtomicDecrement(PRInt32 *val);
|
NSPR_API(PRInt32) _MD_AtomicDecrement(PRInt32 *val);
|
||||||
#define _MD_ATOMIC_DECREMENT _MD_AtomicDecrement
|
#define _MD_ATOMIC_DECREMENT _MD_AtomicDecrement
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) _MD_AtomicSet(PRInt32 *val, PRInt32 newval);
|
NSPR_API(PRInt32) _MD_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||||
#define _MD_ATOMIC_SET _MD_AtomicSet
|
#define _MD_ATOMIC_SET _MD_AtomicSet
|
||||||
#endif /* _PR_HAVE_ATOMIC_OPS */
|
#endif /* _PR_HAVE_ATOMIC_OPS */
|
||||||
|
|
||||||
#if defined(_PR_PTHREADS)
|
#if defined(_PR_PTHREADS)
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_EarlyInit(void);
|
NSPR_API(void) _MD_EarlyInit(void);
|
||||||
|
|
||||||
#define _MD_EARLY_INIT _MD_EarlyInit
|
#define _MD_EARLY_INIT _MD_EarlyInit
|
||||||
#define _MD_FINAL_INIT _PR_UnixInit
|
#define _MD_FINAL_INIT _PR_UnixInit
|
||||||
|
@ -116,7 +116,7 @@ PR_EXTERN(void) _MD_EarlyInit(void);
|
||||||
** Iinitialization Related definitions
|
** Iinitialization Related definitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_EarlyInit(void);
|
NSPR_API(void) _MD_EarlyInit(void);
|
||||||
|
|
||||||
#define _MD_EARLY_INIT _MD_EarlyInit
|
#define _MD_EARLY_INIT _MD_EarlyInit
|
||||||
#define _MD_FINAL_INIT _PR_UnixInit
|
#define _MD_FINAL_INIT _PR_UnixInit
|
||||||
|
@ -129,7 +129,7 @@ PR_EXTERN(void) _MD_EarlyInit(void);
|
||||||
#define _MD_INIT_THREAD _MD_InitializeThread
|
#define _MD_INIT_THREAD _MD_InitializeThread
|
||||||
#define _MD_INIT_ATTACHED_THREAD _MD_InitializeThread
|
#define _MD_INIT_ATTACHED_THREAD _MD_InitializeThread
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _MD_CreateThread(PRThread *thread,
|
NSPR_API(PRStatus) _MD_CreateThread(PRThread *thread,
|
||||||
void (*start)(void *),
|
void (*start)(void *),
|
||||||
PRThreadPriority priority,
|
PRThreadPriority priority,
|
||||||
PRThreadScope scope,
|
PRThreadScope scope,
|
||||||
|
@ -205,7 +205,7 @@ extern void _MD_End_ResumeAll(void);
|
||||||
#define _MD_UNLOCK(md_lockp) mutex_unlock(&((md_lockp)->lock))
|
#define _MD_UNLOCK(md_lockp) mutex_unlock(&((md_lockp)->lock))
|
||||||
#define _MD_TEST_AND_LOCK(md_lockp) mutex_trylock(&((md_lockp)->lock))
|
#define _MD_TEST_AND_LOCK(md_lockp) mutex_trylock(&((md_lockp)->lock))
|
||||||
struct _MDLock;
|
struct _MDLock;
|
||||||
PR_EXTERN(void) _MD_lock(struct _MDLock *md_lock);
|
NSPR_API(void) _MD_lock(struct _MDLock *md_lock);
|
||||||
#undef PROFILE_LOCKS
|
#undef PROFILE_LOCKS
|
||||||
#ifndef PROFILE_LOCKS
|
#ifndef PROFILE_LOCKS
|
||||||
#define _MD_LOCK(md_lockp) _MD_lock(md_lockp)
|
#define _MD_LOCK(md_lockp) _MD_lock(md_lockp)
|
||||||
|
@ -273,7 +273,7 @@ extern PRStatus _MD_wait(struct PRThread *, PRIntervalTime timeout);
|
||||||
extern PRStatus _MD_WakeupWaiter(struct PRThread *);
|
extern PRStatus _MD_WakeupWaiter(struct PRThread *);
|
||||||
#define _MD_WAKEUP_WAITER _MD_WakeupWaiter
|
#define _MD_WAKEUP_WAITER _MD_WakeupWaiter
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_InitIO(void);
|
NSPR_API(void) _MD_InitIO(void);
|
||||||
#define _MD_INIT_IO _MD_InitIO
|
#define _MD_INIT_IO _MD_InitIO
|
||||||
|
|
||||||
#define _MD_INIT_CONTEXT(_thread, _sp, _main, status)
|
#define _MD_INIT_CONTEXT(_thread, _sp, _main, status)
|
||||||
|
@ -389,8 +389,8 @@ PR_END_EXTERN_C
|
||||||
** Iinitialization Related definitions
|
** Iinitialization Related definitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_EarlyInit(void);
|
NSPR_API(void) _MD_EarlyInit(void);
|
||||||
PR_EXTERN(void) _MD_SolarisInit();
|
NSPR_API(void) _MD_SolarisInit();
|
||||||
#define _MD_EARLY_INIT _MD_EarlyInit
|
#define _MD_EARLY_INIT _MD_EarlyInit
|
||||||
#define _MD_FINAL_INIT _MD_SolarisInit
|
#define _MD_FINAL_INIT _MD_SolarisInit
|
||||||
#define _MD_INIT_THREAD _MD_InitializeThread
|
#define _MD_INIT_THREAD _MD_InitializeThread
|
||||||
|
@ -698,9 +698,9 @@ extern PRStatus _MD_CREATE_THREAD(PRThread *thread, void (*start) (void *),
|
||||||
PRThreadPriority priority, PRThreadScope scope, PRThreadState state,
|
PRThreadPriority priority, PRThreadScope scope, PRThreadState state,
|
||||||
PRUint32 stackSize);
|
PRUint32 stackSize);
|
||||||
|
|
||||||
PR_EXTERN(PRIntervalTime) _MD_Solaris_GetInterval(void);
|
NSPR_API(PRIntervalTime) _MD_Solaris_GetInterval(void);
|
||||||
#define _MD_GET_INTERVAL _MD_Solaris_GetInterval
|
#define _MD_GET_INTERVAL _MD_Solaris_GetInterval
|
||||||
PR_EXTERN(PRIntervalTime) _MD_Solaris_TicksPerSecond(void);
|
NSPR_API(PRIntervalTime) _MD_Solaris_TicksPerSecond(void);
|
||||||
#define _MD_INTERVAL_PER_SEC _MD_Solaris_TicksPerSecond
|
#define _MD_INTERVAL_PER_SEC _MD_Solaris_TicksPerSecond
|
||||||
|
|
||||||
/* The following defines the unwrapped versions of select() and poll(). */
|
/* The following defines the unwrapped versions of select() and poll(). */
|
||||||
|
|
|
@ -24,127 +24,127 @@
|
||||||
|
|
||||||
PR_BEGIN_EXTERN_C
|
PR_BEGIN_EXTERN_C
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_default_error(int err);
|
NSPR_API(void) _MD_unix_map_default_error(int err);
|
||||||
#define _PR_MD_MAP_DEFAULT_ERROR _MD_unix_map_default_error
|
#define _PR_MD_MAP_DEFAULT_ERROR _MD_unix_map_default_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_opendir_error(int err);
|
NSPR_API(void) _MD_unix_map_opendir_error(int err);
|
||||||
#define _PR_MD_MAP_OPENDIR_ERROR _MD_unix_map_opendir_error
|
#define _PR_MD_MAP_OPENDIR_ERROR _MD_unix_map_opendir_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_closedir_error(int err);
|
NSPR_API(void) _MD_unix_map_closedir_error(int err);
|
||||||
#define _PR_MD_MAP_CLOSEDIR_ERROR _MD_unix_map_closedir_error
|
#define _PR_MD_MAP_CLOSEDIR_ERROR _MD_unix_map_closedir_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_readdir_error(int err);
|
NSPR_API(void) _MD_unix_readdir_error(int err);
|
||||||
#define _PR_MD_MAP_READDIR_ERROR _MD_unix_readdir_error
|
#define _PR_MD_MAP_READDIR_ERROR _MD_unix_readdir_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_unlink_error(int err);
|
NSPR_API(void) _MD_unix_map_unlink_error(int err);
|
||||||
#define _PR_MD_MAP_UNLINK_ERROR _MD_unix_map_unlink_error
|
#define _PR_MD_MAP_UNLINK_ERROR _MD_unix_map_unlink_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_stat_error(int err);
|
NSPR_API(void) _MD_unix_map_stat_error(int err);
|
||||||
#define _PR_MD_MAP_STAT_ERROR _MD_unix_map_stat_error
|
#define _PR_MD_MAP_STAT_ERROR _MD_unix_map_stat_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_fstat_error(int err);
|
NSPR_API(void) _MD_unix_map_fstat_error(int err);
|
||||||
#define _PR_MD_MAP_FSTAT_ERROR _MD_unix_map_fstat_error
|
#define _PR_MD_MAP_FSTAT_ERROR _MD_unix_map_fstat_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_rename_error(int err);
|
NSPR_API(void) _MD_unix_map_rename_error(int err);
|
||||||
#define _PR_MD_MAP_RENAME_ERROR _MD_unix_map_rename_error
|
#define _PR_MD_MAP_RENAME_ERROR _MD_unix_map_rename_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_access_error(int err);
|
NSPR_API(void) _MD_unix_map_access_error(int err);
|
||||||
#define _PR_MD_MAP_ACCESS_ERROR _MD_unix_map_access_error
|
#define _PR_MD_MAP_ACCESS_ERROR _MD_unix_map_access_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_mkdir_error(int err);
|
NSPR_API(void) _MD_unix_map_mkdir_error(int err);
|
||||||
#define _PR_MD_MAP_MKDIR_ERROR _MD_unix_map_mkdir_error
|
#define _PR_MD_MAP_MKDIR_ERROR _MD_unix_map_mkdir_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_rmdir_error(int err);
|
NSPR_API(void) _MD_unix_map_rmdir_error(int err);
|
||||||
#define _PR_MD_MAP_RMDIR_ERROR _MD_unix_map_rmdir_error
|
#define _PR_MD_MAP_RMDIR_ERROR _MD_unix_map_rmdir_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_read_error(int err);
|
NSPR_API(void) _MD_unix_map_read_error(int err);
|
||||||
#define _PR_MD_MAP_READ_ERROR _MD_unix_map_read_error
|
#define _PR_MD_MAP_READ_ERROR _MD_unix_map_read_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_write_error(int err);
|
NSPR_API(void) _MD_unix_map_write_error(int err);
|
||||||
#define _PR_MD_MAP_WRITE_ERROR _MD_unix_map_write_error
|
#define _PR_MD_MAP_WRITE_ERROR _MD_unix_map_write_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_lseek_error(int err);
|
NSPR_API(void) _MD_unix_map_lseek_error(int err);
|
||||||
#define _PR_MD_MAP_LSEEK_ERROR _MD_unix_map_lseek_error
|
#define _PR_MD_MAP_LSEEK_ERROR _MD_unix_map_lseek_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_fsync_error(int err);
|
NSPR_API(void) _MD_unix_map_fsync_error(int err);
|
||||||
#define _PR_MD_MAP_FSYNC_ERROR _MD_unix_map_fsync_error
|
#define _PR_MD_MAP_FSYNC_ERROR _MD_unix_map_fsync_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_close_error(int err);
|
NSPR_API(void) _MD_unix_map_close_error(int err);
|
||||||
#define _PR_MD_MAP_CLOSE_ERROR _MD_unix_map_close_error
|
#define _PR_MD_MAP_CLOSE_ERROR _MD_unix_map_close_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_socket_error(int err);
|
NSPR_API(void) _MD_unix_map_socket_error(int err);
|
||||||
#define _PR_MD_MAP_SOCKET_ERROR _MD_unix_map_socket_error
|
#define _PR_MD_MAP_SOCKET_ERROR _MD_unix_map_socket_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_socketavailable_error(int err);
|
NSPR_API(void) _MD_unix_map_socketavailable_error(int err);
|
||||||
#define _PR_MD_MAP_SOCKETAVAILABLE_ERROR _MD_unix_map_socketavailable_error
|
#define _PR_MD_MAP_SOCKETAVAILABLE_ERROR _MD_unix_map_socketavailable_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_recv_error(int err);
|
NSPR_API(void) _MD_unix_map_recv_error(int err);
|
||||||
#define _PR_MD_MAP_RECV_ERROR _MD_unix_map_recv_error
|
#define _PR_MD_MAP_RECV_ERROR _MD_unix_map_recv_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_recvfrom_error(int err);
|
NSPR_API(void) _MD_unix_map_recvfrom_error(int err);
|
||||||
#define _PR_MD_MAP_RECVFROM_ERROR _MD_unix_map_recvfrom_error
|
#define _PR_MD_MAP_RECVFROM_ERROR _MD_unix_map_recvfrom_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_send_error(int err);
|
NSPR_API(void) _MD_unix_map_send_error(int err);
|
||||||
#define _PR_MD_MAP_SEND_ERROR _MD_unix_map_send_error
|
#define _PR_MD_MAP_SEND_ERROR _MD_unix_map_send_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_sendto_error(int err);
|
NSPR_API(void) _MD_unix_map_sendto_error(int err);
|
||||||
#define _PR_MD_MAP_SENDTO_ERROR _MD_unix_map_sendto_error
|
#define _PR_MD_MAP_SENDTO_ERROR _MD_unix_map_sendto_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_writev_error(int err);
|
NSPR_API(void) _MD_unix_map_writev_error(int err);
|
||||||
#define _PR_MD_MAP_WRITEV_ERROR _MD_unix_map_writev_error
|
#define _PR_MD_MAP_WRITEV_ERROR _MD_unix_map_writev_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_accept_error(int err);
|
NSPR_API(void) _MD_unix_map_accept_error(int err);
|
||||||
#define _PR_MD_MAP_ACCEPT_ERROR _MD_unix_map_accept_error
|
#define _PR_MD_MAP_ACCEPT_ERROR _MD_unix_map_accept_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_connect_error(int err);
|
NSPR_API(void) _MD_unix_map_connect_error(int err);
|
||||||
#define _PR_MD_MAP_CONNECT_ERROR _MD_unix_map_connect_error
|
#define _PR_MD_MAP_CONNECT_ERROR _MD_unix_map_connect_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_bind_error(int err);
|
NSPR_API(void) _MD_unix_map_bind_error(int err);
|
||||||
#define _PR_MD_MAP_BIND_ERROR _MD_unix_map_bind_error
|
#define _PR_MD_MAP_BIND_ERROR _MD_unix_map_bind_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_listen_error(int err);
|
NSPR_API(void) _MD_unix_map_listen_error(int err);
|
||||||
#define _PR_MD_MAP_LISTEN_ERROR _MD_unix_map_listen_error
|
#define _PR_MD_MAP_LISTEN_ERROR _MD_unix_map_listen_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_shutdown_error(int err);
|
NSPR_API(void) _MD_unix_map_shutdown_error(int err);
|
||||||
#define _PR_MD_MAP_SHUTDOWN_ERROR _MD_unix_map_shutdown_error
|
#define _PR_MD_MAP_SHUTDOWN_ERROR _MD_unix_map_shutdown_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_socketpair_error(int err);
|
NSPR_API(void) _MD_unix_map_socketpair_error(int err);
|
||||||
#define _PR_MD_MAP_SOCKETPAIR_ERROR _MD_unix_map_socketpair_error
|
#define _PR_MD_MAP_SOCKETPAIR_ERROR _MD_unix_map_socketpair_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_getsockname_error(int err);
|
NSPR_API(void) _MD_unix_map_getsockname_error(int err);
|
||||||
#define _PR_MD_MAP_GETSOCKNAME_ERROR _MD_unix_map_getsockname_error
|
#define _PR_MD_MAP_GETSOCKNAME_ERROR _MD_unix_map_getsockname_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_getpeername_error(int err);
|
NSPR_API(void) _MD_unix_map_getpeername_error(int err);
|
||||||
#define _PR_MD_MAP_GETPEERNAME_ERROR _MD_unix_map_getpeername_error
|
#define _PR_MD_MAP_GETPEERNAME_ERROR _MD_unix_map_getpeername_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_getsockopt_error(int err);
|
NSPR_API(void) _MD_unix_map_getsockopt_error(int err);
|
||||||
#define _PR_MD_MAP_GETSOCKOPT_ERROR _MD_unix_map_getsockopt_error
|
#define _PR_MD_MAP_GETSOCKOPT_ERROR _MD_unix_map_getsockopt_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_setsockopt_error(int err);
|
NSPR_API(void) _MD_unix_map_setsockopt_error(int err);
|
||||||
#define _PR_MD_MAP_SETSOCKOPT_ERROR _MD_unix_map_setsockopt_error
|
#define _PR_MD_MAP_SETSOCKOPT_ERROR _MD_unix_map_setsockopt_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_open_error(int err);
|
NSPR_API(void) _MD_unix_map_open_error(int err);
|
||||||
#define _PR_MD_MAP_OPEN_ERROR _MD_unix_map_open_error
|
#define _PR_MD_MAP_OPEN_ERROR _MD_unix_map_open_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_mmap_error(int err);
|
NSPR_API(void) _MD_unix_map_mmap_error(int err);
|
||||||
#define _PR_MD_MAP_MMAP_ERROR _MD_unix_map_mmap_error
|
#define _PR_MD_MAP_MMAP_ERROR _MD_unix_map_mmap_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_gethostname_error(int err);
|
NSPR_API(void) _MD_unix_map_gethostname_error(int err);
|
||||||
#define _PR_MD_MAP_GETHOSTNAME_ERROR _MD_unix_map_gethostname_error
|
#define _PR_MD_MAP_GETHOSTNAME_ERROR _MD_unix_map_gethostname_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_select_error(int err);
|
NSPR_API(void) _MD_unix_map_select_error(int err);
|
||||||
#define _PR_MD_MAP_SELECT_ERROR _MD_unix_map_select_error
|
#define _PR_MD_MAP_SELECT_ERROR _MD_unix_map_select_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_poll_error(int err);
|
NSPR_API(void) _MD_unix_map_poll_error(int err);
|
||||||
#define _PR_MD_MAP_POLL_ERROR _MD_unix_map_poll_error
|
#define _PR_MD_MAP_POLL_ERROR _MD_unix_map_poll_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_poll_revents_error(int err);
|
NSPR_API(void) _MD_unix_map_poll_revents_error(int err);
|
||||||
#define _PR_MD_MAP_POLL_REVENTS_ERROR _MD_unix_map_poll_revents_error
|
#define _PR_MD_MAP_POLL_REVENTS_ERROR _MD_unix_map_poll_revents_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_flock_error(int err);
|
NSPR_API(void) _MD_unix_map_flock_error(int err);
|
||||||
#define _PR_MD_MAP_FLOCK_ERROR _MD_unix_map_flock_error
|
#define _PR_MD_MAP_FLOCK_ERROR _MD_unix_map_flock_error
|
||||||
|
|
||||||
PR_EXTERN(void) _MD_unix_map_lockf_error(int err);
|
NSPR_API(void) _MD_unix_map_lockf_error(int err);
|
||||||
#define _PR_MD_MAP_LOCKF_ERROR _MD_unix_map_lockf_error
|
#define _PR_MD_MAP_LOCKF_ERROR _MD_unix_map_lockf_error
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
|
@ -81,9 +81,9 @@ typedef struct PRPollQueue
|
||||||
#define _PR_POLLQUEUE_PTR(_qp) \
|
#define _PR_POLLQUEUE_PTR(_qp) \
|
||||||
((PRPollQueue *) ((char*) (_qp) - offsetof(PRPollQueue,links)))
|
((PRPollQueue *) ((char*) (_qp) - offsetof(PRPollQueue,links)))
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) _PR_WaitForFD(PRInt32 osfd, PRUintn how,
|
NSPR_API(PRInt32) _PR_WaitForFD(PRInt32 osfd, PRUintn how,
|
||||||
PRIntervalTime timeout);
|
PRIntervalTime timeout);
|
||||||
PR_EXTERN(void) _PR_Unblock_IO_Wait(struct PRThread *thr);
|
NSPR_API(void) _PR_Unblock_IO_Wait(struct PRThread *thr);
|
||||||
|
|
||||||
#define _PR_MD_MAX_OSFD FD_SETSIZE
|
#define _PR_MD_MAX_OSFD FD_SETSIZE
|
||||||
#define _PR_IOQ(_cpu) ((_cpu)->md.ioQ)
|
#define _PR_IOQ(_cpu) ((_cpu)->md.ioQ)
|
||||||
|
@ -382,7 +382,7 @@ extern PRStatus _PR_KillWindowsProcess(struct PRProcess *process);
|
||||||
|
|
||||||
|
|
||||||
/* --- Initialization stuff --- */
|
/* --- Initialization stuff --- */
|
||||||
PR_EXTERN(void) _MD_INIT_RUNNING_CPU(struct _PRCPU *cpu );
|
NSPR_API(void) _MD_INIT_RUNNING_CPU(struct _PRCPU *cpu );
|
||||||
#define _MD_START_INTERRUPTS()
|
#define _MD_START_INTERRUPTS()
|
||||||
#define _MD_STOP_INTERRUPTS()
|
#define _MD_STOP_INTERRUPTS()
|
||||||
#define _MD_DISABLE_CLOCK_INTERRUPTS()
|
#define _MD_DISABLE_CLOCK_INTERRUPTS()
|
||||||
|
@ -422,8 +422,8 @@ PR_EXTERN(void) _MD_INIT_RUNNING_CPU(struct _PRCPU *cpu );
|
||||||
** Watcom needs to see this to make the linker work.
|
** Watcom needs to see this to make the linker work.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) _PR_NativeDestroyThread(PRThread *thread);
|
NSPR_API(void) _PR_NativeDestroyThread(PRThread *thread);
|
||||||
PR_EXTERN(void) _PR_UserDestroyThread(PRThread *thread);
|
NSPR_API(void) _PR_UserDestroyThread(PRThread *thread);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -81,7 +81,7 @@ typedef PRBool (PR_CALLBACK *PRPeriodicAlarmFn)(
|
||||||
** MEMORY: The object (PRAlarm) and a thread to support notifications.
|
** MEMORY: The object (PRAlarm) and a thread to support notifications.
|
||||||
** ALGORITHM: N/A
|
** ALGORITHM: N/A
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRAlarm*) PR_CreateAlarm(void);
|
NSPR_API(PRAlarm*) PR_CreateAlarm(void);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_DestroyAlarm
|
** FUNCTION: PR_DestroyAlarm
|
||||||
|
@ -101,7 +101,7 @@ PR_EXTERN(PRAlarm*) PR_CreateAlarm(void);
|
||||||
** MEMORY: N/A
|
** MEMORY: N/A
|
||||||
** ALGORITHM: N/A
|
** ALGORITHM: N/A
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRStatus) PR_DestroyAlarm(PRAlarm *alarm);
|
NSPR_API(PRStatus) PR_DestroyAlarm(PRAlarm *alarm);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_SetAlarm
|
** FUNCTION: PR_SetAlarm
|
||||||
|
@ -139,7 +139,7 @@ PR_EXTERN(PRStatus) PR_DestroyAlarm(PRAlarm *alarm);
|
||||||
** The amount of lateness of one notification is taken into
|
** The amount of lateness of one notification is taken into
|
||||||
** account on the next in an attempt to avoid long term slew.
|
** account on the next in an attempt to avoid long term slew.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRAlarmID*) PR_SetAlarm(
|
NSPR_API(PRAlarmID*) PR_SetAlarm(
|
||||||
PRAlarm *alarm, PRIntervalTime period, PRUint32 rate,
|
PRAlarm *alarm, PRIntervalTime period, PRUint32 rate,
|
||||||
PRPeriodicAlarmFn function, void *clientData);
|
PRPeriodicAlarmFn function, void *clientData);
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ PR_EXTERN(PRAlarmID*) PR_SetAlarm(
|
||||||
** MEMORY: N/A.
|
** MEMORY: N/A.
|
||||||
** ALGORITHM: See PR_SetAlarm().
|
** ALGORITHM: See PR_SetAlarm().
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRStatus) PR_ResetAlarm(
|
NSPR_API(PRStatus) PR_ResetAlarm(
|
||||||
PRAlarmID *id, PRIntervalTime period, PRUint32 rate);
|
PRAlarmID *id, PRIntervalTime period, PRUint32 rate);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
|
@ -32,17 +32,17 @@ PR_BEGIN_EXTERN_C
|
||||||
** Yield the current thread. The proper function to use in place of
|
** Yield the current thread. The proper function to use in place of
|
||||||
** PR_Yield() is PR_Sleep() with an argument of PR_INTERVAL_NO_WAIT.
|
** PR_Yield() is PR_Sleep() with an argument of PR_INTERVAL_NO_WAIT.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_Yield(void);
|
NSPR_API(PRStatus) PR_Yield(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** These are obsolete and are replaced by PR_GetSocketOption() and
|
** These are obsolete and are replaced by PR_GetSocketOption() and
|
||||||
** PR_SetSocketOption().
|
** PR_SetSocketOption().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_GetSockOpt(
|
NSPR_API(PRStatus) PR_GetSockOpt(
|
||||||
PRFileDesc *fd, PRSockOption optname, void* optval, PRInt32* optlen);
|
PRFileDesc *fd, PRSockOption optname, void* optval, PRInt32* optlen);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_SetSockOpt(
|
NSPR_API(PRStatus) PR_SetSockOpt(
|
||||||
PRFileDesc *fd, PRSockOption optname, const void* optval, PRInt32 optlen);
|
PRFileDesc *fd, PRSockOption optname, const void* optval, PRInt32 optlen);
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
@ -120,7 +120,7 @@ typedef struct PR_fd_set {
|
||||||
** XXX can we implement this on windoze and mac?
|
** XXX can we implement this on windoze and mac?
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_Select(
|
NSPR_API(PRInt32) PR_Select(
|
||||||
PRInt32 num, PR_fd_set *readfds, PR_fd_set *writefds,
|
PRInt32 num, PR_fd_set *readfds, PR_fd_set *writefds,
|
||||||
PR_fd_set *exceptfds, PRIntervalTime timeout);
|
PR_fd_set *exceptfds, PRIntervalTime timeout);
|
||||||
|
|
||||||
|
@ -142,13 +142,13 @@ PR_EXTERN(PRInt32) PR_Select(
|
||||||
** fdset, zero otherwise.
|
** fdset, zero otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(void) PR_FD_ZERO(PR_fd_set *set);
|
NSPR_API(void) PR_FD_ZERO(PR_fd_set *set);
|
||||||
PR_EXTERN(void) PR_FD_SET(PRFileDesc *fd, PR_fd_set *set);
|
NSPR_API(void) PR_FD_SET(PRFileDesc *fd, PR_fd_set *set);
|
||||||
PR_EXTERN(void) PR_FD_CLR(PRFileDesc *fd, PR_fd_set *set);
|
NSPR_API(void) PR_FD_CLR(PRFileDesc *fd, PR_fd_set *set);
|
||||||
PR_EXTERN(PRInt32) PR_FD_ISSET(PRFileDesc *fd, PR_fd_set *set);
|
NSPR_API(PRInt32) PR_FD_ISSET(PRFileDesc *fd, PR_fd_set *set);
|
||||||
PR_EXTERN(void) PR_FD_NSET(PRInt32 osfd, PR_fd_set *set);
|
NSPR_API(void) PR_FD_NSET(PRInt32 osfd, PR_fd_set *set);
|
||||||
PR_EXTERN(void) PR_FD_NCLR(PRInt32 osfd, PR_fd_set *set);
|
NSPR_API(void) PR_FD_NCLR(PRInt32 osfd, PR_fd_set *set);
|
||||||
PR_EXTERN(PRInt32) PR_FD_NISSET(PRInt32 osfd, PR_fd_set *set);
|
NSPR_API(PRInt32) PR_FD_NISSET(PRInt32 osfd, PR_fd_set *set);
|
||||||
|
|
||||||
#ifndef NO_NSPR_10_SUPPORT
|
#ifndef NO_NSPR_10_SUPPORT
|
||||||
#ifdef XP_MAC
|
#ifdef XP_MAC
|
||||||
|
@ -157,7 +157,7 @@ PR_EXTERN(PRInt32) PR_FD_NISSET(PRInt32 osfd, PR_fd_set *set);
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_Stat(const char *path, struct stat *buf);
|
NSPR_API(PRInt32) PR_Stat(const char *path, struct stat *buf);
|
||||||
#endif /* NO_NSPR_10_SUPPORT */
|
#endif /* NO_NSPR_10_SUPPORT */
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -185,8 +185,8 @@ PR_EXTERN(PRInt32) PR_Stat(const char *path, struct stat *buf);
|
||||||
** be retrieved by calling PR_GetError().
|
** be retrieved by calling PR_GetError().
|
||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRNetAddr*) PR_CreateNetAddr(PRNetAddrValue val, PRUint16 port);
|
NSPR_API(PRNetAddr*) PR_CreateNetAddr(PRNetAddrValue val, PRUint16 port);
|
||||||
PR_EXTERN(PRStatus) PR_DestroyNetAddr(PRNetAddr *addr);
|
NSPR_API(PRStatus) PR_DestroyNetAddr(PRNetAddr *addr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -210,13 +210,13 @@ PR_EXTERN(PRStatus) PR_DestroyNetAddr(PRNetAddr *addr);
|
||||||
** result will be PR_FAILURE and the reason for
|
** result will be PR_FAILURE and the reason for
|
||||||
** the failure can be retrieved by PR_GetError().
|
** the failure can be retrieved by PR_GetError().
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRStatus) PR_GetHostName(char *name, PRUint32 namelen);
|
NSPR_API(PRStatus) PR_GetHostName(char *name, PRUint32 namelen);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return the current thread's last error string.
|
** Return the current thread's last error string.
|
||||||
** obsoleted by PR_GetErrorText().
|
** obsoleted by PR_GetErrorText().
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(const char *) PR_GetErrorString(void);
|
NSPR_API(const char *) PR_GetErrorString(void);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -33,13 +33,13 @@ typedef struct PRSemaphore PRSemaphore;
|
||||||
/*
|
/*
|
||||||
** Create a new semaphore object.
|
** Create a new semaphore object.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRSemaphore*) PR_NewSem(PRUintn value);
|
NSPR_API(PRSemaphore*) PR_NewSem(PRUintn value);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Destroy the given semaphore object.
|
** Destroy the given semaphore object.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_DestroySem(PRSemaphore *sem);
|
NSPR_API(void) PR_DestroySem(PRSemaphore *sem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Wait on a Semaphore.
|
** Wait on a Semaphore.
|
||||||
|
@ -55,14 +55,14 @@ PR_EXTERN(void) PR_DestroySem(PRSemaphore *sem);
|
||||||
** This routine can return PR_PENDING_INTERRUPT if the waiting thread
|
** This routine can return PR_PENDING_INTERRUPT if the waiting thread
|
||||||
** has been interrupted.
|
** has been interrupted.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_WaitSem(PRSemaphore *sem);
|
NSPR_API(PRStatus) PR_WaitSem(PRSemaphore *sem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This routine increments the counter value of the semaphore. If other threads
|
** This routine increments the counter value of the semaphore. If other threads
|
||||||
** are blocked for the semaphore, then the scheduler will determine which ONE
|
** are blocked for the semaphore, then the scheduler will determine which ONE
|
||||||
** thread will be unblocked.
|
** thread will be unblocked.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_PostSem(PRSemaphore *sem);
|
NSPR_API(void) PR_PostSem(PRSemaphore *sem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Returns the value of the semaphore referenced by sem without affecting
|
** Returns the value of the semaphore referenced by sem without affecting
|
||||||
|
@ -70,7 +70,7 @@ PR_EXTERN(void) PR_PostSem(PRSemaphore *sem);
|
||||||
F** at the time of the call, but may not be the actual value when the
|
F** at the time of the call, but may not be the actual value when the
|
||||||
** caller inspects it.
|
** caller inspects it.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRUintn) PR_GetValueSem(PRSemaphore *sem);
|
NSPR_API(PRUintn) PR_GetValueSem(PRSemaphore *sem);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ PR_BEGIN_EXTERN_C
|
||||||
** RETURN:
|
** RETURN:
|
||||||
** the returned value is the result of the increment
|
** the returned value is the result of the increment
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_AtomicIncrement(PRInt32 *val);
|
NSPR_API(PRInt32) PR_AtomicIncrement(PRInt32 *val);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_AtomicDecrement
|
** FUNCTION: PR_AtomicDecrement
|
||||||
|
@ -49,7 +49,7 @@ PR_EXTERN(PRInt32) PR_AtomicIncrement(PRInt32 *val);
|
||||||
** RETURN:
|
** RETURN:
|
||||||
** the returned value is the result of the decrement
|
** the returned value is the result of the decrement
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_AtomicDecrement(PRInt32 *val);
|
NSPR_API(PRInt32) PR_AtomicDecrement(PRInt32 *val);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_AtomicSet
|
** FUNCTION: PR_AtomicSet
|
||||||
|
@ -61,7 +61,7 @@ PR_EXTERN(PRInt32) PR_AtomicDecrement(PRInt32 *val);
|
||||||
** RETURN:
|
** RETURN:
|
||||||
** Returns the prior value
|
** Returns the prior value
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_AtomicSet(PRInt32 *val, PRInt32 newval);
|
NSPR_API(PRInt32) PR_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_AtomicAdd
|
** FUNCTION: PR_AtomicAdd
|
||||||
|
@ -73,7 +73,7 @@ PR_EXTERN(PRInt32) PR_AtomicSet(PRInt32 *val, PRInt32 newval);
|
||||||
** RETURN:
|
** RETURN:
|
||||||
** the returned value is the result of the addition
|
** the returned value is the result of the addition
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
NSPR_API(PRInt32) PR_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** LIFO linked-list (stack)
|
** LIFO linked-list (stack)
|
||||||
|
@ -96,7 +96,7 @@ typedef struct PRStackStr PRStack;
|
||||||
** RETURN:
|
** RETURN:
|
||||||
** A pointer to the created stack, if successful, else NULL.
|
** A pointer to the created stack, if successful, else NULL.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStack *) PR_CreateStack(const char *stack_name);
|
NSPR_API(PRStack *) PR_CreateStack(const char *stack_name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_StackPush
|
** FUNCTION: PR_StackPush
|
||||||
|
@ -108,7 +108,7 @@ PR_EXTERN(PRStack *) PR_CreateStack(const char *stack_name);
|
||||||
** RETURN:
|
** RETURN:
|
||||||
** None
|
** None
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_StackPush(PRStack *stack, PRStackElem *stack_elem);
|
NSPR_API(void) PR_StackPush(PRStack *stack, PRStackElem *stack_elem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_StackPop
|
** FUNCTION: PR_StackPop
|
||||||
|
@ -121,7 +121,7 @@ PR_EXTERN(void) PR_StackPush(PRStack *stack, PRStackElem *stack_elem);
|
||||||
** if non-empty,
|
** if non-empty,
|
||||||
** else NULL
|
** else NULL
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStackElem *) PR_StackPop(PRStack *stack);
|
NSPR_API(PRStackElem *) PR_StackPop(PRStack *stack);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_DestroyStack
|
** FUNCTION: PR_DestroyStack
|
||||||
|
@ -135,7 +135,7 @@ PR_EXTERN(PRStackElem *) PR_StackPop(PRStack *stack);
|
||||||
** PR_GetError will return
|
** PR_GetError will return
|
||||||
** PR_INVALID_STATE_ERROR - stack is not empty
|
** PR_INVALID_STATE_ERROR - stack is not empty
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_DestroyStack(PRStack *stack);
|
NSPR_API(PRStatus) PR_DestroyStack(PRStack *stack);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -37,12 +37,12 @@ typedef unsigned long prbitmap_t;
|
||||||
/*
|
/*
|
||||||
** Compute the log of the least power of 2 greater than or equal to n
|
** Compute the log of the least power of 2 greater than or equal to n
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRIntn) PR_CeilingLog2(PRUint32 i);
|
NSPR_API(PRIntn) PR_CeilingLog2(PRUint32 i);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Compute the log of the greatest power of 2 less than or equal to n
|
** Compute the log of the greatest power of 2 less than or equal to n
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRIntn) PR_FloorLog2(PRUint32 i);
|
NSPR_API(PRIntn) PR_FloorLog2(PRUint32 i);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Macro version of PR_CeilingLog2: Compute the log of the least power of
|
** Macro version of PR_CeilingLog2: Compute the log of the least power of
|
||||||
|
|
|
@ -42,37 +42,37 @@ PR_BEGIN_EXTERN_C
|
||||||
** up). This call will return NULL if the monitor cache needs to be
|
** up). This call will return NULL if the monitor cache needs to be
|
||||||
** expanded and the system is out of memory.
|
** expanded and the system is out of memory.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRMonitor*) PR_CEnterMonitor(void *address);
|
NSPR_API(PRMonitor*) PR_CEnterMonitor(void *address);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Like PR_ExitMonitor except use the "address" to find a monitor in the
|
** Like PR_ExitMonitor except use the "address" to find a monitor in the
|
||||||
** monitor cache.
|
** monitor cache.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_CExitMonitor(void *address);
|
NSPR_API(PRStatus) PR_CExitMonitor(void *address);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Like PR_Wait except use the "address" to find a monitor in the
|
** Like PR_Wait except use the "address" to find a monitor in the
|
||||||
** monitor cache.
|
** monitor cache.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_CWait(void *address, PRIntervalTime timeout);
|
NSPR_API(PRStatus) PR_CWait(void *address, PRIntervalTime timeout);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Like PR_Notify except use the "address" to find a monitor in the
|
** Like PR_Notify except use the "address" to find a monitor in the
|
||||||
** monitor cache.
|
** monitor cache.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_CNotify(void *address);
|
NSPR_API(PRStatus) PR_CNotify(void *address);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Like PR_NotifyAll except use the "address" to find a monitor in the
|
** Like PR_NotifyAll except use the "address" to find a monitor in the
|
||||||
** monitor cache.
|
** monitor cache.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_CNotifyAll(void *address);
|
NSPR_API(PRStatus) PR_CNotifyAll(void *address);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Set a callback to be invoked each time a monitor is recycled from the cache
|
** Set a callback to be invoked each time a monitor is recycled from the cache
|
||||||
** freelist, with the monitor's cache-key passed in address.
|
** freelist, with the monitor's cache-key passed in address.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_CSetOnMonitorRecycle(void (*callback)(void *address));
|
NSPR_API(void) PR_CSetOnMonitorRecycle(void (*callback)(void *address));
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ typedef void * PRCounterHandle;
|
||||||
#define PR_CREATE_COUNTER(handle,qName,rName,description)\
|
#define PR_CREATE_COUNTER(handle,qName,rName,description)\
|
||||||
(handle) = PR_CreateCounter((qName),(rName),(description))
|
(handle) = PR_CreateCounter((qName),(rName),(description))
|
||||||
|
|
||||||
PR_EXTERN(PRCounterHandle)
|
NSPR_API(PRCounterHandle)
|
||||||
PR_CreateCounter(
|
PR_CreateCounter(
|
||||||
const char *qName,
|
const char *qName,
|
||||||
const char *rName,
|
const char *rName,
|
||||||
|
@ -180,7 +180,7 @@ PR_EXTERN(PRCounterHandle)
|
||||||
*/
|
*/
|
||||||
#define PR_DESTROY_COUNTER(handle) PR_DestroyCounter((handle))
|
#define PR_DESTROY_COUNTER(handle) PR_DestroyCounter((handle))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_DestroyCounter(
|
PR_DestroyCounter(
|
||||||
PRCounterHandle handle
|
PRCounterHandle handle
|
||||||
);
|
);
|
||||||
|
@ -209,7 +209,7 @@ PR_EXTERN(void)
|
||||||
#define PR_GET_COUNTER_HANDLE_FROM_NAME(handle,qName,rName)\
|
#define PR_GET_COUNTER_HANDLE_FROM_NAME(handle,qName,rName)\
|
||||||
(handle) = PR_GetCounterHandleFromName((qName),(rName))
|
(handle) = PR_GetCounterHandleFromName((qName),(rName))
|
||||||
|
|
||||||
PR_EXTERN(PRCounterHandle)
|
NSPR_API(PRCounterHandle)
|
||||||
PR_GetCounterHandleFromName(
|
PR_GetCounterHandleFromName(
|
||||||
const char *qName,
|
const char *qName,
|
||||||
const char *rName
|
const char *rName
|
||||||
|
@ -238,7 +238,7 @@ PR_EXTERN(PRCounterHandle)
|
||||||
#define PR_GET_COUNTER_NAME_FROM_HANDLE(handle,qName,rName,description)\
|
#define PR_GET_COUNTER_NAME_FROM_HANDLE(handle,qName,rName,description)\
|
||||||
PR_GetCounterNameFromHandle((handle),(qName),(rName),(description))
|
PR_GetCounterNameFromHandle((handle),(qName),(rName),(description))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_GetCounterNameFromHandle(
|
PR_GetCounterNameFromHandle(
|
||||||
PRCounterHandle handle,
|
PRCounterHandle handle,
|
||||||
const char **qName,
|
const char **qName,
|
||||||
|
@ -265,7 +265,7 @@ PR_EXTERN(void)
|
||||||
*/
|
*/
|
||||||
#define PR_INCREMENT_COUNTER(handle) PR_IncrementCounter(handle)
|
#define PR_INCREMENT_COUNTER(handle) PR_IncrementCounter(handle)
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_IncrementCounter(
|
PR_IncrementCounter(
|
||||||
PRCounterHandle handle
|
PRCounterHandle handle
|
||||||
);
|
);
|
||||||
|
@ -290,7 +290,7 @@ PR_EXTERN(void)
|
||||||
*/
|
*/
|
||||||
#define PR_DECREMENT_COUNTER(handle) PR_DecrementCounter(handle)
|
#define PR_DECREMENT_COUNTER(handle) PR_DecrementCounter(handle)
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_DecrementCounter(
|
PR_DecrementCounter(
|
||||||
PRCounterHandle handle
|
PRCounterHandle handle
|
||||||
);
|
);
|
||||||
|
@ -315,7 +315,7 @@ PR_EXTERN(void)
|
||||||
#define PR_ADD_TO_COUNTER(handle,value)\
|
#define PR_ADD_TO_COUNTER(handle,value)\
|
||||||
PR_AddToCounter((handle),(value))
|
PR_AddToCounter((handle),(value))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_AddToCounter(
|
PR_AddToCounter(
|
||||||
PRCounterHandle handle,
|
PRCounterHandle handle,
|
||||||
PRUint32 value
|
PRUint32 value
|
||||||
|
@ -345,7 +345,7 @@ PR_EXTERN(void)
|
||||||
#define PR_SUBTRACT_FROM_COUNTER(handle,value)\
|
#define PR_SUBTRACT_FROM_COUNTER(handle,value)\
|
||||||
PR_SubtractFromCounter((handle),(value))
|
PR_SubtractFromCounter((handle),(value))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_SubtractFromCounter(
|
PR_SubtractFromCounter(
|
||||||
PRCounterHandle handle,
|
PRCounterHandle handle,
|
||||||
PRUint32 value
|
PRUint32 value
|
||||||
|
@ -371,7 +371,7 @@ PR_EXTERN(void)
|
||||||
#define PR_GET_COUNTER(counter,handle)\
|
#define PR_GET_COUNTER(counter,handle)\
|
||||||
(counter) = PR_GetCounter((handle))
|
(counter) = PR_GetCounter((handle))
|
||||||
|
|
||||||
PR_EXTERN(PRUint32)
|
NSPR_API(PRUint32)
|
||||||
PR_GetCounter(
|
PR_GetCounter(
|
||||||
PRCounterHandle handle
|
PRCounterHandle handle
|
||||||
);
|
);
|
||||||
|
@ -398,7 +398,7 @@ PR_EXTERN(PRUint32)
|
||||||
*/
|
*/
|
||||||
#define PR_SET_COUNTER(handle,value) PR_SetCounter((handle),(value))
|
#define PR_SET_COUNTER(handle,value) PR_SetCounter((handle),(value))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_SetCounter(
|
PR_SetCounter(
|
||||||
PRCounterHandle handle,
|
PRCounterHandle handle,
|
||||||
PRUint32 value
|
PRUint32 value
|
||||||
|
@ -437,7 +437,7 @@ PR_EXTERN(void)
|
||||||
#define PR_FIND_NEXT_COUNTER_QNAME(next,handle)\
|
#define PR_FIND_NEXT_COUNTER_QNAME(next,handle)\
|
||||||
(next) = PR_FindNextCounterQname((handle))
|
(next) = PR_FindNextCounterQname((handle))
|
||||||
|
|
||||||
PR_EXTERN(PRCounterHandle)
|
NSPR_API(PRCounterHandle)
|
||||||
PR_FindNextCounterQname(
|
PR_FindNextCounterQname(
|
||||||
PRCounterHandle handle
|
PRCounterHandle handle
|
||||||
);
|
);
|
||||||
|
@ -476,7 +476,7 @@ PR_EXTERN(PRCounterHandle)
|
||||||
#define PR_FIND_NEXT_COUNTER_RNAME(next,rhandle,qhandle)\
|
#define PR_FIND_NEXT_COUNTER_RNAME(next,rhandle,qhandle)\
|
||||||
(next) = PR_FindNextCounterRname((rhandle),(qhandle))
|
(next) = PR_FindNextCounterRname((rhandle),(qhandle))
|
||||||
|
|
||||||
PR_EXTERN(PRCounterHandle)
|
NSPR_API(PRCounterHandle)
|
||||||
PR_FindNextCounterRname(
|
PR_FindNextCounterRname(
|
||||||
PRCounterHandle rhandle,
|
PRCounterHandle rhandle,
|
||||||
PRCounterHandle qhandle
|
PRCounterHandle qhandle
|
||||||
|
|
|
@ -37,7 +37,7 @@ typedef struct PRCondVar PRCondVar;
|
||||||
** This may fail if memory is tight or if some operating system resource
|
** This may fail if memory is tight or if some operating system resource
|
||||||
** is low. In such cases, a NULL will be returned.
|
** is low. In such cases, a NULL will be returned.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRCondVar*) PR_NewCondVar(PRLock *lock);
|
NSPR_API(PRCondVar*) PR_NewCondVar(PRLock *lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Destroy a condition variable. There must be no thread
|
** Destroy a condition variable. There must be no thread
|
||||||
|
@ -45,7 +45,7 @@ PR_EXTERN(PRCondVar*) PR_NewCondVar(PRLock *lock);
|
||||||
** that the condvar is no longer in use.
|
** that the condvar is no longer in use.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_DestroyCondVar(PRCondVar *cvar);
|
NSPR_API(void) PR_DestroyCondVar(PRCondVar *cvar);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The thread that waits on a condition is blocked in a "waiting on
|
** The thread that waits on a condition is blocked in a "waiting on
|
||||||
|
@ -75,7 +75,7 @@ PR_EXTERN(void) PR_DestroyCondVar(PRCondVar *cvar);
|
||||||
** with the condition variable or the thread was interrupted (PR_Interrupt()).
|
** with the condition variable or the thread was interrupted (PR_Interrupt()).
|
||||||
** The particular reason can be extracted with PR_GetError().
|
** The particular reason can be extracted with PR_GetError().
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_WaitCondVar(PRCondVar *cvar, PRIntervalTime timeout);
|
NSPR_API(PRStatus) PR_WaitCondVar(PRCondVar *cvar, PRIntervalTime timeout);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Notify ONE thread that is currently waiting on 'cvar'. Which thread is
|
** Notify ONE thread that is currently waiting on 'cvar'. Which thread is
|
||||||
|
@ -90,7 +90,7 @@ PR_EXTERN(PRStatus) PR_WaitCondVar(PRCondVar *cvar, PRIntervalTime timeout);
|
||||||
** Returns PR_FAILURE if the caller has not locked the lock associated
|
** Returns PR_FAILURE if the caller has not locked the lock associated
|
||||||
** with the condition variable.
|
** with the condition variable.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_NotifyCondVar(PRCondVar *cvar);
|
NSPR_API(PRStatus) PR_NotifyCondVar(PRCondVar *cvar);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Notify all of the threads waiting on the condition variable. The order
|
** Notify all of the threads waiting on the condition variable. The order
|
||||||
|
@ -100,7 +100,7 @@ PR_EXTERN(PRStatus) PR_NotifyCondVar(PRCondVar *cvar);
|
||||||
** Returns PR_FAILURE if the caller has not locked the lock associated
|
** Returns PR_FAILURE if the caller has not locked the lock associated
|
||||||
** with the condition variable.
|
** with the condition variable.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_NotifyAllCondVar(PRCondVar *cvar);
|
NSPR_API(PRStatus) PR_NotifyAllCondVar(PRCondVar *cvar);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ PR_BEGIN_EXTERN_C
|
||||||
*/
|
*/
|
||||||
PRFloat64 __pascal __loadds __export
|
PRFloat64 __pascal __loadds __export
|
||||||
#else
|
#else
|
||||||
PR_EXTERN(PRFloat64)
|
NSPR_API(PRFloat64)
|
||||||
#endif
|
#endif
|
||||||
PR_strtod(const char *s00, char **se);
|
PR_strtod(const char *s00, char **se);
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ PR_strtod(const char *s00, char **se);
|
||||||
** prcsn - number of digits of precision to generate floating
|
** prcsn - number of digits of precision to generate floating
|
||||||
** point value.
|
** point value.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_cnvtf(char *buf, PRIntn bufsz, PRIntn prcsn, PRFloat64 fval);
|
NSPR_API(void) PR_cnvtf(char *buf, PRIntn bufsz, PRIntn prcsn, PRFloat64 fval);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** PR_dtoa() converts double to a string.
|
** PR_dtoa() converts double to a string.
|
||||||
|
@ -63,7 +63,7 @@ PR_EXTERN(void) PR_cnvtf(char *buf, PRIntn bufsz, PRIntn prcsn, PRFloat64 fval);
|
||||||
** 0 ==> shortest string that yields d when read in
|
** 0 ==> shortest string that yields d when read in
|
||||||
** and rounded to nearest.
|
** and rounded to nearest.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_dtoa(PRFloat64 d, PRIntn mode, PRIntn ndigits,
|
NSPR_API(PRStatus) PR_dtoa(PRFloat64 d, PRIntn mode, PRIntn ndigits,
|
||||||
PRIntn *decpt, PRIntn *sign, char **rve, char *buf, PRSize bufsize);
|
PRIntn *decpt, PRIntn *sign, char **rve, char *buf, PRSize bufsize);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
|
@ -33,10 +33,10 @@ PR_BEGIN_EXTERN_C
|
||||||
** Lookup a variable in the environment. Return NULL if it's not found,
|
** Lookup a variable in the environment. Return NULL if it's not found,
|
||||||
** otherwise return it's value.
|
** otherwise return it's value.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(char*) PR_GetEnv(const char *var);
|
NSPR_API(char*) PR_GetEnv(const char *var);
|
||||||
|
|
||||||
#ifdef XP_MAC
|
#ifdef XP_MAC
|
||||||
PR_EXTERN(PRIntn) PR_PutEnv(const char *string);
|
NSPR_API(PRIntn) PR_PutEnv(const char *string);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
|
@ -35,7 +35,7 @@ typedef PRInt32 PRErrorCode;
|
||||||
** the error. Also, if available, the platform specific oserror is stored.
|
** the error. Also, if available, the platform specific oserror is stored.
|
||||||
** If there is no appropriate OS error number, a zero my be supplied.
|
** If there is no appropriate OS error number, a zero my be supplied.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_SetError(PRErrorCode errorCode, PRInt32 oserr);
|
NSPR_API(void) PR_SetError(PRErrorCode errorCode, PRInt32 oserr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The text value specified may be NULL. If it is not NULL and the text length
|
** The text value specified may be NULL. If it is not NULL and the text length
|
||||||
|
@ -46,33 +46,33 @@ PR_EXTERN(void) PR_SetError(PRErrorCode errorCode, PRInt32 oserr);
|
||||||
** The text will be copied into to thread structure and remain there
|
** The text will be copied into to thread structure and remain there
|
||||||
** until the next call to PR_SetError.
|
** until the next call to PR_SetError.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_SetErrorText(
|
NSPR_API(void) PR_SetErrorText(
|
||||||
PRIntn textLength, const char *text);
|
PRIntn textLength, const char *text);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return the current threads last set error code.
|
** Return the current threads last set error code.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRErrorCode) PR_GetError(void);
|
NSPR_API(PRErrorCode) PR_GetError(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return the current threads last set os error code. This is used for
|
** Return the current threads last set os error code. This is used for
|
||||||
** machine specific code that desires the underlying os error.
|
** machine specific code that desires the underlying os error.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_GetOSError(void);
|
NSPR_API(PRInt32) PR_GetOSError(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Get the length of the error text. If a zero is returned, then there
|
** Get the length of the error text. If a zero is returned, then there
|
||||||
** is no text. Otherwise, the value returned is sufficient to contain
|
** is no text. Otherwise, the value returned is sufficient to contain
|
||||||
** the error text currently available.
|
** the error text currently available.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_GetErrorTextLength(void);
|
NSPR_API(PRInt32) PR_GetErrorTextLength(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copy the current threads current error text. Then actual number of bytes
|
** Copy the current threads current error text. Then actual number of bytes
|
||||||
** copied is returned as the result. If the result is zero, the 'text' area
|
** copied is returned as the result. If the result is zero, the 'text' area
|
||||||
** is unaffected.
|
** is unaffected.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_GetErrorText(char *text);
|
NSPR_API(PRInt32) PR_GetErrorText(char *text);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -240,7 +240,7 @@ PRErrorCallbackNewTableFn(const struct PRErrorTable *table,
|
||||||
** valid for the duration of the process. Never returns NULL.
|
** valid for the duration of the process. Never returns NULL.
|
||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(const char *) PR_ErrorToString(PRErrorCode code,
|
NSPR_API(const char *) PR_ErrorToString(PRErrorCode code,
|
||||||
PRLanguageCode language);
|
PRLanguageCode language);
|
||||||
|
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ PR_EXTERN(const char *) PR_ErrorToString(PRErrorCode code,
|
||||||
** Does not work for error table 0, the system error codes.
|
** Does not work for error table 0, the system error codes.
|
||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(const char *) PR_ErrorToName(PRErrorCode code);
|
NSPR_API(const char *) PR_ErrorToName(PRErrorCode code);
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -268,7 +268,7 @@ PR_EXTERN(const char *) PR_ErrorToName(PRErrorCode code);
|
||||||
** with a null pointer.
|
** with a null pointer.
|
||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(const char * const *) PR_ErrorLanguages(void);
|
NSPR_API(const char * const *) PR_ErrorLanguages(void);
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -281,7 +281,7 @@ PR_EXTERN(const char * const *) PR_ErrorLanguages(void);
|
||||||
** NOT THREAD SAFE!
|
** NOT THREAD SAFE!
|
||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRErrorCode) PR_ErrorInstallTable(const struct PRErrorTable *table);
|
NSPR_API(PRErrorCode) PR_ErrorInstallTable(const struct PRErrorTable *table);
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -297,7 +297,7 @@ PR_EXTERN(PRErrorCode) PR_ErrorInstallTable(const struct PRErrorTable *table);
|
||||||
** NOT THREAD SAFE!
|
** NOT THREAD SAFE!
|
||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(void) PR_ErrorInstallCallback(const char * const * languages,
|
NSPR_API(void) PR_ErrorInstallCallback(const char * const * languages,
|
||||||
PRErrorCallbackLookupFn *lookup,
|
PRErrorCallbackLookupFn *lookup,
|
||||||
PRErrorCallbackNewTableFn *newtable,
|
PRErrorCallbackNewTableFn *newtable,
|
||||||
struct PRErrorCallbackPrivate *cb_private);
|
struct PRErrorCallbackPrivate *cb_private);
|
||||||
|
|
|
@ -77,7 +77,7 @@ typedef PRBool (*PRVersionCheck)(const char*);
|
||||||
** Note that NSPR has no cooperating dependencies.
|
** Note that NSPR has no cooperating dependencies.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRBool) PR_VersionCheck(const char *importedVersion);
|
NSPR_API(PRBool) PR_VersionCheck(const char *importedVersion);
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
@ -90,7 +90,7 @@ PR_EXTERN(PRBool) PR_VersionCheck(const char *importedVersion);
|
||||||
**
|
**
|
||||||
** The specificaiton of 'maxPTDs' is ignored.
|
** The specificaiton of 'maxPTDs' is ignored.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_Init(
|
NSPR_API(void) PR_Init(
|
||||||
PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs);
|
PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -113,13 +113,13 @@ PR_EXTERN(void) PR_Init(
|
||||||
|
|
||||||
typedef PRIntn (PR_CALLBACK *PRPrimordialFn)(PRIntn argc, char **argv);
|
typedef PRIntn (PR_CALLBACK *PRPrimordialFn)(PRIntn argc, char **argv);
|
||||||
|
|
||||||
PR_EXTERN(PRIntn) PR_Initialize(
|
NSPR_API(PRIntn) PR_Initialize(
|
||||||
PRPrimordialFn prmain, PRIntn argc, char **argv, PRUintn maxPTDs);
|
PRPrimordialFn prmain, PRIntn argc, char **argv, PRUintn maxPTDs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return PR_TRUE if PR_Init has already been called.
|
** Return PR_TRUE if PR_Init has already been called.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRBool) PR_Initialized(void);
|
NSPR_API(PRBool) PR_Initialized(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Perform a graceful shutdown of NSPR. PR_Cleanup() may be called by
|
* Perform a graceful shutdown of NSPR. PR_Cleanup() may be called by
|
||||||
|
@ -137,57 +137,57 @@ PR_EXTERN(PRBool) PR_Initialized(void);
|
||||||
* or PR_FAILURE if the calling thread of this function is not the
|
* or PR_FAILURE if the calling thread of this function is not the
|
||||||
* primordial thread.
|
* primordial thread.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_Cleanup(void);
|
NSPR_API(PRStatus) PR_Cleanup(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Disable Interrupts
|
** Disable Interrupts
|
||||||
** Disables timer signals used for pre-emptive scheduling.
|
** Disables timer signals used for pre-emptive scheduling.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_DisableClockInterrupts(void);
|
NSPR_API(void) PR_DisableClockInterrupts(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Enables Interrupts
|
** Enables Interrupts
|
||||||
** Enables timer signals used for pre-emptive scheduling.
|
** Enables timer signals used for pre-emptive scheduling.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_EnableClockInterrupts(void);
|
NSPR_API(void) PR_EnableClockInterrupts(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Block Interrupts
|
** Block Interrupts
|
||||||
** Blocks the timer signal used for pre-emptive scheduling
|
** Blocks the timer signal used for pre-emptive scheduling
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_BlockClockInterrupts(void);
|
NSPR_API(void) PR_BlockClockInterrupts(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Unblock Interrupts
|
** Unblock Interrupts
|
||||||
** Unblocks the timer signal used for pre-emptive scheduling
|
** Unblocks the timer signal used for pre-emptive scheduling
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_UnblockClockInterrupts(void);
|
NSPR_API(void) PR_UnblockClockInterrupts(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Create extra virtual processor threads. Generally used with MP systems.
|
** Create extra virtual processor threads. Generally used with MP systems.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_SetConcurrency(PRUintn numCPUs);
|
NSPR_API(void) PR_SetConcurrency(PRUintn numCPUs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Control the method and size of the file descriptor (PRFileDesc*)
|
** Control the method and size of the file descriptor (PRFileDesc*)
|
||||||
** cache used by the runtime. Setting 'high' to zero is for performance,
|
** cache used by the runtime. Setting 'high' to zero is for performance,
|
||||||
** any other value probably for debugging (see memo on FD caching).
|
** any other value probably for debugging (see memo on FD caching).
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_SetFDCacheSize(PRIntn low, PRIntn high);
|
NSPR_API(PRStatus) PR_SetFDCacheSize(PRIntn low, PRIntn high);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cause an immediate, nongraceful, forced termination of the process.
|
* Cause an immediate, nongraceful, forced termination of the process.
|
||||||
* It takes a PRIntn argument, which is the exit status code of the
|
* It takes a PRIntn argument, which is the exit status code of the
|
||||||
* process.
|
* process.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_ProcessExit(PRIntn status);
|
NSPR_API(void) PR_ProcessExit(PRIntn status);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Abort the process in a non-graceful manner. This will cause a core file,
|
** Abort the process in a non-graceful manner. This will cause a core file,
|
||||||
** call to the debugger or other moral equivalent as well as causing the
|
** call to the debugger or other moral equivalent as well as causing the
|
||||||
** entire process to stop.
|
** entire process to stop.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_Abort(void);
|
NSPR_API(void) PR_Abort(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
****************************************************************
|
****************************************************************
|
||||||
|
@ -205,7 +205,7 @@ typedef struct PRCallOnceType {
|
||||||
|
|
||||||
typedef PRStatus (PR_CALLBACK *PRCallOnceFN)(void);
|
typedef PRStatus (PR_CALLBACK *PRCallOnceFN)(void);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_CallOnce(
|
NSPR_API(PRStatus) PR_CallOnce(
|
||||||
PRCallOnceType *once,
|
PRCallOnceType *once,
|
||||||
PRCallOnceFN func
|
PRCallOnceFN func
|
||||||
);
|
);
|
||||||
|
|
|
@ -86,7 +86,7 @@ typedef PRUint32 PRIntervalTime;
|
||||||
** MEMORY: N/A
|
** MEMORY: N/A
|
||||||
** ALGORITHM: Platform dependent
|
** ALGORITHM: Platform dependent
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRIntervalTime) PR_IntervalNow(void);
|
NSPR_API(PRIntervalTime) PR_IntervalNow(void);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_TicksPerSecond
|
** FUNCTION: PR_TicksPerSecond
|
||||||
|
@ -104,7 +104,7 @@ PR_EXTERN(PRIntervalTime) PR_IntervalNow(void);
|
||||||
** MEMORY: N/A
|
** MEMORY: N/A
|
||||||
** ALGORITHM: N/A
|
** ALGORITHM: N/A
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRUint32) PR_TicksPerSecond(void);
|
NSPR_API(PRUint32) PR_TicksPerSecond(void);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_SecondsToInterval
|
** FUNCTION: PR_SecondsToInterval
|
||||||
|
@ -123,9 +123,9 @@ PR_EXTERN(PRUint32) PR_TicksPerSecond(void);
|
||||||
** MEMORY: N/A
|
** MEMORY: N/A
|
||||||
** ALGORITHM: N/A
|
** ALGORITHM: N/A
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRIntervalTime) PR_SecondsToInterval(PRUint32 seconds);
|
NSPR_API(PRIntervalTime) PR_SecondsToInterval(PRUint32 seconds);
|
||||||
PR_EXTERN(PRIntervalTime) PR_MillisecondsToInterval(PRUint32 milli);
|
NSPR_API(PRIntervalTime) PR_MillisecondsToInterval(PRUint32 milli);
|
||||||
PR_EXTERN(PRIntervalTime) PR_MicrosecondsToInterval(PRUint32 micro);
|
NSPR_API(PRIntervalTime) PR_MicrosecondsToInterval(PRUint32 micro);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_IntervalToSeconds
|
** FUNCTION: PR_IntervalToSeconds
|
||||||
|
@ -144,9 +144,9 @@ PR_EXTERN(PRIntervalTime) PR_MicrosecondsToInterval(PRUint32 micro);
|
||||||
** MEMORY: N/A
|
** MEMORY: N/A
|
||||||
** ALGORITHM: N/A
|
** ALGORITHM: N/A
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRUint32) PR_IntervalToSeconds(PRIntervalTime ticks);
|
NSPR_API(PRUint32) PR_IntervalToSeconds(PRIntervalTime ticks);
|
||||||
PR_EXTERN(PRUint32) PR_IntervalToMilliseconds(PRIntervalTime ticks);
|
NSPR_API(PRUint32) PR_IntervalToMilliseconds(PRIntervalTime ticks);
|
||||||
PR_EXTERN(PRUint32) PR_IntervalToMicroseconds(PRIntervalTime ticks);
|
NSPR_API(PRUint32) PR_IntervalToMicroseconds(PRIntervalTime ticks);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -291,7 +291,7 @@ typedef enum PRSeekWhence {
|
||||||
PR_SEEK_END = 2
|
PR_SEEK_END = 2
|
||||||
} PRSeekWhence;
|
} PRSeekWhence;
|
||||||
|
|
||||||
PR_EXTERN(PRDescType) PR_GetDescType(PRFileDesc *file);
|
NSPR_API(PRDescType) PR_GetDescType(PRFileDesc *file);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
|
@ -431,7 +431,7 @@ typedef enum PRSpecialFD
|
||||||
PR_StandardError /* standard error */
|
PR_StandardError /* standard error */
|
||||||
} PRSpecialFD;
|
} PRSpecialFD;
|
||||||
|
|
||||||
PR_EXTERN(PRFileDesc*) PR_GetSpecialFD(PRSpecialFD id);
|
NSPR_API(PRFileDesc*) PR_GetSpecialFD(PRSpecialFD id);
|
||||||
|
|
||||||
#define PR_STDIN PR_GetSpecialFD(PR_StandardInput)
|
#define PR_STDIN PR_GetSpecialFD(PR_StandardInput)
|
||||||
#define PR_STDOUT PR_GetSpecialFD(PR_StandardOutput)
|
#define PR_STDOUT PR_GetSpecialFD(PR_StandardOutput)
|
||||||
|
@ -470,10 +470,10 @@ PR_EXTERN(PRFileDesc*) PR_GetSpecialFD(PRSpecialFD id);
|
||||||
#define PR_TOP_IO_LAYER (PRDescIdentity)-2
|
#define PR_TOP_IO_LAYER (PRDescIdentity)-2
|
||||||
#define PR_NSPR_IO_LAYER (PRDescIdentity)0
|
#define PR_NSPR_IO_LAYER (PRDescIdentity)0
|
||||||
|
|
||||||
PR_EXTERN(PRDescIdentity) PR_GetUniqueIdentity(const char *layer_name);
|
NSPR_API(PRDescIdentity) PR_GetUniqueIdentity(const char *layer_name);
|
||||||
PR_EXTERN(const char*) PR_GetNameForIdentity(PRDescIdentity ident);
|
NSPR_API(const char*) PR_GetNameForIdentity(PRDescIdentity ident);
|
||||||
PR_EXTERN(PRDescIdentity) PR_GetLayersIdentity(PRFileDesc* fd);
|
NSPR_API(PRDescIdentity) PR_GetLayersIdentity(PRFileDesc* fd);
|
||||||
PR_EXTERN(PRFileDesc*) PR_GetIdentitiesLayer(PRFileDesc* fd_stack, PRDescIdentity id);
|
NSPR_API(PRFileDesc*) PR_GetIdentitiesLayer(PRFileDesc* fd_stack, PRDescIdentity id);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
@ -483,7 +483,7 @@ PR_EXTERN(PRFileDesc*) PR_GetIdentitiesLayer(PRFileDesc* fd_stack, PRDescIdentit
|
||||||
* layer's methods table. You may NOT modify the table directly.
|
* layer's methods table. You may NOT modify the table directly.
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(const PRIOMethods *) PR_GetDefaultIOMethods(void);
|
NSPR_API(const PRIOMethods *) PR_GetDefaultIOMethods(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
@ -494,7 +494,7 @@ PR_EXTERN(const PRIOMethods *) PR_GetDefaultIOMethods(void);
|
||||||
* provided. The runtime will not modify the table nor test its correctness.
|
* provided. The runtime will not modify the table nor test its correctness.
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRFileDesc*) PR_CreateIOLayerStub(
|
NSPR_API(PRFileDesc*) PR_CreateIOLayerStub(
|
||||||
PRDescIdentity ident, const PRIOMethods *methods);
|
PRDescIdentity ident, const PRIOMethods *methods);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -511,7 +511,7 @@ PR_EXTERN(PRFileDesc*) PR_CreateIOLayerStub(
|
||||||
* stack will not change.
|
* stack will not change.
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_PushIOLayer(
|
NSPR_API(PRStatus) PR_PushIOLayer(
|
||||||
PRFileDesc *fd_stack, PRDescIdentity id, PRFileDesc *layer);
|
PRFileDesc *fd_stack, PRDescIdentity id, PRFileDesc *layer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -528,7 +528,7 @@ PR_EXTERN(PRStatus) PR_PushIOLayer(
|
||||||
* that file descriptor will remain valid.
|
* that file descriptor will remain valid.
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRFileDesc*) PR_PopIOLayer(PRFileDesc *fd_stack, PRDescIdentity id);
|
NSPR_API(PRFileDesc*) PR_PopIOLayer(PRFileDesc *fd_stack, PRDescIdentity id);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
@ -574,7 +574,7 @@ PR_EXTERN(PRFileDesc*) PR_PopIOLayer(PRFileDesc *fd_stack, PRDescIdentity id);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRFileDesc*) PR_Open(const char *name, PRIntn flags, PRIntn mode);
|
NSPR_API(PRFileDesc*) PR_Open(const char *name, PRIntn flags, PRIntn mode);
|
||||||
/* Open flags */
|
/* Open flags */
|
||||||
#define PR_RDONLY 0x01
|
#define PR_RDONLY 0x01
|
||||||
#define PR_WRONLY 0x02
|
#define PR_WRONLY 0x02
|
||||||
|
@ -623,7 +623,7 @@ PR_EXTERN(PRFileDesc*) PR_Open(const char *name, PRIntn flags, PRIntn mode);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_Close(PRFileDesc *fd);
|
NSPR_API(PRStatus) PR_Close(PRFileDesc *fd);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
@ -658,7 +658,7 @@ PR_EXTERN(PRStatus) PR_Close(PRFileDesc *fd);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_Read(PRFileDesc *fd, void *buf, PRInt32 amount);
|
NSPR_API(PRInt32) PR_Read(PRFileDesc *fd, void *buf, PRInt32 amount);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
|
@ -682,7 +682,7 @@ PR_EXTERN(PRInt32) PR_Read(PRFileDesc *fd, void *buf, PRInt32 amount);
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_Write(PRFileDesc *fd,const void *buf,PRInt32 amount);
|
NSPR_API(PRInt32) PR_Write(PRFileDesc *fd,const void *buf,PRInt32 amount);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
|
@ -716,7 +716,7 @@ PR_EXTERN(PRInt32) PR_Write(PRFileDesc *fd,const void *buf,PRInt32 amount);
|
||||||
|
|
||||||
#define PR_MAX_IOVECTOR_SIZE 16 /* 'iov_size' must be <= */
|
#define PR_MAX_IOVECTOR_SIZE 16 /* 'iov_size' must be <= */
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_Writev(
|
NSPR_API(PRInt32) PR_Writev(
|
||||||
PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size,
|
PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size,
|
||||||
PRIntervalTime timeout);
|
PRIntervalTime timeout);
|
||||||
|
|
||||||
|
@ -737,7 +737,7 @@ PR_EXTERN(PRInt32) PR_Writev(
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_Delete(const char *name);
|
NSPR_API(PRStatus) PR_Delete(const char *name);
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
|
@ -780,8 +780,8 @@ struct PRFileInfo64 {
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_GetFileInfo(const char *fn, PRFileInfo *info);
|
NSPR_API(PRStatus) PR_GetFileInfo(const char *fn, PRFileInfo *info);
|
||||||
PR_EXTERN(PRStatus) PR_GetFileInfo64(const char *fn, PRFileInfo64 *info);
|
NSPR_API(PRStatus) PR_GetFileInfo64(const char *fn, PRFileInfo64 *info);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
@ -800,8 +800,8 @@ PR_EXTERN(PRStatus) PR_GetFileInfo64(const char *fn, PRFileInfo64 *info);
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_GetOpenFileInfo(PRFileDesc *fd, PRFileInfo *info);
|
NSPR_API(PRStatus) PR_GetOpenFileInfo(PRFileDesc *fd, PRFileInfo *info);
|
||||||
PR_EXTERN(PRStatus) PR_GetOpenFileInfo64(PRFileDesc *fd, PRFileInfo64 *info);
|
NSPR_API(PRStatus) PR_GetOpenFileInfo64(PRFileDesc *fd, PRFileInfo64 *info);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
|
@ -819,7 +819,7 @@ PR_EXTERN(PRStatus) PR_GetOpenFileInfo64(PRFileDesc *fd, PRFileInfo64 *info);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_Rename(const char *from, const char *to);
|
NSPR_API(PRStatus) PR_Rename(const char *from, const char *to);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -851,7 +851,7 @@ typedef enum PRAccessHow {
|
||||||
PR_ACCESS_READ_OK = 3
|
PR_ACCESS_READ_OK = 3
|
||||||
} PRAccessHow;
|
} PRAccessHow;
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_Access(const char *name, PRAccessHow how);
|
NSPR_API(PRStatus) PR_Access(const char *name, PRAccessHow how);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -886,8 +886,8 @@ PR_EXTERN(PRStatus) PR_Access(const char *name, PRAccessHow how);
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PROffset32) PR_Seek(PRFileDesc *fd, PROffset32 offset, PRSeekWhence whence);
|
NSPR_API(PROffset32) PR_Seek(PRFileDesc *fd, PROffset32 offset, PRSeekWhence whence);
|
||||||
PR_EXTERN(PROffset64) PR_Seek64(PRFileDesc *fd, PROffset64 offset, PRSeekWhence whence);
|
NSPR_API(PROffset64) PR_Seek64(PRFileDesc *fd, PROffset64 offset, PRSeekWhence whence);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
************************************************************************
|
************************************************************************
|
||||||
|
@ -909,8 +909,8 @@ PR_EXTERN(PROffset64) PR_Seek64(PRFileDesc *fd, PROffset64 offset, PRSeekWhence
|
||||||
************************************************************************
|
************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_Available(PRFileDesc *fd);
|
NSPR_API(PRInt32) PR_Available(PRFileDesc *fd);
|
||||||
PR_EXTERN(PRInt64) PR_Available64(PRFileDesc *fd);
|
NSPR_API(PRInt64) PR_Available64(PRFileDesc *fd);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
************************************************************************
|
************************************************************************
|
||||||
|
@ -929,7 +929,7 @@ PR_EXTERN(PRInt64) PR_Available64(PRFileDesc *fd);
|
||||||
************************************************************************
|
************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_Sync(PRFileDesc *fd);
|
NSPR_API(PRStatus) PR_Sync(PRFileDesc *fd);
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
|
@ -961,7 +961,7 @@ struct PRDirEntry {
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRDir*) PR_OpenDir(const char *name);
|
NSPR_API(PRDir*) PR_OpenDir(const char *name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -994,7 +994,7 @@ typedef enum PRDirFlags {
|
||||||
PR_SKIP_HIDDEN = 0x4
|
PR_SKIP_HIDDEN = 0x4
|
||||||
} PRDirFlags;
|
} PRDirFlags;
|
||||||
|
|
||||||
PR_EXTERN(PRDirEntry*) PR_ReadDir(PRDir *dir, PRDirFlags flags);
|
NSPR_API(PRDirEntry*) PR_ReadDir(PRDir *dir, PRDirFlags flags);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1013,7 +1013,7 @@ PR_EXTERN(PRDirEntry*) PR_ReadDir(PRDir *dir, PRDirFlags flags);
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_CloseDir(PRDir *dir);
|
NSPR_API(PRStatus) PR_CloseDir(PRDir *dir);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1035,7 +1035,7 @@ PR_EXTERN(PRStatus) PR_CloseDir(PRDir *dir);
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_MkDir(const char *name, PRIntn mode);
|
NSPR_API(PRStatus) PR_MkDir(const char *name, PRIntn mode);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1055,9 +1055,9 @@ PR_EXTERN(PRStatus) PR_MkDir(const char *name, PRIntn mode);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_RmDir(const char *name);
|
NSPR_API(PRStatus) PR_RmDir(const char *name);
|
||||||
|
|
||||||
PR_EXTERN(PRUintn) PR_NetAddrSize(const PRNetAddr* addr);
|
NSPR_API(PRUintn) PR_NetAddrSize(const PRNetAddr* addr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1076,7 +1076,7 @@ PR_EXTERN(PRUintn) PR_NetAddrSize(const PRNetAddr* addr);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRFileDesc*) PR_NewUDPSocket(void);
|
NSPR_API(PRFileDesc*) PR_NewUDPSocket(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1095,7 +1095,7 @@ PR_EXTERN(PRFileDesc*) PR_NewUDPSocket(void);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRFileDesc*) PR_NewTCPSocket(void);
|
NSPR_API(PRFileDesc*) PR_NewTCPSocket(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1115,7 +1115,7 @@ PR_EXTERN(PRFileDesc*) PR_NewTCPSocket(void);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRFileDesc*) PR_OpenUDPSocket(PRIntn af);
|
NSPR_API(PRFileDesc*) PR_OpenUDPSocket(PRIntn af);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1135,7 +1135,7 @@ PR_EXTERN(PRFileDesc*) PR_OpenUDPSocket(PRIntn af);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRFileDesc*) PR_OpenTCPSocket(PRIntn af);
|
NSPR_API(PRFileDesc*) PR_OpenTCPSocket(PRIntn af);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1159,7 +1159,7 @@ PR_EXTERN(PRFileDesc*) PR_OpenTCPSocket(PRIntn af);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_Connect(
|
NSPR_API(PRStatus) PR_Connect(
|
||||||
PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout);
|
PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1188,7 +1188,7 @@ PR_EXTERN(PRStatus) PR_Connect(
|
||||||
* error code.
|
* error code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_GetConnectStatus(const PRPollDesc *pd);
|
NSPR_API(PRStatus) PR_GetConnectStatus(const PRPollDesc *pd);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1212,7 +1212,7 @@ PR_EXTERN(PRStatus) PR_GetConnectStatus(const PRPollDesc *pd);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRFileDesc*) PR_Accept(
|
NSPR_API(PRFileDesc*) PR_Accept(
|
||||||
PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout);
|
PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1234,7 +1234,7 @@ PR_EXTERN(PRFileDesc*) PR_Accept(
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_Bind(PRFileDesc *fd, const PRNetAddr *addr);
|
NSPR_API(PRStatus) PR_Bind(PRFileDesc *fd, const PRNetAddr *addr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1256,7 +1256,7 @@ PR_EXTERN(PRStatus) PR_Bind(PRFileDesc *fd, const PRNetAddr *addr);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_Listen(PRFileDesc *fd, PRIntn backlog);
|
NSPR_API(PRStatus) PR_Listen(PRFileDesc *fd, PRIntn backlog);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1287,7 +1287,7 @@ typedef enum PRShutdownHow
|
||||||
PR_SHUTDOWN_BOTH = 2 /* disallow further receives and sends */
|
PR_SHUTDOWN_BOTH = 2 /* disallow further receives and sends */
|
||||||
} PRShutdownHow;
|
} PRShutdownHow;
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_Shutdown(PRFileDesc *fd, PRShutdownHow how);
|
NSPR_API(PRStatus) PR_Shutdown(PRFileDesc *fd, PRShutdownHow how);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1318,7 +1318,7 @@ PR_EXTERN(PRStatus) PR_Shutdown(PRFileDesc *fd, PRShutdownHow how);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_Recv(PRFileDesc *fd, void *buf, PRInt32 amount,
|
NSPR_API(PRInt32) PR_Recv(PRFileDesc *fd, void *buf, PRInt32 amount,
|
||||||
PRIntn flags, PRIntervalTime timeout);
|
PRIntn flags, PRIntervalTime timeout);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1349,7 +1349,7 @@ PR_EXTERN(PRInt32) PR_Recv(PRFileDesc *fd, void *buf, PRInt32 amount,
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_Send(PRFileDesc *fd, const void *buf, PRInt32 amount,
|
NSPR_API(PRInt32) PR_Send(PRFileDesc *fd, const void *buf, PRInt32 amount,
|
||||||
PRIntn flags, PRIntervalTime timeout);
|
PRIntn flags, PRIntervalTime timeout);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1384,7 +1384,7 @@ PR_EXTERN(PRInt32) PR_Send(PRFileDesc *fd, const void *buf, PRInt32 amount,
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_RecvFrom(
|
NSPR_API(PRInt32) PR_RecvFrom(
|
||||||
PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
|
PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
|
||||||
PRNetAddr *addr, PRIntervalTime timeout);
|
PRNetAddr *addr, PRIntervalTime timeout);
|
||||||
|
|
||||||
|
@ -1417,7 +1417,7 @@ PR_EXTERN(PRInt32) PR_RecvFrom(
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_SendTo(
|
NSPR_API(PRInt32) PR_SendTo(
|
||||||
PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
|
PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
|
||||||
const PRNetAddr *addr, PRIntervalTime timeout);
|
const PRNetAddr *addr, PRIntervalTime timeout);
|
||||||
|
|
||||||
|
@ -1457,7 +1457,7 @@ PR_EXTERN(PRInt32) PR_SendTo(
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_TransmitFile(
|
NSPR_API(PRInt32) PR_TransmitFile(
|
||||||
PRFileDesc *networkSocket, PRFileDesc *sourceFile,
|
PRFileDesc *networkSocket, PRFileDesc *sourceFile,
|
||||||
const void *headers, PRInt32 hlen, PRTransmitFileFlags flags,
|
const void *headers, PRInt32 hlen, PRTransmitFileFlags flags,
|
||||||
PRIntervalTime timeout);
|
PRIntervalTime timeout);
|
||||||
|
@ -1509,7 +1509,7 @@ struct PRSendFileData {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_SendFile(
|
NSPR_API(PRInt32) PR_SendFile(
|
||||||
PRFileDesc *networkSocket, PRSendFileData *sendData,
|
PRFileDesc *networkSocket, PRSendFileData *sendData,
|
||||||
PRTransmitFileFlags flags, PRIntervalTime timeout);
|
PRTransmitFileFlags flags, PRIntervalTime timeout);
|
||||||
|
|
||||||
|
@ -1553,7 +1553,7 @@ PR_EXTERN(PRInt32) PR_SendFile(
|
||||||
** for the failure is obtained by calling PR_GetError().
|
** for the failure is obtained by calling PR_GetError().
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
**/
|
**/
|
||||||
PR_EXTERN(PRInt32) PR_AcceptRead(
|
NSPR_API(PRInt32) PR_AcceptRead(
|
||||||
PRFileDesc *listenSock, PRFileDesc **acceptedSock,
|
PRFileDesc *listenSock, PRFileDesc **acceptedSock,
|
||||||
PRNetAddr **peerAddr, void *buf, PRInt32 amount, PRIntervalTime timeout);
|
PRNetAddr **peerAddr, void *buf, PRInt32 amount, PRIntervalTime timeout);
|
||||||
|
|
||||||
|
@ -1577,7 +1577,7 @@ PR_EXTERN(PRInt32) PR_AcceptRead(
|
||||||
** XXX can we implement this on windoze and mac?
|
** XXX can we implement this on windoze and mac?
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
**/
|
**/
|
||||||
PR_EXTERN(PRStatus) PR_NewTCPSocketPair(PRFileDesc *fds[2]);
|
NSPR_API(PRStatus) PR_NewTCPSocketPair(PRFileDesc *fds[2]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1597,7 +1597,7 @@ PR_EXTERN(PRStatus) PR_NewTCPSocketPair(PRFileDesc *fds[2]);
|
||||||
** be obtained by calling PR_GetError().
|
** be obtained by calling PR_GetError().
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
**/
|
**/
|
||||||
PR_EXTERN(PRStatus) PR_GetSockName(PRFileDesc *fd, PRNetAddr *addr);
|
NSPR_API(PRStatus) PR_GetSockName(PRFileDesc *fd, PRNetAddr *addr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -1619,12 +1619,12 @@ PR_EXTERN(PRStatus) PR_GetSockName(PRFileDesc *fd, PRNetAddr *addr);
|
||||||
** be obtained by calling PR_GetError().
|
** be obtained by calling PR_GetError().
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
**/
|
**/
|
||||||
PR_EXTERN(PRStatus) PR_GetPeerName(PRFileDesc *fd, PRNetAddr *addr);
|
NSPR_API(PRStatus) PR_GetPeerName(PRFileDesc *fd, PRNetAddr *addr);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_GetSocketOption(
|
NSPR_API(PRStatus) PR_GetSocketOption(
|
||||||
PRFileDesc *fd, PRSocketOptionData *data);
|
PRFileDesc *fd, PRSocketOptionData *data);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_SetSocketOption(
|
NSPR_API(PRStatus) PR_SetSocketOption(
|
||||||
PRFileDesc *fd, const PRSocketOptionData *data);
|
PRFileDesc *fd, const PRSocketOptionData *data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1654,7 +1654,7 @@ PR_EXTERN(PRStatus) PR_SetSocketOption(
|
||||||
* be obtained by calling PR_GetError().
|
* be obtained by calling PR_GetError().
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_SetFDInheritable(
|
NSPR_API(PRStatus) PR_SetFDInheritable(
|
||||||
PRFileDesc *fd,
|
PRFileDesc *fd,
|
||||||
PRBool inheritable);
|
PRBool inheritable);
|
||||||
|
|
||||||
|
@ -1674,7 +1674,7 @@ PR_EXTERN(PRStatus) PR_SetFDInheritable(
|
||||||
* by calling PR_GetError().
|
* by calling PR_GetError().
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRFileDesc *) PR_GetInheritedFD(const char *name);
|
NSPR_API(PRFileDesc *) PR_GetInheritedFD(const char *name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*********************************************************************
|
*********************************************************************
|
||||||
|
@ -1695,19 +1695,19 @@ typedef enum PRFileMapProtect {
|
||||||
PR_PROT_WRITECOPY /* readable, and write is private (copy-on-write) */
|
PR_PROT_WRITECOPY /* readable, and write is private (copy-on-write) */
|
||||||
} PRFileMapProtect;
|
} PRFileMapProtect;
|
||||||
|
|
||||||
PR_EXTERN(PRFileMap *) PR_CreateFileMap(
|
NSPR_API(PRFileMap *) PR_CreateFileMap(
|
||||||
PRFileDesc *fd,
|
PRFileDesc *fd,
|
||||||
PRInt64 size,
|
PRInt64 size,
|
||||||
PRFileMapProtect prot);
|
PRFileMapProtect prot);
|
||||||
|
|
||||||
PR_EXTERN(void *) PR_MemMap(
|
NSPR_API(void *) PR_MemMap(
|
||||||
PRFileMap *fmap,
|
PRFileMap *fmap,
|
||||||
PROffset64 offset, /* must be aligned and sized to whole pages */
|
PROffset64 offset, /* must be aligned and sized to whole pages */
|
||||||
PRUint32 len);
|
PRUint32 len);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_MemUnmap(void *addr, PRUint32 len);
|
NSPR_API(PRStatus) PR_MemUnmap(void *addr, PRUint32 len);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_CloseFileMap(PRFileMap *fmap);
|
NSPR_API(PRStatus) PR_CloseFileMap(PRFileMap *fmap);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
******************************************************************
|
******************************************************************
|
||||||
|
@ -1722,7 +1722,7 @@ PR_EXTERN(PRStatus) PR_CloseFileMap(PRFileMap *fmap);
|
||||||
* read and write ends of the pipe.
|
* read and write ends of the pipe.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_CreatePipe(
|
NSPR_API(PRStatus) PR_CreatePipe(
|
||||||
PRFileDesc **readPipe,
|
PRFileDesc **readPipe,
|
||||||
PRFileDesc **writePipe
|
PRFileDesc **writePipe
|
||||||
);
|
);
|
||||||
|
@ -1798,7 +1798,7 @@ struct PRPollDesc {
|
||||||
** XXX can we implement this on windoze and mac?
|
** XXX can we implement this on windoze and mac?
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_Poll(
|
NSPR_API(PRInt32) PR_Poll(
|
||||||
PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout);
|
PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1842,13 +1842,13 @@ PR_EXTERN(PRInt32) PR_Poll(
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRFileDesc *) PR_NewPollableEvent(void);
|
NSPR_API(PRFileDesc *) PR_NewPollableEvent(void);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_DestroyPollableEvent(PRFileDesc *event);
|
NSPR_API(PRStatus) PR_DestroyPollableEvent(PRFileDesc *event);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_SetPollableEvent(PRFileDesc *event);
|
NSPR_API(PRStatus) PR_SetPollableEvent(PRFileDesc *event);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_WaitForPollableEvent(PRFileDesc *event);
|
NSPR_API(PRStatus) PR_WaitForPollableEvent(PRFileDesc *event);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ typedef struct PRSem PRSem;
|
||||||
#define PR_SEM_CREATE 0x1 /* create if not exist */
|
#define PR_SEM_CREATE 0x1 /* create if not exist */
|
||||||
#define PR_SEM_EXCL 0x2 /* fail if already exists */
|
#define PR_SEM_EXCL 0x2 /* fail if already exists */
|
||||||
|
|
||||||
PR_EXTERN(PRSem *) PR_OpenSemaphore(
|
NSPR_API(PRSem *) PR_OpenSemaphore(
|
||||||
const char *name, PRIntn flags, PRIntn mode, PRUintn value);
|
const char *name, PRIntn flags, PRIntn mode, PRUintn value);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -82,7 +82,7 @@ PR_EXTERN(PRSem *) PR_OpenSemaphore(
|
||||||
* The "test and decrement" operation is performed atomically.
|
* The "test and decrement" operation is performed atomically.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_WaitSemaphore(PRSem *sem);
|
NSPR_API(PRStatus) PR_WaitSemaphore(PRSem *sem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PR_PostSemaphore --
|
* PR_PostSemaphore --
|
||||||
|
@ -90,7 +90,7 @@ PR_EXTERN(PRStatus) PR_WaitSemaphore(PRSem *sem);
|
||||||
* Increment the value of the named semaphore by 1.
|
* Increment the value of the named semaphore by 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_PostSemaphore(PRSem *sem);
|
NSPR_API(PRStatus) PR_PostSemaphore(PRSem *sem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PR_CloseSemaphore --
|
* PR_CloseSemaphore --
|
||||||
|
@ -98,7 +98,7 @@ PR_EXTERN(PRStatus) PR_PostSemaphore(PRSem *sem);
|
||||||
* Close a named semaphore handle.
|
* Close a named semaphore handle.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_CloseSemaphore(PRSem *sem);
|
NSPR_API(PRStatus) PR_CloseSemaphore(PRSem *sem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PR_DeleteSemaphore --
|
* PR_DeleteSemaphore --
|
||||||
|
@ -106,7 +106,7 @@ PR_EXTERN(PRStatus) PR_CloseSemaphore(PRSem *sem);
|
||||||
* Remove a named semaphore from the system.
|
* Remove a named semaphore from the system.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_DeleteSemaphore(const char *name);
|
NSPR_API(PRStatus) PR_DeleteSemaphore(const char *name);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -34,26 +34,26 @@ PR_BEGIN_EXTERN_C
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
/* Return the method tables for files, tcp sockets and udp sockets */
|
/* Return the method tables for files, tcp sockets and udp sockets */
|
||||||
PR_EXTERN(const PRIOMethods*) PR_GetFileMethods(void);
|
NSPR_API(const PRIOMethods*) PR_GetFileMethods(void);
|
||||||
PR_EXTERN(const PRIOMethods*) PR_GetTCPMethods(void);
|
NSPR_API(const PRIOMethods*) PR_GetTCPMethods(void);
|
||||||
PR_EXTERN(const PRIOMethods*) PR_GetUDPMethods(void);
|
NSPR_API(const PRIOMethods*) PR_GetUDPMethods(void);
|
||||||
PR_EXTERN(const PRIOMethods*) PR_GetPipeMethods(void);
|
NSPR_API(const PRIOMethods*) PR_GetPipeMethods(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Convert a NSPR Socket Handle to a Native Socket handle.
|
** Convert a NSPR Socket Handle to a Native Socket handle.
|
||||||
** This function will be obsoleted with the next release; avoid using it.
|
** This function will be obsoleted with the next release; avoid using it.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_FileDesc2NativeHandle(PRFileDesc *);
|
NSPR_API(PRInt32) PR_FileDesc2NativeHandle(PRFileDesc *);
|
||||||
PR_EXTERN(void) PR_ChangeFileDescNativeHandle(PRFileDesc *, PRInt32);
|
NSPR_API(void) PR_ChangeFileDescNativeHandle(PRFileDesc *, PRInt32);
|
||||||
PR_EXTERN(PRFileDesc*) PR_AllocFileDesc(PRInt32 osfd,
|
NSPR_API(PRFileDesc*) PR_AllocFileDesc(PRInt32 osfd,
|
||||||
const PRIOMethods *methods);
|
const PRIOMethods *methods);
|
||||||
PR_EXTERN(void) PR_FreeFileDesc(PRFileDesc *fd);
|
NSPR_API(void) PR_FreeFileDesc(PRFileDesc *fd);
|
||||||
/*
|
/*
|
||||||
** Import an existing OS file to NSPR.
|
** Import an existing OS file to NSPR.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRFileDesc*) PR_ImportFile(PRInt32 osfd);
|
NSPR_API(PRFileDesc*) PR_ImportFile(PRInt32 osfd);
|
||||||
PR_EXTERN(PRFileDesc*) PR_ImportTCPSocket(PRInt32 osfd);
|
NSPR_API(PRFileDesc*) PR_ImportTCPSocket(PRInt32 osfd);
|
||||||
PR_EXTERN(PRFileDesc*) PR_ImportUDPSocket(PRInt32 osfd);
|
NSPR_API(PRFileDesc*) PR_ImportUDPSocket(PRInt32 osfd);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -74,7 +74,7 @@ PR_EXTERN(PRFileDesc*) PR_ImportUDPSocket(PRInt32 osfd);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRFileDesc*) PR_CreateSocketPollFd(PRInt32 osfd);
|
NSPR_API(PRFileDesc*) PR_CreateSocketPollFd(PRInt32 osfd);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
|
@ -92,7 +92,7 @@ PR_EXTERN(PRFileDesc*) PR_CreateSocketPollFd(PRInt32 osfd);
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_DestroySocketPollFd(PRFileDesc *fd);
|
NSPR_API(PRStatus) PR_DestroySocketPollFd(PRFileDesc *fd);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -116,7 +116,7 @@ PR_EXTERN(PRStatus) PR_DestroySocketPollFd(PRFileDesc *fd);
|
||||||
/*
|
/*
|
||||||
** Create a new Socket; this function is obsolete.
|
** Create a new Socket; this function is obsolete.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto);
|
NSPR_API(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto);
|
||||||
|
|
||||||
/* FUNCTION: PR_LockFile
|
/* FUNCTION: PR_LockFile
|
||||||
** DESCRIPTION:
|
** DESCRIPTION:
|
||||||
|
@ -125,7 +125,7 @@ PR_EXTERN(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto);
|
||||||
** PR_SUCCESS when the lock is held
|
** PR_SUCCESS when the lock is held
|
||||||
** PR_FAILURE otherwise
|
** PR_FAILURE otherwise
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_LockFile(PRFileDesc *fd);
|
NSPR_API(PRStatus) PR_LockFile(PRFileDesc *fd);
|
||||||
|
|
||||||
/* FUNCTION: PR_TLockFile
|
/* FUNCTION: PR_TLockFile
|
||||||
** DESCRIPTION:
|
** DESCRIPTION:
|
||||||
|
@ -135,7 +135,7 @@ PR_EXTERN(PRStatus) PR_LockFile(PRFileDesc *fd);
|
||||||
** PR_SUCCESS when the lock is held
|
** PR_SUCCESS when the lock is held
|
||||||
** PR_FAILURE otherwise
|
** PR_FAILURE otherwise
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_TLockFile(PRFileDesc *fd);
|
NSPR_API(PRStatus) PR_TLockFile(PRFileDesc *fd);
|
||||||
|
|
||||||
/* FUNCTION: PR_UnlockFile
|
/* FUNCTION: PR_UnlockFile
|
||||||
** DESCRIPTION:
|
** DESCRIPTION:
|
||||||
|
@ -145,7 +145,7 @@ PR_EXTERN(PRStatus) PR_TLockFile(PRFileDesc *fd);
|
||||||
** PR_SUCCESS when the lock is released
|
** PR_SUCCESS when the lock is released
|
||||||
** PR_FAILURE otherwise
|
** PR_FAILURE otherwise
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_UnlockFile(PRFileDesc *fd);
|
NSPR_API(PRStatus) PR_UnlockFile(PRFileDesc *fd);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
/* FUNCTION: PR_NTFast_AcceptRead
|
/* FUNCTION: PR_NTFast_AcceptRead
|
||||||
|
@ -156,7 +156,7 @@ PR_EXTERN(PRStatus) PR_UnlockFile(PRFileDesc *fd);
|
||||||
** the acceptcontext. The generic version of PR_AcceptRead always
|
** the acceptcontext. The generic version of PR_AcceptRead always
|
||||||
** updates the accept context. This version does not.
|
** updates the accept context. This version does not.
|
||||||
**/
|
**/
|
||||||
PR_EXTERN(PRInt32) PR_NTFast_AcceptRead(PRFileDesc *sd, PRFileDesc **nd,
|
NSPR_API(PRInt32) PR_NTFast_AcceptRead(PRFileDesc *sd, PRFileDesc **nd,
|
||||||
PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime t);
|
PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime t);
|
||||||
|
|
||||||
typedef void (*_PR_AcceptTimeoutCallback)(void *);
|
typedef void (*_PR_AcceptTimeoutCallback)(void *);
|
||||||
|
@ -175,7 +175,7 @@ typedef void (*_PR_AcceptTimeoutCallback)(void *);
|
||||||
** continue the accept. If the timeout occurs on the read, it will
|
** continue the accept. If the timeout occurs on the read, it will
|
||||||
** close the connection and return error.
|
** close the connection and return error.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_NTFast_AcceptRead_WithTimeoutCallback(
|
NSPR_API(PRInt32) PR_NTFast_AcceptRead_WithTimeoutCallback(
|
||||||
PRFileDesc *sd,
|
PRFileDesc *sd,
|
||||||
PRFileDesc **nd,
|
PRFileDesc **nd,
|
||||||
PRNetAddr **raddr,
|
PRNetAddr **raddr,
|
||||||
|
@ -193,7 +193,7 @@ PR_EXTERN(PRInt32) PR_NTFast_AcceptRead_WithTimeoutCallback(
|
||||||
** the acceptcontext. The generic version of PR_Accept always
|
** the acceptcontext. The generic version of PR_Accept always
|
||||||
** updates the accept context. This version does not.
|
** updates the accept context. This version does not.
|
||||||
**/
|
**/
|
||||||
PR_EXTERN(PRFileDesc*) PR_NTFast_Accept(PRFileDesc *fd, PRNetAddr *addr,
|
NSPR_API(PRFileDesc*) PR_NTFast_Accept(PRFileDesc *fd, PRNetAddr *addr,
|
||||||
PRIntervalTime timeout);
|
PRIntervalTime timeout);
|
||||||
|
|
||||||
/* FUNCTION: PR_NTFast_Update
|
/* FUNCTION: PR_NTFast_Update
|
||||||
|
@ -204,7 +204,7 @@ PR_EXTERN(PRFileDesc*) PR_NTFast_Accept(PRFileDesc *fd, PRNetAddr *addr,
|
||||||
** Without calling this, the only operations supported on the socket
|
** Without calling this, the only operations supported on the socket
|
||||||
** Are PR_Read, PR_Write, PR_Transmitfile, and PR_Close.
|
** Are PR_Read, PR_Write, PR_Transmitfile, and PR_Close.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_NTFast_UpdateAcceptContext(PRFileDesc *acceptSock,
|
NSPR_API(void) PR_NTFast_UpdateAcceptContext(PRFileDesc *acceptSock,
|
||||||
PRFileDesc *listenSock);
|
PRFileDesc *listenSock);
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,13 +218,13 @@ PR_EXTERN(void) PR_NTFast_UpdateAcceptContext(PRFileDesc *acceptSock,
|
||||||
** (LIKE ALL FUNCTIONS IN THE PRIVATE AREA). DO NOT USE THIS FUNCTION AT
|
** (LIKE ALL FUNCTIONS IN THE PRIVATE AREA). DO NOT USE THIS FUNCTION AT
|
||||||
** ALL WITHOUT CONTACTING mbelshe@netscape.com.
|
** ALL WITHOUT CONTACTING mbelshe@netscape.com.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_NT_UseNonblock();
|
NSPR_API(void) PR_NT_UseNonblock();
|
||||||
|
|
||||||
/* FUNCTION: PR_NT_CancelIo
|
/* FUNCTION: PR_NT_CancelIo
|
||||||
** DESCRIPTION:
|
** DESCRIPTION:
|
||||||
** Cancel IO operations on fd.
|
** Cancel IO operations on fd.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_NT_CancelIo(PRFileDesc *fd);
|
NSPR_API(PRStatus) PR_NT_CancelIo(PRFileDesc *fd);
|
||||||
|
|
||||||
|
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
|
|
|
@ -45,7 +45,7 @@ PR_BEGIN_EXTERN_C
|
||||||
** This call is not normally needed unless you create your own native
|
** This call is not normally needed unless you create your own native
|
||||||
** thread. PR_Init does this automatically for the primordial thread.
|
** thread. PR_Init does this automatically for the primordial thread.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRThread*) PR_AttachThread(PRThreadType type,
|
NSPR_API(PRThread*) PR_AttachThread(PRThreadType type,
|
||||||
PRThreadPriority priority,
|
PRThreadPriority priority,
|
||||||
PRThreadStack *stack);
|
PRThreadStack *stack);
|
||||||
|
|
||||||
|
@ -60,13 +60,13 @@ PR_EXTERN(PRThread*) PR_AttachThread(PRThreadType type,
|
||||||
**
|
**
|
||||||
** This call returns after the nspr thread object is destroyed.
|
** This call returns after the nspr thread object is destroyed.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_DetachThread(void);
|
NSPR_API(void) PR_DetachThread(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Get the id of the named thread. Each thread is assigned a unique id
|
** Get the id of the named thread. Each thread is assigned a unique id
|
||||||
** when it is created or attached.
|
** when it is created or attached.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRUint32) PR_GetThreadID(PRThread *thread);
|
NSPR_API(PRUint32) PR_GetThreadID(PRThread *thread);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Set the procedure that is called when a thread is dumped. The procedure
|
** Set the procedure that is called when a thread is dumped. The procedure
|
||||||
|
@ -74,7 +74,7 @@ PR_EXTERN(PRUint32) PR_GetThreadID(PRThread *thread);
|
||||||
** to NULL effectively removes it.
|
** to NULL effectively removes it.
|
||||||
*/
|
*/
|
||||||
typedef void (*PRThreadDumpProc)(PRFileDesc *fd, PRThread *t, void *arg);
|
typedef void (*PRThreadDumpProc)(PRFileDesc *fd, PRThread *t, void *arg);
|
||||||
PR_EXTERN(void) PR_SetThreadDumpProc(
|
NSPR_API(void) PR_SetThreadDumpProc(
|
||||||
PRThread* thread, PRThreadDumpProc dump, void *arg);
|
PRThread* thread, PRThreadDumpProc dump, void *arg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -85,30 +85,30 @@ PR_EXTERN(void) PR_SetThreadDumpProc(
|
||||||
**
|
**
|
||||||
** Returns 0 on success, -1 on failure.
|
** Returns 0 on success, -1 on failure.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_GetThreadAffinityMask(PRThread *thread, PRUint32 *mask);
|
NSPR_API(PRInt32) PR_GetThreadAffinityMask(PRThread *thread, PRUint32 *mask);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Set this thread's affinity mask.
|
** Set this thread's affinity mask.
|
||||||
**
|
**
|
||||||
** Returns 0 on success, -1 on failure.
|
** Returns 0 on success, -1 on failure.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_SetThreadAffinityMask(PRThread *thread, PRUint32 mask );
|
NSPR_API(PRInt32) PR_SetThreadAffinityMask(PRThread *thread, PRUint32 mask );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Set the default CPU Affinity mask.
|
** Set the default CPU Affinity mask.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_SetCPUAffinityMask(PRUint32 mask);
|
NSPR_API(PRInt32) PR_SetCPUAffinityMask(PRUint32 mask);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Show status of all threads to standard error output.
|
** Show status of all threads to standard error output.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_ShowStatus(void);
|
NSPR_API(void) PR_ShowStatus(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Set thread recycle mode to on (1) or off (0)
|
** Set thread recycle mode to on (1) or off (0)
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_SetThreadRecycleMode(PRUint32 flag);
|
NSPR_API(void) PR_SetThreadRecycleMode(PRUint32 flag);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
|
@ -126,7 +126,7 @@ PR_EXTERN(void) PR_SetThreadRecycleMode(PRUint32 flag);
|
||||||
** Same as PR_CreateThread except that the thread is marked as garbage
|
** Same as PR_CreateThread except that the thread is marked as garbage
|
||||||
** collectible.
|
** collectible.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRThread*) PR_CreateThreadGCAble(PRThreadType type,
|
NSPR_API(PRThread*) PR_CreateThreadGCAble(PRThreadType type,
|
||||||
void (*start)(void *arg),
|
void (*start)(void *arg),
|
||||||
void *arg,
|
void *arg,
|
||||||
PRThreadPriority priority,
|
PRThreadPriority priority,
|
||||||
|
@ -138,37 +138,37 @@ PR_EXTERN(PRThread*) PR_CreateThreadGCAble(PRThreadType type,
|
||||||
** Same as PR_AttachThread except that the thread being attached is marked as
|
** Same as PR_AttachThread except that the thread being attached is marked as
|
||||||
** garbage collectible.
|
** garbage collectible.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRThread*) PR_AttachThreadGCAble(PRThreadType type,
|
NSPR_API(PRThread*) PR_AttachThreadGCAble(PRThreadType type,
|
||||||
PRThreadPriority priority,
|
PRThreadPriority priority,
|
||||||
PRThreadStack *stack);
|
PRThreadStack *stack);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Mark the thread as garbage collectible.
|
** Mark the thread as garbage collectible.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_SetThreadGCAble(void);
|
NSPR_API(void) PR_SetThreadGCAble(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Unmark the thread as garbage collectible.
|
** Unmark the thread as garbage collectible.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_ClearThreadGCAble(void);
|
NSPR_API(void) PR_ClearThreadGCAble(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This routine prevents all other GC able threads from running. This call is needed by
|
** This routine prevents all other GC able threads from running. This call is needed by
|
||||||
** the garbage collector.
|
** the garbage collector.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_SuspendAll(void);
|
NSPR_API(void) PR_SuspendAll(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This routine unblocks all other GC able threads that were suspended from running by
|
** This routine unblocks all other GC able threads that were suspended from running by
|
||||||
** PR_SuspendAll(). This call is needed by the garbage collector.
|
** PR_SuspendAll(). This call is needed by the garbage collector.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_ResumeAll(void);
|
NSPR_API(void) PR_ResumeAll(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return the thread stack pointer of the given thread.
|
** Return the thread stack pointer of the given thread.
|
||||||
** Needed by the garbage collector.
|
** Needed by the garbage collector.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void *) PR_GetSP(PRThread *thread);
|
NSPR_API(void *) PR_GetSP(PRThread *thread);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Save the registers that the GC would find interesting into the thread
|
** Save the registers that the GC would find interesting into the thread
|
||||||
|
@ -183,7 +183,7 @@ PR_EXTERN(void *) PR_GetSP(PRThread *thread);
|
||||||
**
|
**
|
||||||
** This function simply calls the internal function _MD_HomeGCRegisters().
|
** This function simply calls the internal function _MD_HomeGCRegisters().
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRWord *) PR_GetGCRegisters(PRThread *t, int isCurrent, int *np);
|
NSPR_API(PRWord *) PR_GetGCRegisters(PRThread *t, int isCurrent, int *np);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** (Get|Set)ExecutionEnvironent
|
** (Get|Set)ExecutionEnvironent
|
||||||
|
@ -193,8 +193,8 @@ PR_EXTERN(PRWord *) PR_GetGCRegisters(PRThread *t, int isCurrent, int *np);
|
||||||
**
|
**
|
||||||
** There's no locking required around these calls.
|
** There's no locking required around these calls.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void*) GetExecutionEnvironment(PRThread *thread);
|
NSPR_API(void*) GetExecutionEnvironment(PRThread *thread);
|
||||||
PR_EXTERN(void) SetExecutionEnvironment(PRThread* thread, void *environment);
|
NSPR_API(void) SetExecutionEnvironment(PRThread* thread, void *environment);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Enumeration function that applies "func(thread,i,arg)" to each active
|
** Enumeration function that applies "func(thread,i,arg)" to each active
|
||||||
|
@ -204,7 +204,7 @@ PR_EXTERN(void) SetExecutionEnvironment(PRThread* thread, void *environment);
|
||||||
** Needed by the garbage collector.
|
** Needed by the garbage collector.
|
||||||
*/
|
*/
|
||||||
typedef PRStatus (PR_CALLBACK *PREnumerator)(PRThread *t, int i, void *arg);
|
typedef PRStatus (PR_CALLBACK *PREnumerator)(PRThread *t, int i, void *arg);
|
||||||
PR_EXTERN(PRStatus) PR_EnumerateThreads(PREnumerator func, void *arg);
|
NSPR_API(PRStatus) PR_EnumerateThreads(PREnumerator func, void *arg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Signature of a thread stack scanning function. It is applied to every
|
** Signature of a thread stack scanning function. It is applied to every
|
||||||
|
@ -221,14 +221,14 @@ typedef PRStatus
|
||||||
** data. If scanFun returns a status value other than PR_SUCCESS the scan
|
** data. If scanFun returns a status value other than PR_SUCCESS the scan
|
||||||
** is aborted, and the status value is returned.
|
** is aborted, and the status value is returned.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus)
|
NSPR_API(PRStatus)
|
||||||
PR_ThreadScanStackPointers(PRThread* t,
|
PR_ThreadScanStackPointers(PRThread* t,
|
||||||
PRScanStackFun scanFun, void* scanClosure);
|
PRScanStackFun scanFun, void* scanClosure);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Calls PR_ThreadScanStackPointers for every thread.
|
** Calls PR_ThreadScanStackPointers for every thread.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus)
|
NSPR_API(PRStatus)
|
||||||
PR_ScanStackPointers(PRScanStackFun scanFun, void* scanClosure);
|
PR_ScanStackPointers(PRScanStackFun scanFun, void* scanClosure);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -236,7 +236,7 @@ PR_ScanStackPointers(PRScanStackFun scanFun, void* scanClosure);
|
||||||
** on a thread in bytes, sufficient for making decisions about whether
|
** on a thread in bytes, sufficient for making decisions about whether
|
||||||
** to continue recursing or not.
|
** to continue recursing or not.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRUword)
|
NSPR_API(PRUword)
|
||||||
PR_GetStackSpaceLeft(PRThread* t);
|
PR_GetStackSpaceLeft(PRThread* t);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
|
@ -246,7 +246,7 @@ PR_GetStackSpaceLeft(PRThread* t);
|
||||||
/*
|
/*
|
||||||
** Get a pointer to the primordial CPU.
|
** Get a pointer to the primordial CPU.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(struct _PRCPU *) _PR_GetPrimordialCPU(void);
|
NSPR_API(struct _PRCPU *) _PR_GetPrimordialCPU(void);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
** THREAD SYNCHRONIZATION PRIVATE FUNCTIONS
|
** THREAD SYNCHRONIZATION PRIVATE FUNCTIONS
|
||||||
|
@ -259,41 +259,41 @@ PR_EXTERN(struct _PRCPU *) _PR_GetPrimordialCPU(void);
|
||||||
** This may fail if memory is tight or if some operating system resource
|
** This may fail if memory is tight or if some operating system resource
|
||||||
** is low.
|
** is low.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRMonitor*) PR_NewNamedMonitor(const char* name);
|
NSPR_API(PRMonitor*) PR_NewNamedMonitor(const char* name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Test and then lock the lock if it's not already locked by some other
|
** Test and then lock the lock if it's not already locked by some other
|
||||||
** thread. Return PR_FALSE if some other thread owned the lock at the
|
** thread. Return PR_FALSE if some other thread owned the lock at the
|
||||||
** time of the call.
|
** time of the call.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRBool) PR_TestAndLock(PRLock *lock);
|
NSPR_API(PRBool) PR_TestAndLock(PRLock *lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Test and then enter the mutex associated with the monitor if it's not
|
** Test and then enter the mutex associated with the monitor if it's not
|
||||||
** already entered by some other thread. Return PR_FALSE if some other
|
** already entered by some other thread. Return PR_FALSE if some other
|
||||||
** thread owned the mutex at the time of the call.
|
** thread owned the mutex at the time of the call.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRBool) PR_TestAndEnterMonitor(PRMonitor *mon);
|
NSPR_API(PRBool) PR_TestAndEnterMonitor(PRMonitor *mon);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return the number of times that the current thread has entered the
|
** Return the number of times that the current thread has entered the
|
||||||
** mutex. Returns zero if the current thread has not entered the mutex.
|
** mutex. Returns zero if the current thread has not entered the mutex.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRIntn) PR_GetMonitorEntryCount(PRMonitor *mon);
|
NSPR_API(PRIntn) PR_GetMonitorEntryCount(PRMonitor *mon);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Just like PR_CEnterMonitor except that if the monitor is owned by
|
** Just like PR_CEnterMonitor except that if the monitor is owned by
|
||||||
** another thread NULL is returned.
|
** another thread NULL is returned.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRMonitor*) PR_CTestAndEnterMonitor(void *address);
|
NSPR_API(PRMonitor*) PR_CTestAndEnterMonitor(void *address);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
** PLATFORM-SPECIFIC THREAD SYNCHRONIZATION FUNCTIONS
|
** PLATFORM-SPECIFIC THREAD SYNCHRONIZATION FUNCTIONS
|
||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
#if defined(XP_MAC)
|
#if defined(XP_MAC)
|
||||||
|
|
||||||
PR_EXTERN(void) PR_Mac_WaitForAsyncNotify(PRIntervalTime timeout);
|
NSPR_API(void) PR_Mac_WaitForAsyncNotify(PRIntervalTime timeout);
|
||||||
PR_EXTERN(void) PR_Mac_PostAsyncNotify(PRThread *thread);
|
NSPR_API(void) PR_Mac_PostAsyncNotify(PRThread *thread);
|
||||||
|
|
||||||
#endif /* XP_MAC */
|
#endif /* XP_MAC */
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ PR_EXTERN(void) PR_Mac_PostAsyncNotify(PRThread *thread);
|
||||||
** environment variables, the values of the environment variables are used.
|
** environment variables, the values of the environment variables are used.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) _PR_Irix_Set_Arena_Params(PRInt32 initusers, PRInt32 initsize);
|
NSPR_API(void) _PR_Irix_Set_Arena_Params(PRInt32 initusers, PRInt32 initsize);
|
||||||
|
|
||||||
#endif /* IRIX */
|
#endif /* IRIX */
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ the model dependent portions are to be implemented.
|
||||||
In header file pr/include/primpl.h, each publicly declared
|
In header file pr/include/primpl.h, each publicly declared
|
||||||
platform dependent function is declared as:
|
platform dependent function is declared as:
|
||||||
|
|
||||||
PR_EXTERN void _PR_MD_FUNCTION( long arg1, long arg2 );
|
NSPR_API void _PR_MD_FUNCTION( long arg1, long arg2 );
|
||||||
#define _PR_MD_FUNCTION _MD_FUNCTION
|
#define _PR_MD_FUNCTION _MD_FUNCTION
|
||||||
|
|
||||||
In header file pr/include/md/<platform>/_<platform>.h,
|
In header file pr/include/md/<platform>/_<platform>.h,
|
||||||
|
@ -197,8 +197,8 @@ typedef struct PTDebug
|
||||||
PRUintn cvars_notified, delayed_cv_deletes;
|
PRUintn cvars_notified, delayed_cv_deletes;
|
||||||
} PTDebug;
|
} PTDebug;
|
||||||
|
|
||||||
PR_EXTERN(void) PT_GetStats(PTDebug* here);
|
NSPR_API(void) PT_GetStats(PTDebug* here);
|
||||||
PR_EXTERN(void) PT_FPrintStats(PRFileDesc *fd, const char *msg);
|
NSPR_API(void) PT_FPrintStats(PRFileDesc *fd, const char *msg);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -297,10 +297,10 @@ typedef struct _PRInterruptTable {
|
||||||
|
|
||||||
#ifdef _PR_LOCAL_THREADS_ONLY
|
#ifdef _PR_LOCAL_THREADS_ONLY
|
||||||
|
|
||||||
PR_EXTERN(struct _PRCPU *) _pr_currentCPU;
|
NSPR_API(struct _PRCPU *) _pr_currentCPU;
|
||||||
PR_EXTERN(PRThread *) _pr_currentThread;
|
NSPR_API(PRThread *) _pr_currentThread;
|
||||||
PR_EXTERN(PRThread *) _pr_lastThread;
|
NSPR_API(PRThread *) _pr_lastThread;
|
||||||
PR_EXTERN(PRInt32) _pr_intsOff;
|
NSPR_API(PRInt32) _pr_intsOff;
|
||||||
|
|
||||||
#define _MD_CURRENT_CPU() (_pr_currentCPU)
|
#define _MD_CURRENT_CPU() (_pr_currentCPU)
|
||||||
#define _MD_SET_CURRENT_CPU(_cpu) (_pr_currentCPU = (_cpu))
|
#define _MD_SET_CURRENT_CPU(_cpu) (_pr_currentCPU = (_cpu))
|
||||||
|
@ -536,8 +536,8 @@ extern _PRInterruptTable _pr_interruptTable[];
|
||||||
|
|
||||||
extern void _PR_IntsOn(_PRCPU *cpu);
|
extern void _PR_IntsOn(_PRCPU *cpu);
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_WakeupCPU(void);
|
NSPR_API(void) _PR_WakeupCPU(void);
|
||||||
PR_EXTERN(void) _PR_PauseCPU(void);
|
NSPR_API(void) _PR_PauseCPU(void);
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ extern PRStatus _PR_WaitCondVar(
|
||||||
PRThread *thread, PRCondVar *cvar, PRLock *lock, PRIntervalTime timeout);
|
PRThread *thread, PRCondVar *cvar, PRLock *lock, PRIntervalTime timeout);
|
||||||
extern PRUint32 _PR_CondVarToString(PRCondVar *cvar, char *buf, PRUint32 buflen);
|
extern PRUint32 _PR_CondVarToString(PRCondVar *cvar, char *buf, PRUint32 buflen);
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_Notify(PRMonitor *mon, PRBool all, PRBool sticky);
|
NSPR_API(void) _PR_Notify(PRMonitor *mon, PRBool all, PRBool sticky);
|
||||||
|
|
||||||
/* PRThread.flags */
|
/* PRThread.flags */
|
||||||
#define _PR_SYSTEM 0x01
|
#define _PR_SYSTEM 0x01
|
||||||
|
@ -711,22 +711,22 @@ extern void _PR_ClockInterrupt(void);
|
||||||
extern void _PR_Schedule(void);
|
extern void _PR_Schedule(void);
|
||||||
extern void _PR_SetThreadPriority(
|
extern void _PR_SetThreadPriority(
|
||||||
PRThread* thread, PRThreadPriority priority);
|
PRThread* thread, PRThreadPriority priority);
|
||||||
PR_EXTERN(void) _PR_Unlock(PRLock *lock);
|
NSPR_API(void) _PR_Unlock(PRLock *lock);
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_SuspendThread(PRThread *t);
|
NSPR_API(void) _PR_SuspendThread(PRThread *t);
|
||||||
PR_EXTERN(void) _PR_ResumeThread(PRThread *t);
|
NSPR_API(void) _PR_ResumeThread(PRThread *t);
|
||||||
|
|
||||||
extern PRThreadStack * _PR_NewStack(PRUint32 stackSize);
|
extern PRThreadStack * _PR_NewStack(PRUint32 stackSize);
|
||||||
extern void _PR_FreeStack(PRThreadStack *stack);
|
extern void _PR_FreeStack(PRThreadStack *stack);
|
||||||
extern PRBool _PR_NotifyThread (PRThread *thread, PRThread *me);
|
extern PRBool _PR_NotifyThread (PRThread *thread, PRThread *me);
|
||||||
extern void _PR_NotifyLockedThread (PRThread *thread);
|
extern void _PR_NotifyLockedThread (PRThread *thread);
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_AddSleepQ(PRThread *thread, PRIntervalTime timeout);
|
NSPR_API(void) _PR_AddSleepQ(PRThread *thread, PRIntervalTime timeout);
|
||||||
PR_EXTERN(void) _PR_DelSleepQ(PRThread *thread, PRBool propogate_time);
|
NSPR_API(void) _PR_DelSleepQ(PRThread *thread, PRBool propogate_time);
|
||||||
|
|
||||||
extern void _PR_AddThreadToRunQ(PRThread *me, PRThread *thread);
|
extern void _PR_AddThreadToRunQ(PRThread *me, PRThread *thread);
|
||||||
|
|
||||||
PR_EXTERN(PRThread*) _PR_CreateThread(PRThreadType type,
|
NSPR_API(PRThread*) _PR_CreateThread(PRThreadType type,
|
||||||
void (*start)(void *arg),
|
void (*start)(void *arg),
|
||||||
void *arg,
|
void *arg,
|
||||||
PRThreadPriority priority,
|
PRThreadPriority priority,
|
||||||
|
@ -747,30 +747,30 @@ extern void _PRI_DetachThread(void);
|
||||||
|
|
||||||
#define _PR_IO_PENDING(_thread) ((_thread)->io_pending)
|
#define _PR_IO_PENDING(_thread) ((_thread)->io_pending)
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_INIT_CPUS();
|
NSPR_API(void) _PR_MD_INIT_CPUS();
|
||||||
#define _PR_MD_INIT_CPUS _MD_INIT_CPUS
|
#define _PR_MD_INIT_CPUS _MD_INIT_CPUS
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_WAKEUP_CPUS();
|
NSPR_API(void) _PR_MD_WAKEUP_CPUS();
|
||||||
#define _PR_MD_WAKEUP_CPUS _MD_WAKEUP_CPUS
|
#define _PR_MD_WAKEUP_CPUS _MD_WAKEUP_CPUS
|
||||||
|
|
||||||
/* Interrupts related */
|
/* Interrupts related */
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_START_INTERRUPTS(void);
|
NSPR_API(void) _PR_MD_START_INTERRUPTS(void);
|
||||||
#define _PR_MD_START_INTERRUPTS _MD_START_INTERRUPTS
|
#define _PR_MD_START_INTERRUPTS _MD_START_INTERRUPTS
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_STOP_INTERRUPTS(void);
|
NSPR_API(void) _PR_MD_STOP_INTERRUPTS(void);
|
||||||
#define _PR_MD_STOP_INTERRUPTS _MD_STOP_INTERRUPTS
|
#define _PR_MD_STOP_INTERRUPTS _MD_STOP_INTERRUPTS
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_ENABLE_CLOCK_INTERRUPTS(void);
|
NSPR_API(void) _PR_MD_ENABLE_CLOCK_INTERRUPTS(void);
|
||||||
#define _PR_MD_ENABLE_CLOCK_INTERRUPTS _MD_ENABLE_CLOCK_INTERRUPTS
|
#define _PR_MD_ENABLE_CLOCK_INTERRUPTS _MD_ENABLE_CLOCK_INTERRUPTS
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_DISABLE_CLOCK_INTERRUPTS(void);
|
NSPR_API(void) _PR_MD_DISABLE_CLOCK_INTERRUPTS(void);
|
||||||
#define _PR_MD_DISABLE_CLOCK_INTERRUPTS _MD_DISABLE_CLOCK_INTERRUPTS
|
#define _PR_MD_DISABLE_CLOCK_INTERRUPTS _MD_DISABLE_CLOCK_INTERRUPTS
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_BLOCK_CLOCK_INTERRUPTS(void);
|
NSPR_API(void) _PR_MD_BLOCK_CLOCK_INTERRUPTS(void);
|
||||||
#define _PR_MD_BLOCK_CLOCK_INTERRUPTS _MD_BLOCK_CLOCK_INTERRUPTS
|
#define _PR_MD_BLOCK_CLOCK_INTERRUPTS _MD_BLOCK_CLOCK_INTERRUPTS
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_UNBLOCK_CLOCK_INTERRUPTS(void);
|
NSPR_API(void) _PR_MD_UNBLOCK_CLOCK_INTERRUPTS(void);
|
||||||
#define _PR_MD_UNBLOCK_CLOCK_INTERRUPTS _MD_UNBLOCK_CLOCK_INTERRUPTS
|
#define _PR_MD_UNBLOCK_CLOCK_INTERRUPTS _MD_UNBLOCK_CLOCK_INTERRUPTS
|
||||||
|
|
||||||
/* The _PR_MD_WAIT_LOCK and _PR_MD_WAKEUP_WAITER functions put to sleep and
|
/* The _PR_MD_WAIT_LOCK and _PR_MD_WAKEUP_WAITER functions put to sleep and
|
||||||
|
@ -783,31 +783,31 @@ extern PRStatus _PR_MD_WAKEUP_WAITER(PRThread *);
|
||||||
#define _PR_MD_WAKEUP_WAITER _MD_WAKEUP_WAITER
|
#define _PR_MD_WAKEUP_WAITER _MD_WAKEUP_WAITER
|
||||||
|
|
||||||
#ifndef _PR_LOCAL_THREADS_ONLY /* not if only local threads supported */
|
#ifndef _PR_LOCAL_THREADS_ONLY /* not if only local threads supported */
|
||||||
PR_EXTERN(void) _PR_MD_CLOCK_INTERRUPT(void);
|
NSPR_API(void) _PR_MD_CLOCK_INTERRUPT(void);
|
||||||
#define _PR_MD_CLOCK_INTERRUPT _MD_CLOCK_INTERRUPT
|
#define _PR_MD_CLOCK_INTERRUPT _MD_CLOCK_INTERRUPT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Stack debugging */
|
/* Stack debugging */
|
||||||
PR_EXTERN(void) _PR_MD_INIT_STACK(PRThreadStack *ts, PRIntn redzone);
|
NSPR_API(void) _PR_MD_INIT_STACK(PRThreadStack *ts, PRIntn redzone);
|
||||||
#define _PR_MD_INIT_STACK _MD_INIT_STACK
|
#define _PR_MD_INIT_STACK _MD_INIT_STACK
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_CLEAR_STACK(PRThreadStack* ts);
|
NSPR_API(void) _PR_MD_CLEAR_STACK(PRThreadStack* ts);
|
||||||
#define _PR_MD_CLEAR_STACK _MD_CLEAR_STACK
|
#define _PR_MD_CLEAR_STACK _MD_CLEAR_STACK
|
||||||
|
|
||||||
/* CPU related */
|
/* CPU related */
|
||||||
PR_EXTERN(PRInt32) _PR_MD_GET_INTSOFF(void);
|
NSPR_API(PRInt32) _PR_MD_GET_INTSOFF(void);
|
||||||
#define _PR_MD_GET_INTSOFF _MD_GET_INTSOFF
|
#define _PR_MD_GET_INTSOFF _MD_GET_INTSOFF
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_SET_INTSOFF(PRInt32 _val);
|
NSPR_API(void) _PR_MD_SET_INTSOFF(PRInt32 _val);
|
||||||
#define _PR_MD_SET_INTSOFF _MD_SET_INTSOFF
|
#define _PR_MD_SET_INTSOFF _MD_SET_INTSOFF
|
||||||
|
|
||||||
PR_EXTERN(_PRCPU*) _PR_MD_CURRENT_CPU(void);
|
NSPR_API(_PRCPU*) _PR_MD_CURRENT_CPU(void);
|
||||||
#define _PR_MD_CURRENT_CPU _MD_CURRENT_CPU
|
#define _PR_MD_CURRENT_CPU _MD_CURRENT_CPU
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_SET_CURRENT_CPU(_PRCPU *cpu);
|
NSPR_API(void) _PR_MD_SET_CURRENT_CPU(_PRCPU *cpu);
|
||||||
#define _PR_MD_SET_CURRENT_CPU _MD_SET_CURRENT_CPU
|
#define _PR_MD_SET_CURRENT_CPU _MD_SET_CURRENT_CPU
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_INIT_RUNNING_CPU(_PRCPU *cpu);
|
NSPR_API(void) _PR_MD_INIT_RUNNING_CPU(_PRCPU *cpu);
|
||||||
#define _PR_MD_INIT_RUNNING_CPU _MD_INIT_RUNNING_CPU
|
#define _PR_MD_INIT_RUNNING_CPU _MD_INIT_RUNNING_CPU
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -824,47 +824,47 @@ extern void _PR_MD_EXIT(PRIntn status);
|
||||||
|
|
||||||
/* Locks related */
|
/* Locks related */
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_INIT_LOCKS(void);
|
NSPR_API(void) _PR_MD_INIT_LOCKS(void);
|
||||||
#define _PR_MD_INIT_LOCKS _MD_INIT_LOCKS
|
#define _PR_MD_INIT_LOCKS _MD_INIT_LOCKS
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _PR_MD_NEW_LOCK(_MDLock *md);
|
NSPR_API(PRStatus) _PR_MD_NEW_LOCK(_MDLock *md);
|
||||||
#define _PR_MD_NEW_LOCK _MD_NEW_LOCK
|
#define _PR_MD_NEW_LOCK _MD_NEW_LOCK
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_FREE_LOCK(_MDLock *md);
|
NSPR_API(void) _PR_MD_FREE_LOCK(_MDLock *md);
|
||||||
#define _PR_MD_FREE_LOCK _MD_FREE_LOCK
|
#define _PR_MD_FREE_LOCK _MD_FREE_LOCK
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_LOCK(_MDLock *md);
|
NSPR_API(void) _PR_MD_LOCK(_MDLock *md);
|
||||||
#define _PR_MD_LOCK _MD_LOCK
|
#define _PR_MD_LOCK _MD_LOCK
|
||||||
|
|
||||||
PR_EXTERN(PRBool) _PR_MD_TEST_AND_LOCK(_MDLock *md);
|
NSPR_API(PRBool) _PR_MD_TEST_AND_LOCK(_MDLock *md);
|
||||||
#define _PR_MD_TEST_AND_LOCK _MD_TEST_AND_LOCK
|
#define _PR_MD_TEST_AND_LOCK _MD_TEST_AND_LOCK
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_UNLOCK(_MDLock *md);
|
NSPR_API(void) _PR_MD_UNLOCK(_MDLock *md);
|
||||||
#define _PR_MD_UNLOCK _MD_UNLOCK
|
#define _PR_MD_UNLOCK _MD_UNLOCK
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_IOQ_LOCK(void);
|
NSPR_API(void) _PR_MD_IOQ_LOCK(void);
|
||||||
#define _PR_MD_IOQ_LOCK _MD_IOQ_LOCK
|
#define _PR_MD_IOQ_LOCK _MD_IOQ_LOCK
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_IOQ_UNLOCK(void);
|
NSPR_API(void) _PR_MD_IOQ_UNLOCK(void);
|
||||||
#define _PR_MD_IOQ_UNLOCK _MD_IOQ_UNLOCK
|
#define _PR_MD_IOQ_UNLOCK _MD_IOQ_UNLOCK
|
||||||
|
|
||||||
#ifndef _PR_LOCAL_THREADS_ONLY /* not if only local threads supported */
|
#ifndef _PR_LOCAL_THREADS_ONLY /* not if only local threads supported */
|
||||||
/* Semaphore related -- only for native threads */
|
/* Semaphore related -- only for native threads */
|
||||||
#ifdef HAVE_CVAR_BUILT_ON_SEM
|
#ifdef HAVE_CVAR_BUILT_ON_SEM
|
||||||
PR_EXTERN(void) _PR_MD_NEW_SEM(_MDSemaphore *md, PRUintn value);
|
NSPR_API(void) _PR_MD_NEW_SEM(_MDSemaphore *md, PRUintn value);
|
||||||
#define _PR_MD_NEW_SEM _MD_NEW_SEM
|
#define _PR_MD_NEW_SEM _MD_NEW_SEM
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_DESTROY_SEM(_MDSemaphore *md);
|
NSPR_API(void) _PR_MD_DESTROY_SEM(_MDSemaphore *md);
|
||||||
#define _PR_MD_DESTROY_SEM _MD_DESTROY_SEM
|
#define _PR_MD_DESTROY_SEM _MD_DESTROY_SEM
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _PR_MD_TIMED_WAIT_SEM(
|
NSPR_API(PRStatus) _PR_MD_TIMED_WAIT_SEM(
|
||||||
_MDSemaphore *md, PRIntervalTime timeout);
|
_MDSemaphore *md, PRIntervalTime timeout);
|
||||||
#define _PR_MD_TIMED_WAIT_SEM _MD_TIMED_WAIT_SEM
|
#define _PR_MD_TIMED_WAIT_SEM _MD_TIMED_WAIT_SEM
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _PR_MD_WAIT_SEM(_MDSemaphore *md);
|
NSPR_API(PRStatus) _PR_MD_WAIT_SEM(_MDSemaphore *md);
|
||||||
#define _PR_MD_WAIT_SEM _MD_WAIT_SEM
|
#define _PR_MD_WAIT_SEM _MD_WAIT_SEM
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_POST_SEM(_MDSemaphore *md);
|
NSPR_API(void) _PR_MD_POST_SEM(_MDSemaphore *md);
|
||||||
#define _PR_MD_POST_SEM _MD_POST_SEM
|
#define _PR_MD_POST_SEM _MD_POST_SEM
|
||||||
#endif /* HAVE_CVAR_BUILT_ON_SEM */
|
#endif /* HAVE_CVAR_BUILT_ON_SEM */
|
||||||
|
|
||||||
|
@ -873,37 +873,37 @@ PR_EXTERN(void) _PR_MD_POST_SEM(_MDSemaphore *md);
|
||||||
/* Condition Variables related -- only for native threads */
|
/* Condition Variables related -- only for native threads */
|
||||||
|
|
||||||
#ifndef _PR_LOCAL_THREADS_ONLY /* not if only local threads supported */
|
#ifndef _PR_LOCAL_THREADS_ONLY /* not if only local threads supported */
|
||||||
PR_EXTERN(PRInt32) _PR_MD_NEW_CV(_MDCVar *md);
|
NSPR_API(PRInt32) _PR_MD_NEW_CV(_MDCVar *md);
|
||||||
#define _PR_MD_NEW_CV _MD_NEW_CV
|
#define _PR_MD_NEW_CV _MD_NEW_CV
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_FREE_CV(_MDCVar *md);
|
NSPR_API(void) _PR_MD_FREE_CV(_MDCVar *md);
|
||||||
#define _PR_MD_FREE_CV _MD_FREE_CV
|
#define _PR_MD_FREE_CV _MD_FREE_CV
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_WAIT_CV(
|
NSPR_API(void) _PR_MD_WAIT_CV(
|
||||||
_MDCVar *mdCVar,_MDLock *mdLock,PRIntervalTime timeout);
|
_MDCVar *mdCVar,_MDLock *mdLock,PRIntervalTime timeout);
|
||||||
#define _PR_MD_WAIT_CV _MD_WAIT_CV
|
#define _PR_MD_WAIT_CV _MD_WAIT_CV
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_NOTIFY_CV(_MDCVar *md, _MDLock *lock);
|
NSPR_API(void) _PR_MD_NOTIFY_CV(_MDCVar *md, _MDLock *lock);
|
||||||
#define _PR_MD_NOTIFY_CV _MD_NOTIFY_CV
|
#define _PR_MD_NOTIFY_CV _MD_NOTIFY_CV
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_NOTIFYALL_CV(_MDCVar *md, _MDLock *lock);
|
NSPR_API(void) _PR_MD_NOTIFYALL_CV(_MDCVar *md, _MDLock *lock);
|
||||||
#define _PR_MD_NOTIFYALL_CV _MD_NOTIFYALL_CV
|
#define _PR_MD_NOTIFYALL_CV _MD_NOTIFYALL_CV
|
||||||
#endif /* _PR_LOCAL_THREADS_ONLY */
|
#endif /* _PR_LOCAL_THREADS_ONLY */
|
||||||
|
|
||||||
/* Threads related */
|
/* Threads related */
|
||||||
PR_EXTERN(PRThread*) _PR_MD_CURRENT_THREAD(void);
|
NSPR_API(PRThread*) _PR_MD_CURRENT_THREAD(void);
|
||||||
#define _PR_MD_CURRENT_THREAD _MD_CURRENT_THREAD
|
#define _PR_MD_CURRENT_THREAD _MD_CURRENT_THREAD
|
||||||
|
|
||||||
PR_EXTERN(PRThread*) _PR_MD_GET_ATTACHED_THREAD(void);
|
NSPR_API(PRThread*) _PR_MD_GET_ATTACHED_THREAD(void);
|
||||||
#define _PR_MD_GET_ATTACHED_THREAD _MD_GET_ATTACHED_THREAD
|
#define _PR_MD_GET_ATTACHED_THREAD _MD_GET_ATTACHED_THREAD
|
||||||
|
|
||||||
PR_EXTERN(PRThread*) _PR_MD_LAST_THREAD(void);
|
NSPR_API(PRThread*) _PR_MD_LAST_THREAD(void);
|
||||||
#define _PR_MD_LAST_THREAD _MD_LAST_THREAD
|
#define _PR_MD_LAST_THREAD _MD_LAST_THREAD
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_SET_CURRENT_THREAD(PRThread *thread);
|
NSPR_API(void) _PR_MD_SET_CURRENT_THREAD(PRThread *thread);
|
||||||
#define _PR_MD_SET_CURRENT_THREAD _MD_SET_CURRENT_THREAD
|
#define _PR_MD_SET_CURRENT_THREAD _MD_SET_CURRENT_THREAD
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_SET_LAST_THREAD(PRThread *thread);
|
NSPR_API(void) _PR_MD_SET_LAST_THREAD(PRThread *thread);
|
||||||
#define _PR_MD_SET_LAST_THREAD _MD_SET_LAST_THREAD
|
#define _PR_MD_SET_LAST_THREAD _MD_SET_LAST_THREAD
|
||||||
|
|
||||||
extern PRStatus _PR_MD_INIT_THREAD(PRThread *thread);
|
extern PRStatus _PR_MD_INIT_THREAD(PRThread *thread);
|
||||||
|
@ -914,7 +914,7 @@ extern void _PR_MD_EXIT_THREAD(PRThread *thread);
|
||||||
|
|
||||||
#ifndef _PR_LOCAL_THREADS_ONLY /* not if only local threads supported */
|
#ifndef _PR_LOCAL_THREADS_ONLY /* not if only local threads supported */
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) _PR_MD_INIT_ATTACHED_THREAD(PRThread *thread);
|
NSPR_API(PRStatus) _PR_MD_INIT_ATTACHED_THREAD(PRThread *thread);
|
||||||
#define _PR_MD_INIT_ATTACHED_THREAD _MD_INIT_ATTACHED_THREAD
|
#define _PR_MD_INIT_ATTACHED_THREAD _MD_INIT_ATTACHED_THREAD
|
||||||
|
|
||||||
extern void _PR_MD_SUSPEND_THREAD(PRThread *thread);
|
extern void _PR_MD_SUSPEND_THREAD(PRThread *thread);
|
||||||
|
@ -942,7 +942,7 @@ extern void _PR_MD_END_RESUME_ALL(void);
|
||||||
#define _PR_MD_END_RESUME_ALL _MD_END_RESUME_ALL
|
#define _PR_MD_END_RESUME_ALL _MD_END_RESUME_ALL
|
||||||
|
|
||||||
#if defined(IRIX)
|
#if defined(IRIX)
|
||||||
PR_EXTERN(void) _PR_IRIX_CHILD_PROCESS(void);
|
NSPR_API(void) _PR_IRIX_CHILD_PROCESS(void);
|
||||||
#endif /* IRIX */
|
#endif /* IRIX */
|
||||||
|
|
||||||
#endif /* !_PR_LOCAL_THREADS_ONLY */
|
#endif /* !_PR_LOCAL_THREADS_ONLY */
|
||||||
|
@ -976,10 +976,10 @@ extern void _PR_MD_YIELD(void);
|
||||||
extern void _PR_MD_SET_PRIORITY(_MDThread *md, PRThreadPriority newPri);
|
extern void _PR_MD_SET_PRIORITY(_MDThread *md, PRThreadPriority newPri);
|
||||||
#define _PR_MD_SET_PRIORITY _MD_SET_PRIORITY
|
#define _PR_MD_SET_PRIORITY _MD_SET_PRIORITY
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_SUSPENDALL(void);
|
NSPR_API(void) _PR_MD_SUSPENDALL(void);
|
||||||
#define _PR_MD_SUSPENDALL _MD_SUSPENDALL
|
#define _PR_MD_SUSPENDALL _MD_SUSPENDALL
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_RESUMEALL(void);
|
NSPR_API(void) _PR_MD_RESUMEALL(void);
|
||||||
#define _PR_MD_RESUMEALL _MD_RESUMEALL
|
#define _PR_MD_RESUMEALL _MD_RESUMEALL
|
||||||
|
|
||||||
extern void _PR_MD_INIT_CONTEXT(
|
extern void _PR_MD_INIT_CONTEXT(
|
||||||
|
@ -1339,7 +1339,7 @@ struct PRSemaphore {
|
||||||
#endif /* defined(_PR_BTHREADS) */
|
#endif /* defined(_PR_BTHREADS) */
|
||||||
};
|
};
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_InitSem(void);
|
NSPR_API(void) _PR_InitSem(void);
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
@ -1700,10 +1700,10 @@ extern void _PR_MD_EARLY_INIT(void);
|
||||||
extern void _PR_MD_INTERVAL_INIT(void);
|
extern void _PR_MD_INTERVAL_INIT(void);
|
||||||
#define _PR_MD_INTERVAL_INIT _MD_INTERVAL_INIT
|
#define _PR_MD_INTERVAL_INIT _MD_INTERVAL_INIT
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_INIT_SEGS(void);
|
NSPR_API(void) _PR_MD_INIT_SEGS(void);
|
||||||
#define _PR_MD_INIT_SEGS _MD_INIT_SEGS
|
#define _PR_MD_INIT_SEGS _MD_INIT_SEGS
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_FINAL_INIT(void);
|
NSPR_API(void) _PR_MD_FINAL_INIT(void);
|
||||||
#define _PR_MD_FINAL_INIT _MD_FINAL_INIT
|
#define _PR_MD_FINAL_INIT _MD_FINAL_INIT
|
||||||
|
|
||||||
/* Process control */
|
/* Process control */
|
||||||
|
@ -1725,7 +1725,7 @@ extern PRStatus _PR_MD_KILL_PROCESS(PRProcess *process);
|
||||||
#define _PR_MD_KILL_PROCESS _MD_KILL_PROCESS
|
#define _PR_MD_KILL_PROCESS _MD_KILL_PROCESS
|
||||||
|
|
||||||
/* Current Time */
|
/* Current Time */
|
||||||
PR_EXTERN(PRTime) _PR_MD_NOW(void);
|
NSPR_API(PRTime) _PR_MD_NOW(void);
|
||||||
#define _PR_MD_NOW _MD_NOW
|
#define _PR_MD_NOW _MD_NOW
|
||||||
|
|
||||||
/* Environment related */
|
/* Environment related */
|
||||||
|
@ -1753,10 +1753,10 @@ extern PRInt32 _PR_MD_ATOMIC_SET(PRInt32 *, PRInt32);
|
||||||
#define _PR_MD_ATOMIC_SET _MD_ATOMIC_SET
|
#define _PR_MD_ATOMIC_SET _MD_ATOMIC_SET
|
||||||
|
|
||||||
/* Segment related */
|
/* Segment related */
|
||||||
PR_EXTERN(PRStatus) _PR_MD_ALLOC_SEGMENT(PRSegment *seg, PRUint32 size, void *vaddr);
|
NSPR_API(PRStatus) _PR_MD_ALLOC_SEGMENT(PRSegment *seg, PRUint32 size, void *vaddr);
|
||||||
#define _PR_MD_ALLOC_SEGMENT _MD_ALLOC_SEGMENT
|
#define _PR_MD_ALLOC_SEGMENT _MD_ALLOC_SEGMENT
|
||||||
|
|
||||||
PR_EXTERN(void) _PR_MD_FREE_SEGMENT(PRSegment *seg);
|
NSPR_API(void) _PR_MD_FREE_SEGMENT(PRSegment *seg);
|
||||||
#define _PR_MD_FREE_SEGMENT _MD_FREE_SEGMENT
|
#define _PR_MD_FREE_SEGMENT _MD_FREE_SEGMENT
|
||||||
|
|
||||||
/* Garbage collection */
|
/* Garbage collection */
|
||||||
|
@ -1911,7 +1911,7 @@ extern PRStatus _PR_MakeNativeIPCName(
|
||||||
|
|
||||||
/* Socket call error code */
|
/* Socket call error code */
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) _PR_MD_GET_SOCKET_ERROR(void);
|
NSPR_API(PRInt32) _PR_MD_GET_SOCKET_ERROR(void);
|
||||||
#define _PR_MD_GET_SOCKET_ERROR _MD_GET_SOCKET_ERROR
|
#define _PR_MD_GET_SOCKET_ERROR _MD_GET_SOCKET_ERROR
|
||||||
|
|
||||||
/* Get name of current host */
|
/* Get name of current host */
|
||||||
|
|
|
@ -40,7 +40,7 @@ typedef struct PRStaticLinkTable {
|
||||||
** The string provided as 'path' is copied. The caller can do whatever is
|
** The string provided as 'path' is copied. The caller can do whatever is
|
||||||
** convenient with the argument when the function is complete.
|
** convenient with the argument when the function is complete.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_SetLibraryPath(const char *path);
|
NSPR_API(PRStatus) PR_SetLibraryPath(const char *path);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return a character string which contains the path used to search for
|
** Return a character string which contains the path used to search for
|
||||||
|
@ -50,7 +50,7 @@ PR_EXTERN(PRStatus) PR_SetLibraryPath(const char *path);
|
||||||
** The storage is allocated by the runtime and becomes the responsibilty
|
** The storage is allocated by the runtime and becomes the responsibilty
|
||||||
** of the caller.
|
** of the caller.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(char*) PR_GetLibraryPath(void);
|
NSPR_API(char*) PR_GetLibraryPath(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Given a directory name "dir" and a library name "lib" construct a full
|
** Given a directory name "dir" and a library name "lib" construct a full
|
||||||
|
@ -63,13 +63,13 @@ PR_EXTERN(char*) PR_GetLibraryPath(void);
|
||||||
** The storage for the result is allocated by the runtime and becomes the
|
** The storage for the result is allocated by the runtime and becomes the
|
||||||
** responsibility of the caller.
|
** responsibility of the caller.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(char*) PR_GetLibraryName(const char *dir, const char *lib);
|
NSPR_API(char*) PR_GetLibraryName(const char *dir, const char *lib);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**
|
**
|
||||||
** Free the memory allocated, for the caller, by PR_GetLibraryName
|
** Free the memory allocated, for the caller, by PR_GetLibraryName
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_FreeLibraryName(char *mem);
|
NSPR_API(void) PR_FreeLibraryName(char *mem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Given a library "name" try to load the library. The argument "name"
|
** Given a library "name" try to load the library. The argument "name"
|
||||||
|
@ -83,7 +83,7 @@ PR_EXTERN(void) PR_FreeLibraryName(char *mem);
|
||||||
**
|
**
|
||||||
** This increments the reference count of the library.
|
** This increments the reference count of the library.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRLibrary*) PR_LoadLibrary(const char *name);
|
NSPR_API(PRLibrary*) PR_LoadLibrary(const char *name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Each operating system has its preferred way of specifying
|
** Each operating system has its preferred way of specifying
|
||||||
|
@ -147,7 +147,7 @@ typedef struct PRLibSpec {
|
||||||
** Load the specified library, in the manner specified by 'flags'.
|
** Load the specified library, in the manner specified by 'flags'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRLibrary *)
|
NSPR_API(PRLibrary *)
|
||||||
PR_LoadLibraryWithFlags(
|
PR_LoadLibraryWithFlags(
|
||||||
PRLibSpec libSpec, /* the shared library */
|
PRLibSpec libSpec, /* the shared library */
|
||||||
PRIntn flags /* flags that affect the loading */
|
PRIntn flags /* flags that affect the loading */
|
||||||
|
@ -162,7 +162,7 @@ PR_LoadLibraryWithFlags(
|
||||||
**
|
**
|
||||||
** This function decrements the reference count of the library.
|
** This function decrements the reference count of the library.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_UnloadLibrary(PRLibrary *lib);
|
NSPR_API(PRStatus) PR_UnloadLibrary(PRLibrary *lib);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Given the name of a procedure, return the address of the function that
|
** Given the name of a procedure, return the address of the function that
|
||||||
|
@ -172,7 +172,7 @@ PR_EXTERN(PRStatus) PR_UnloadLibrary(PRLibrary *lib);
|
||||||
**
|
**
|
||||||
** This function does not modify the reference count of the library.
|
** This function does not modify the reference count of the library.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void*) PR_FindSymbol(PRLibrary *lib, const char *name);
|
NSPR_API(void*) PR_FindSymbol(PRLibrary *lib, const char *name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Finds a symbol in one of the currently loaded libraries. Given the
|
** Finds a symbol in one of the currently loaded libraries. Given the
|
||||||
|
@ -184,7 +184,7 @@ PR_EXTERN(void*) PR_FindSymbol(PRLibrary *lib, const char *name);
|
||||||
**
|
**
|
||||||
** This increments the reference count of the library.
|
** This increments the reference count of the library.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void*) PR_FindSymbolAndLibrary(const char *name,
|
NSPR_API(void*) PR_FindSymbolAndLibrary(const char *name,
|
||||||
PRLibrary* *lib);
|
PRLibrary* *lib);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -198,7 +198,7 @@ PR_EXTERN(void*) PR_FindSymbolAndLibrary(const char *name,
|
||||||
**
|
**
|
||||||
** This increments the reference count of the library.
|
** This increments the reference count of the library.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRLibrary*) PR_LoadStaticLibrary(
|
NSPR_API(PRLibrary*) PR_LoadStaticLibrary(
|
||||||
const char *name, const PRStaticLinkTable *table);
|
const char *name, const PRStaticLinkTable *table);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/*
|
|
||||||
* The contents of this file are subject to the Netscape Public License
|
|
||||||
* Version 1.1 (the "NPL"); you may not use this file except in
|
|
||||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
|
||||||
* http://www.mozilla.org/NPL/
|
|
||||||
*
|
|
||||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
|
||||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
|
||||||
* for the specific language governing rights and limitations under the
|
|
||||||
* NPL.
|
|
||||||
*
|
|
||||||
* The Initial Developer of this code under the NPL is Netscape
|
|
||||||
* Communications Corporation. Portions created by Netscape are
|
|
||||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
|
||||||
* Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef prlink_mac_h___
|
|
||||||
#define prlink_mac_h___
|
|
||||||
|
|
||||||
#ifdef XP_MAC
|
|
||||||
|
|
||||||
#include <Files.h>
|
|
||||||
#include "prtypes.h"
|
|
||||||
|
|
||||||
PR_BEGIN_EXTERN_C
|
|
||||||
|
|
||||||
/*
|
|
||||||
** PR_LoadNamedFragment
|
|
||||||
**
|
|
||||||
** Load a code fragment by fragment name from the data fork of the specified file.
|
|
||||||
** The fragment name is an internal name which uniquely identifies a code
|
|
||||||
** fragment; this call opens the 'cfrg' resource in the file to find the
|
|
||||||
** offsets of the named fragment.
|
|
||||||
**
|
|
||||||
** If the specified fragment exists, it is loaded and an entry created
|
|
||||||
** in the load map (keyed by fragment name).
|
|
||||||
**
|
|
||||||
** If fileSpec points to an alias, the alias is resolved by this call.
|
|
||||||
*/
|
|
||||||
PR_EXTERN(PRLibrary*) PR_LoadNamedFragment(const FSSpec *fileSpec, const char* fragmentName);
|
|
||||||
|
|
||||||
/*
|
|
||||||
** PR_LoadIndexedFragment
|
|
||||||
**
|
|
||||||
** Load a code fragment by fragment index from the data fork of the specified file
|
|
||||||
** (since Mac shared libraries can contain multiple code fragments).
|
|
||||||
** This call opens the 'cfrg' resource in the file to find the offsets
|
|
||||||
** of the named fragment.
|
|
||||||
**
|
|
||||||
** If the specified fragment exists, it is loaded and an entry created
|
|
||||||
** in the load map (keyed by fragment name).
|
|
||||||
**
|
|
||||||
** If fileSpec points to an alias, the alias is resolved by this call.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
PR_EXTERN(PRLibrary*) PR_LoadIndexedFragment(const FSSpec *fileSpec, PRUint32 fragIndex);
|
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* prlink_mac_h___ */
|
|
|
@ -61,7 +61,7 @@ typedef struct PRLock PRLock;
|
||||||
** is returned.
|
** is returned.
|
||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRLock*) PR_NewLock(void);
|
NSPR_API(PRLock*) PR_NewLock(void);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_DestroyLock
|
** FUNCTION: PR_DestroyLock
|
||||||
|
@ -72,7 +72,7 @@ PR_EXTERN(PRLock*) PR_NewLock(void);
|
||||||
** OUTPUTS: void
|
** OUTPUTS: void
|
||||||
** RETURN: None
|
** RETURN: None
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(void) PR_DestroyLock(PRLock *lock);
|
NSPR_API(void) PR_DestroyLock(PRLock *lock);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_Lock
|
** FUNCTION: PR_Lock
|
||||||
|
@ -83,7 +83,7 @@ PR_EXTERN(void) PR_DestroyLock(PRLock *lock);
|
||||||
** OUTPUTS: void
|
** OUTPUTS: void
|
||||||
** RETURN: None
|
** RETURN: None
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(void) PR_Lock(PRLock *lock);
|
NSPR_API(void) PR_Lock(PRLock *lock);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_Unlock
|
** FUNCTION: PR_Unlock
|
||||||
|
@ -95,7 +95,7 @@ PR_EXTERN(void) PR_Lock(PRLock *lock);
|
||||||
** RETURN: PR_STATUS
|
** RETURN: PR_STATUS
|
||||||
** Returns PR_FAILURE if the caller does not own the lock.
|
** Returns PR_FAILURE if the caller does not own the lock.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRStatus) PR_Unlock(PRLock *lock);
|
NSPR_API(PRStatus) PR_Unlock(PRLock *lock);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -143,19 +143,19 @@ typedef struct PRLogModuleInfo {
|
||||||
/*
|
/*
|
||||||
** Create a new log module.
|
** Create a new log module.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRLogModuleInfo*) PR_NewLogModule(const char *name);
|
NSPR_API(PRLogModuleInfo*) PR_NewLogModule(const char *name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Set the file to use for logging. Returns PR_FALSE if the file cannot
|
** Set the file to use for logging. Returns PR_FALSE if the file cannot
|
||||||
** be created
|
** be created
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRBool) PR_SetLogFile(const char *name);
|
NSPR_API(PRBool) PR_SetLogFile(const char *name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Set the size of the logging buffer. If "buffer_size" is zero then the
|
** Set the size of the logging buffer. If "buffer_size" is zero then the
|
||||||
** logging becomes "synchronous" (or unbuffered).
|
** logging becomes "synchronous" (or unbuffered).
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_SetLogBuffering(PRIntn buffer_size);
|
NSPR_API(void) PR_SetLogBuffering(PRIntn buffer_size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Print a string to the log. "fmt" is a PR_snprintf format type. All
|
** Print a string to the log. "fmt" is a PR_snprintf format type. All
|
||||||
|
@ -163,16 +163,16 @@ PR_EXTERN(void) PR_SetLogBuffering(PRIntn buffer_size);
|
||||||
** and a time stamp. Also, the routine provides a missing newline if one
|
** and a time stamp. Also, the routine provides a missing newline if one
|
||||||
** is not provided.
|
** is not provided.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_LogPrint(const char *fmt, ...);
|
NSPR_API(void) PR_LogPrint(const char *fmt, ...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Flush the log to its file.
|
** Flush the log to its file.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_LogFlush(void);
|
NSPR_API(void) PR_LogFlush(void);
|
||||||
|
|
||||||
/* Need external access to this on Mac so we can first set up our faux environment vars */
|
/* Need external access to this on Mac so we can first set up our faux environment vars */
|
||||||
#ifdef XP_MAC
|
#ifdef XP_MAC
|
||||||
PR_EXTERN(void) PR_Init_Log(void);
|
NSPR_API(void) PR_Init_Log(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ PR_EXTERN(void) PR_Init_Log(void);
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
|
|
||||||
PR_EXTERN(void) PR_Assert(const char *s, const char *file, PRIntn ln);
|
NSPR_API(void) PR_Assert(const char *s, const char *file, PRIntn ln);
|
||||||
#define PR_ASSERT(_expr) \
|
#define PR_ASSERT(_expr) \
|
||||||
((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
|
((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
|
||||||
|
|
||||||
|
|
|
@ -47,9 +47,9 @@ PRInt64 __pascal __loadds __export
|
||||||
PRInt64 __pascal __loadds __export
|
PRInt64 __pascal __loadds __export
|
||||||
LL_Zero(void);
|
LL_Zero(void);
|
||||||
#else
|
#else
|
||||||
PR_EXTERN(PRInt64) LL_MaxInt(void);
|
NSPR_API(PRInt64) LL_MaxInt(void);
|
||||||
PR_EXTERN(PRInt64) LL_MinInt(void);
|
NSPR_API(PRInt64) LL_MinInt(void);
|
||||||
PR_EXTERN(PRInt64) LL_Zero(void);
|
NSPR_API(PRInt64) LL_Zero(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LL_MAXINT LL_MaxInt()
|
#define LL_MAXINT LL_MaxInt()
|
||||||
|
@ -248,7 +248,7 @@ PR_EXTERN(PRInt64) LL_Zero(void);
|
||||||
|
|
||||||
#define LL_UDIVMOD(qp, rp, a, b) ll_udivmod(qp, rp, a, b)
|
#define LL_UDIVMOD(qp, rp, a, b) ll_udivmod(qp, rp, a, b)
|
||||||
|
|
||||||
PR_EXTERN(void) ll_udivmod(PRUint64 *qp, PRUint64 *rp, PRUint64 a, PRUint64 b);
|
NSPR_API(void) ll_udivmod(PRUint64 *qp, PRUint64 *rp, PRUint64 a, PRUint64 b);
|
||||||
|
|
||||||
#define LL_DIV(r, a, b) { \
|
#define LL_DIV(r, a, b) { \
|
||||||
PRInt64 _a, _b; \
|
PRInt64 _a, _b; \
|
||||||
|
|
|
@ -45,13 +45,13 @@ PR_BEGIN_EXTERN_C
|
||||||
** must be freed by PR_Free.
|
** must be freed by PR_Free.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(void *) PR_Malloc(PRUint32 size);
|
NSPR_API(void *) PR_Malloc(PRUint32 size);
|
||||||
|
|
||||||
PR_EXTERN(void *) PR_Calloc(PRUint32 nelem, PRUint32 elsize);
|
NSPR_API(void *) PR_Calloc(PRUint32 nelem, PRUint32 elsize);
|
||||||
|
|
||||||
PR_EXTERN(void *) PR_Realloc(void *ptr, PRUint32 size);
|
NSPR_API(void *) PR_Realloc(void *ptr, PRUint32 size);
|
||||||
|
|
||||||
PR_EXTERN(void) PR_Free(void *ptr);
|
NSPR_API(void) PR_Free(void *ptr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The following are some convenience macros defined in terms of
|
** The following are some convenience macros defined in terms of
|
||||||
|
|
|
@ -33,7 +33,7 @@ typedef struct PRMonitor PRMonitor;
|
||||||
** This may fail if memory is tight or if some operating system resource
|
** This may fail if memory is tight or if some operating system resource
|
||||||
** is low.
|
** is low.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRMonitor*) PR_NewMonitor(void);
|
NSPR_API(PRMonitor*) PR_NewMonitor(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Destroy a monitor. The caller is responsible for guaranteeing that the
|
** Destroy a monitor. The caller is responsible for guaranteeing that the
|
||||||
|
@ -41,21 +41,21 @@ PR_EXTERN(PRMonitor*) PR_NewMonitor(void);
|
||||||
** condition variable and that the lock is not held.
|
** condition variable and that the lock is not held.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_DestroyMonitor(PRMonitor *mon);
|
NSPR_API(void) PR_DestroyMonitor(PRMonitor *mon);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Enter the lock associated with the monitor. If the calling thread currently
|
** Enter the lock associated with the monitor. If the calling thread currently
|
||||||
** is in the monitor, the call to enter will silently succeed. In either case,
|
** is in the monitor, the call to enter will silently succeed. In either case,
|
||||||
** it will increment the entry count by one.
|
** it will increment the entry count by one.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_EnterMonitor(PRMonitor *mon);
|
NSPR_API(void) PR_EnterMonitor(PRMonitor *mon);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Decrement the entry count associated with the monitor. If the decremented
|
** Decrement the entry count associated with the monitor. If the decremented
|
||||||
** entry count is zero, the monitor is exited. Returns PR_FAILURE if the
|
** entry count is zero, the monitor is exited. Returns PR_FAILURE if the
|
||||||
** calling thread has not entered the monitor.
|
** calling thread has not entered the monitor.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_ExitMonitor(PRMonitor *mon);
|
NSPR_API(PRStatus) PR_ExitMonitor(PRMonitor *mon);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Wait for a notify on the monitor's condition variable. Sleep for "ticks"
|
** Wait for a notify on the monitor's condition variable. Sleep for "ticks"
|
||||||
|
@ -73,21 +73,21 @@ PR_EXTERN(PRStatus) PR_ExitMonitor(PRMonitor *mon);
|
||||||
**
|
**
|
||||||
** Returns PR_FAILURE if the caller has not entered the monitor.
|
** Returns PR_FAILURE if the caller has not entered the monitor.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_Wait(PRMonitor *mon, PRIntervalTime ticks);
|
NSPR_API(PRStatus) PR_Wait(PRMonitor *mon, PRIntervalTime ticks);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Notify a thread waiting on the monitor's condition variable. If a thread
|
** Notify a thread waiting on the monitor's condition variable. If a thread
|
||||||
** is waiting on the condition variable (using PR_Wait) then it is awakened
|
** is waiting on the condition variable (using PR_Wait) then it is awakened
|
||||||
** and attempts to reenter the monitor.
|
** and attempts to reenter the monitor.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_Notify(PRMonitor *mon);
|
NSPR_API(PRStatus) PR_Notify(PRMonitor *mon);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Notify all of the threads waiting on the monitor's condition variable.
|
** Notify all of the threads waiting on the monitor's condition variable.
|
||||||
** All of threads waiting on the condition are scheduled to reenter the
|
** All of threads waiting on the condition are scheduled to reenter the
|
||||||
** monitor.
|
** monitor.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_NotifyAll(PRMonitor *mon);
|
NSPR_API(PRStatus) PR_NotifyAll(PRMonitor *mon);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ typedef struct PRMWaitEnumerator PRMWaitEnumerator;
|
||||||
** PR_INVALID_STATE_ERROR
|
** PR_INVALID_STATE_ERROR
|
||||||
** The group is being destroyed.
|
** The group is being destroyed.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_AddWaitFileDesc(PRWaitGroup *group, PRRecvWait *desc);
|
NSPR_API(PRStatus) PR_AddWaitFileDesc(PRWaitGroup *group, PRRecvWait *desc);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_WaitRecvReady
|
** FUNCTION: PR_WaitRecvReady
|
||||||
|
@ -208,7 +208,7 @@ PR_EXTERN(PRStatus) PR_AddWaitFileDesc(PRWaitGroup *group, PRRecvWait *desc);
|
||||||
** PR_INVALID_STATE_ERROR
|
** PR_INVALID_STATE_ERROR
|
||||||
** The group is being destroyed.
|
** The group is being destroyed.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRRecvWait*) PR_WaitRecvReady(PRWaitGroup *group);
|
NSPR_API(PRRecvWait*) PR_WaitRecvReady(PRWaitGroup *group);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_CancelWaitFileDesc
|
** FUNCTION: PR_CancelWaitFileDesc
|
||||||
|
@ -243,7 +243,7 @@ PR_EXTERN(PRRecvWait*) PR_WaitRecvReady(PRWaitGroup *group);
|
||||||
** PR_INVALID_STATE_ERROR
|
** PR_INVALID_STATE_ERROR
|
||||||
** The group is being destroyed.
|
** The group is being destroyed.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_CancelWaitFileDesc(PRWaitGroup *group, PRRecvWait *desc);
|
NSPR_API(PRStatus) PR_CancelWaitFileDesc(PRWaitGroup *group, PRRecvWait *desc);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_CancelWaitGroup
|
** FUNCTION: PR_CancelWaitGroup
|
||||||
|
@ -270,7 +270,7 @@ PR_EXTERN(PRStatus) PR_CancelWaitFileDesc(PRWaitGroup *group, PRRecvWait *desc);
|
||||||
** PR_INVALID_ARGUMENT_ERROR
|
** PR_INVALID_ARGUMENT_ERROR
|
||||||
** PR_GROUP_EMPTY_ERROR
|
** PR_GROUP_EMPTY_ERROR
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRRecvWait*) PR_CancelWaitGroup(PRWaitGroup *group);
|
NSPR_API(PRRecvWait*) PR_CancelWaitGroup(PRWaitGroup *group);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_CreateWaitGroup
|
** FUNCTION: PR_CreateWaitGroup
|
||||||
|
@ -297,7 +297,7 @@ PR_EXTERN(PRRecvWait*) PR_CancelWaitGroup(PRWaitGroup *group);
|
||||||
** ERRORS
|
** ERRORS
|
||||||
** PR_OUT_OF_MEMORY_ERROR
|
** PR_OUT_OF_MEMORY_ERROR
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRWaitGroup*) PR_CreateWaitGroup(PRInt32 size);
|
NSPR_API(PRWaitGroup*) PR_CreateWaitGroup(PRInt32 size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_DestroyWaitGroup
|
** FUNCTION: PR_DestroyWaitGroup
|
||||||
|
@ -320,7 +320,7 @@ PR_EXTERN(PRWaitGroup*) PR_CreateWaitGroup(PRInt32 size);
|
||||||
** PR_INVALID_STATE_ERROR
|
** PR_INVALID_STATE_ERROR
|
||||||
** The group still contains receive wait objects.
|
** The group still contains receive wait objects.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_DestroyWaitGroup(PRWaitGroup *group);
|
NSPR_API(PRStatus) PR_DestroyWaitGroup(PRWaitGroup *group);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_CreateMWaitEnumerator
|
** FUNCTION: PR_CreateMWaitEnumerator
|
||||||
|
@ -342,7 +342,7 @@ PR_EXTERN(PRStatus) PR_DestroyWaitGroup(PRWaitGroup *group);
|
||||||
** The 'group' argument does not reference a known object.
|
** The 'group' argument does not reference a known object.
|
||||||
** PR_OUT_OF_MEMORY_ERROR
|
** PR_OUT_OF_MEMORY_ERROR
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRMWaitEnumerator*) PR_CreateMWaitEnumerator(PRWaitGroup *group);
|
NSPR_API(PRMWaitEnumerator*) PR_CreateMWaitEnumerator(PRWaitGroup *group);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_DestroyMWaitEnumerator
|
** FUNCTION: PR_DestroyMWaitEnumerator
|
||||||
|
@ -360,7 +360,7 @@ PR_EXTERN(PRMWaitEnumerator*) PR_CreateMWaitEnumerator(PRWaitGroup *group);
|
||||||
** PR_INVALID_ARGUMENT_ERROR
|
** PR_INVALID_ARGUMENT_ERROR
|
||||||
** The enumerator is invalid.
|
** The enumerator is invalid.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_DestroyMWaitEnumerator(PRMWaitEnumerator* enumerator);
|
NSPR_API(PRStatus) PR_DestroyMWaitEnumerator(PRMWaitEnumerator* enumerator);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** FUNCTION: PR_EnumerateWaitGroup
|
** FUNCTION: PR_EnumerateWaitGroup
|
||||||
|
@ -383,7 +383,7 @@ PR_EXTERN(PRStatus) PR_DestroyMWaitEnumerator(PRMWaitEnumerator* enumerator);
|
||||||
** An enumeration may be abandoned at any time. The runtime is not
|
** An enumeration may be abandoned at any time. The runtime is not
|
||||||
** keeping any state, so there are no issues in that regard.
|
** keeping any state, so there are no issues in that regard.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRRecvWait*) PR_EnumerateWaitGroup(
|
NSPR_API(PRRecvWait*) PR_EnumerateWaitGroup(
|
||||||
PRMWaitEnumerator *enumerator, const PRRecvWait *previous);
|
PRMWaitEnumerator *enumerator, const PRRecvWait *previous);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
|
@ -30,10 +30,10 @@ PR_BEGIN_EXTERN_C
|
||||||
* Translate an Internet address to/from a character string
|
* Translate an Internet address to/from a character string
|
||||||
*********************************************************************
|
*********************************************************************
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_StringToNetAddr(
|
NSPR_API(PRStatus) PR_StringToNetAddr(
|
||||||
const char *string, PRNetAddr *addr);
|
const char *string, PRNetAddr *addr);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_NetAddrToString(
|
NSPR_API(PRStatus) PR_NetAddrToString(
|
||||||
const PRNetAddr *addr, char *string, PRUint32 size);
|
const PRNetAddr *addr, char *string, PRUint32 size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -87,7 +87,7 @@ typedef struct PRHostEnt {
|
||||||
** the result will be PR_FAILURE and the reason
|
** the result will be PR_FAILURE and the reason
|
||||||
** for the failure can be retrieved by PR_GetError().
|
** for the failure can be retrieved by PR_GetError().
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRStatus) PR_GetHostByName(
|
NSPR_API(PRStatus) PR_GetHostByName(
|
||||||
const char *hostname, char *buf, PRIntn bufsize, PRHostEnt *hostentry);
|
const char *hostname, char *buf, PRIntn bufsize, PRHostEnt *hostentry);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -125,7 +125,7 @@ PR_EXTERN(PRStatus) PR_GetHostByName(
|
||||||
*/
|
*/
|
||||||
#define PR_AI_DEFAULT 0x30
|
#define PR_AI_DEFAULT 0x30
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_GetIPNodeByName(
|
NSPR_API(PRStatus) PR_GetIPNodeByName(
|
||||||
const char *hostname,
|
const char *hostname,
|
||||||
PRUint16 af,
|
PRUint16 af,
|
||||||
PRIntn flags,
|
PRIntn flags,
|
||||||
|
@ -154,7 +154,7 @@ PR_EXTERN(PRStatus) PR_GetIPNodeByName(
|
||||||
** the result will be PR_FAILURE and the reason
|
** the result will be PR_FAILURE and the reason
|
||||||
** for the failure can be retrieved by PR_GetError().
|
** for the failure can be retrieved by PR_GetError().
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRStatus) PR_GetHostByAddr(
|
NSPR_API(PRStatus) PR_GetHostByAddr(
|
||||||
const PRNetAddr *hostaddr, char *buf, PRIntn bufsize, PRHostEnt *hostentry);
|
const PRNetAddr *hostaddr, char *buf, PRIntn bufsize, PRHostEnt *hostentry);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -188,7 +188,7 @@ PR_EXTERN(PRStatus) PR_GetHostByAddr(
|
||||||
** has failed. The reason for the failure can be
|
** has failed. The reason for the failure can be
|
||||||
** retrieved by calling PR_GetError().
|
** retrieved by calling PR_GetError().
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRIntn) PR_EnumerateHostEnt(
|
NSPR_API(PRIntn) PR_EnumerateHostEnt(
|
||||||
PRIntn enumIndex, const PRHostEnt *hostEnt, PRUint16 port, PRNetAddr *address);
|
PRIntn enumIndex, const PRHostEnt *hostEnt, PRUint16 port, PRNetAddr *address);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -220,7 +220,7 @@ typedef enum PRNetAddrValue
|
||||||
PR_IpAddrLoopback /* assign logical INADDR_LOOPBACK */
|
PR_IpAddrLoopback /* assign logical INADDR_LOOPBACK */
|
||||||
} PRNetAddrValue;
|
} PRNetAddrValue;
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_InitializeNetAddr(
|
NSPR_API(PRStatus) PR_InitializeNetAddr(
|
||||||
PRNetAddrValue val, PRUint16 port, PRNetAddr *addr);
|
PRNetAddrValue val, PRUint16 port, PRNetAddr *addr);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -248,7 +248,7 @@ PR_EXTERN(PRStatus) PR_InitializeNetAddr(
|
||||||
** reason for the failure can be retrieved by calling
|
** reason for the failure can be retrieved by calling
|
||||||
** PR_GetError();
|
** PR_GetError();
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRStatus) PR_SetNetAddr(
|
NSPR_API(PRStatus) PR_SetNetAddr(
|
||||||
PRNetAddrValue val, PRUint16 af, PRUint16 port, PRNetAddr *addr);
|
PRNetAddrValue val, PRUint16 af, PRUint16 port, PRNetAddr *addr);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -264,7 +264,7 @@ PR_EXTERN(PRStatus) PR_SetNetAddr(
|
||||||
** PRBool PR_TRUE if the network address is of the
|
** PRBool PR_TRUE if the network address is of the
|
||||||
** specified type, else PR_FALSE.
|
** specified type, else PR_FALSE.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRBool) PR_IsNetAddrType(const PRNetAddr *addr, PRNetAddrValue val);
|
NSPR_API(PRBool) PR_IsNetAddrType(const PRNetAddr *addr, PRNetAddrValue val);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** MACRO:
|
** MACRO:
|
||||||
|
@ -329,7 +329,7 @@ typedef struct PRProtoEnt {
|
||||||
#endif
|
#endif
|
||||||
} PRProtoEnt;
|
} PRProtoEnt;
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_GetProtoByName(
|
NSPR_API(PRStatus) PR_GetProtoByName(
|
||||||
const char* protocolname, char* buffer, PRInt32 bufsize, PRProtoEnt* result);
|
const char* protocolname, char* buffer, PRInt32 bufsize, PRProtoEnt* result);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -354,7 +354,7 @@ PR_EXTERN(PRStatus) PR_GetProtoByName(
|
||||||
** the result will be PR_FAILURE and the reason
|
** the result will be PR_FAILURE and the reason
|
||||||
** for the failure can be retrieved by PR_GetError().
|
** for the failure can be retrieved by PR_GetError().
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRStatus) PR_GetProtoByNumber(
|
NSPR_API(PRStatus) PR_GetProtoByNumber(
|
||||||
PRInt32 protocolnumber, char* buffer, PRInt32 bufsize, PRProtoEnt* result);
|
PRInt32 protocolnumber, char* buffer, PRInt32 bufsize, PRProtoEnt* result);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -377,7 +377,7 @@ PR_EXTERN(PRStatus) PR_GetProtoByNumber(
|
||||||
** protocol is not supported
|
** protocol is not supported
|
||||||
** (PR_PROTOCOL_NOT_SUPPORTED_ERROR)
|
** (PR_PROTOCOL_NOT_SUPPORTED_ERROR)
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRStatus) PR_SetIPv6Enable(PRBool itIs);
|
NSPR_API(PRStatus) PR_SetIPv6Enable(PRBool itIs);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTIONS: PR_ntohs, PR_ntohl, PR_ntohll, PR_htons, PR_htonl, PR_htonll
|
** FUNCTIONS: PR_ntohs, PR_ntohl, PR_ntohll, PR_htons, PR_htonl, PR_htonll
|
||||||
|
@ -392,12 +392,12 @@ PR_EXTERN(PRStatus) PR_SetIPv6Enable(PRBool itIs);
|
||||||
** PR_ntonll 64 bit conversion from host to network
|
** PR_ntonll 64 bit conversion from host to network
|
||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRUint16) PR_ntohs(PRUint16);
|
NSPR_API(PRUint16) PR_ntohs(PRUint16);
|
||||||
PR_EXTERN(PRUint32) PR_ntohl(PRUint32);
|
NSPR_API(PRUint32) PR_ntohl(PRUint32);
|
||||||
PR_EXTERN(PRUint64) PR_ntohll(PRUint64);
|
NSPR_API(PRUint64) PR_ntohll(PRUint64);
|
||||||
PR_EXTERN(PRUint16) PR_htons(PRUint16);
|
NSPR_API(PRUint16) PR_htons(PRUint16);
|
||||||
PR_EXTERN(PRUint32) PR_htonl(PRUint32);
|
NSPR_API(PRUint32) PR_htonl(PRUint32);
|
||||||
PR_EXTERN(PRUint64) PR_htonll(PRUint64);
|
NSPR_API(PRUint64) PR_htonll(PRUint64);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_FamilyInet
|
** FUNCTION: PR_FamilyInet
|
||||||
|
@ -405,7 +405,7 @@ PR_EXTERN(PRUint64) PR_htonll(PRUint64);
|
||||||
** DESCRIPTION: Routine to get value of address family for Internet Protocol
|
** DESCRIPTION: Routine to get value of address family for Internet Protocol
|
||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRUint16) PR_FamilyInet(void);
|
NSPR_API(PRUint16) PR_FamilyInet(void);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ typedef void * PROrderedLock;
|
||||||
#define PR_CREATE_ORDERED_LOCK(order,name)\
|
#define PR_CREATE_ORDERED_LOCK(order,name)\
|
||||||
PR_CreateOrderedLock((order),(name))
|
PR_CreateOrderedLock((order),(name))
|
||||||
|
|
||||||
PR_EXTERN(PROrderedLock *)
|
NSPR_API(PROrderedLock *)
|
||||||
PR_CreateOrderedLock(
|
PR_CreateOrderedLock(
|
||||||
PRInt32 order,
|
PRInt32 order,
|
||||||
const char *name
|
const char *name
|
||||||
|
@ -108,7 +108,7 @@ PR_EXTERN(PROrderedLock *)
|
||||||
*/
|
*/
|
||||||
#define PR_DESTROY_ORDERED_LOCK(lock) PR_DestroyOrderedLock((lock))
|
#define PR_DESTROY_ORDERED_LOCK(lock) PR_DestroyOrderedLock((lock))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_DestroyOrderedLock(
|
PR_DestroyOrderedLock(
|
||||||
PROrderedLock *lock
|
PROrderedLock *lock
|
||||||
);
|
);
|
||||||
|
@ -132,7 +132,7 @@ PR_EXTERN(void)
|
||||||
*/
|
*/
|
||||||
#define PR_LOCK_ORDERED_LOCK(lock) PR_LockOrderedLock((lock))
|
#define PR_LOCK_ORDERED_LOCK(lock) PR_LockOrderedLock((lock))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_LockOrderedLock(
|
PR_LockOrderedLock(
|
||||||
PROrderedLock *lock
|
PROrderedLock *lock
|
||||||
);
|
);
|
||||||
|
@ -156,7 +156,7 @@ PR_EXTERN(void)
|
||||||
*/
|
*/
|
||||||
#define PR_UNLOCK_ORDERED_LOCK(lock) PR_UnlockOrderedLock((lock))
|
#define PR_UNLOCK_ORDERED_LOCK(lock) PR_UnlockOrderedLock((lock))
|
||||||
|
|
||||||
PR_EXTERN(PRStatus)
|
NSPR_API(PRStatus)
|
||||||
PR_UnlockOrderedLock(
|
PR_UnlockOrderedLock(
|
||||||
PROrderedLock *lock
|
PROrderedLock *lock
|
||||||
);
|
);
|
||||||
|
|
|
@ -43,7 +43,7 @@ PR_BEGIN_EXTERN_C
|
||||||
** already held, by another thread or this thread, the
|
** already held, by another thread or this thread, the
|
||||||
** result will be PR_FAILURE.
|
** result will be PR_FAILURE.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PRP_TryLock(PRLock *lock);
|
NSPR_API(PRStatus) PRP_TryLock(PRLock *lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Create a naked condition variable
|
** Create a naked condition variable
|
||||||
|
@ -53,14 +53,14 @@ PR_EXTERN(PRStatus) PRP_TryLock(PRLock *lock);
|
||||||
** that may be used in the subsequent "naked" condition variable
|
** that may be used in the subsequent "naked" condition variable
|
||||||
** operations (see PRP_NakedWait, PRP_NakedNotify, PRP_NakedBroadcast);
|
** operations (see PRP_NakedWait, PRP_NakedNotify, PRP_NakedBroadcast);
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRCondVar*) PRP_NewNakedCondVar(void);
|
NSPR_API(PRCondVar*) PRP_NewNakedCondVar(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Destroy a naked condition variable
|
** Destroy a naked condition variable
|
||||||
**
|
**
|
||||||
** Destroy the condition variable created by PR_NewNakedCondVar.
|
** Destroy the condition variable created by PR_NewNakedCondVar.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PRP_DestroyNakedCondVar(PRCondVar *cvar);
|
NSPR_API(void) PRP_DestroyNakedCondVar(PRCondVar *cvar);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Wait on a condition
|
** Wait on a condition
|
||||||
|
@ -73,7 +73,7 @@ PR_EXTERN(void) PRP_DestroyNakedCondVar(PRCondVar *cvar);
|
||||||
**
|
**
|
||||||
** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar.
|
** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PRP_NakedWait(
|
NSPR_API(PRStatus) PRP_NakedWait(
|
||||||
PRCondVar *cvar, PRLock *lock, PRIntervalTime timeout);
|
PRCondVar *cvar, PRLock *lock, PRIntervalTime timeout);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -83,7 +83,7 @@ PR_EXTERN(PRStatus) PRP_NakedWait(
|
||||||
**
|
**
|
||||||
** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar.
|
** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PRP_NakedNotify(PRCondVar *cvar);
|
NSPR_API(PRStatus) PRP_NakedNotify(PRCondVar *cvar);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Notify all threads waiting on a condition
|
** Notify all threads waiting on a condition
|
||||||
|
@ -92,7 +92,7 @@ PR_EXTERN(PRStatus) PRP_NakedNotify(PRCondVar *cvar);
|
||||||
**
|
**
|
||||||
** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar.
|
** NB: The CV ('cvar') must be one created using PR_NewNakedCondVar.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PRP_NakedBroadcast(PRCondVar *cvar);
|
NSPR_API(PRStatus) PRP_NakedBroadcast(PRCondVar *cvar);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -47,19 +47,19 @@ PR_BEGIN_EXTERN_C
|
||||||
** of the buffer. Returns the length of the written output, NOT including
|
** of the buffer. Returns the length of the written output, NOT including
|
||||||
** the NUL, or (PRUint32)-1 if an error occurs.
|
** the NUL, or (PRUint32)-1 if an error occurs.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRUint32) PR_snprintf(char *out, PRUint32 outlen, const char *fmt, ...);
|
NSPR_API(PRUint32) PR_snprintf(char *out, PRUint32 outlen, const char *fmt, ...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** sprintf into a PR_MALLOC'd buffer. Return a pointer to the malloc'd
|
** sprintf into a PR_MALLOC'd buffer. Return a pointer to the malloc'd
|
||||||
** buffer on success, NULL on failure. Call "PR_smprintf_free" to release
|
** buffer on success, NULL on failure. Call "PR_smprintf_free" to release
|
||||||
** the memory returned.
|
** the memory returned.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(char*) PR_smprintf(const char *fmt, ...);
|
NSPR_API(char*) PR_smprintf(const char *fmt, ...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Free the memory allocated, for the caller, by PR_smprintf
|
** Free the memory allocated, for the caller, by PR_smprintf
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_smprintf_free(char *mem);
|
NSPR_API(void) PR_smprintf_free(char *mem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** "append" sprintf into a PR_MALLOC'd buffer. "last" is the last value of
|
** "append" sprintf into a PR_MALLOC'd buffer. "last" is the last value of
|
||||||
|
@ -68,7 +68,7 @@ PR_EXTERN(void) PR_smprintf_free(char *mem);
|
||||||
** will allocate the initial string. The return value is the new value of
|
** will allocate the initial string. The return value is the new value of
|
||||||
** last for subsequent calls, or NULL if there is a malloc failure.
|
** last for subsequent calls, or NULL if there is a malloc failure.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(char*) PR_sprintf_append(char *last, const char *fmt, ...);
|
NSPR_API(char*) PR_sprintf_append(char *last, const char *fmt, ...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** sprintf into a function. The function "f" is called with a string to
|
** sprintf into a function. The function "f" is called with a string to
|
||||||
|
@ -79,21 +79,21 @@ PR_EXTERN(char*) PR_sprintf_append(char *last, const char *fmt, ...);
|
||||||
*/
|
*/
|
||||||
typedef PRIntn (*PRStuffFunc)(void *arg, const char *s, PRUint32 slen);
|
typedef PRIntn (*PRStuffFunc)(void *arg, const char *s, PRUint32 slen);
|
||||||
|
|
||||||
PR_EXTERN(PRUint32) PR_sxprintf(PRStuffFunc f, void *arg, const char *fmt, ...);
|
NSPR_API(PRUint32) PR_sxprintf(PRStuffFunc f, void *arg, const char *fmt, ...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** fprintf to a PRFileDesc
|
** fprintf to a PRFileDesc
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRUint32) PR_fprintf(struct PRFileDesc* fd, const char *fmt, ...);
|
NSPR_API(PRUint32) PR_fprintf(struct PRFileDesc* fd, const char *fmt, ...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** va_list forms of the above.
|
** va_list forms of the above.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRUint32) PR_vsnprintf(char *out, PRUint32 outlen, const char *fmt, va_list ap);
|
NSPR_API(PRUint32) PR_vsnprintf(char *out, PRUint32 outlen, const char *fmt, va_list ap);
|
||||||
PR_EXTERN(char*) PR_vsmprintf(const char *fmt, va_list ap);
|
NSPR_API(char*) PR_vsmprintf(const char *fmt, va_list ap);
|
||||||
PR_EXTERN(char*) PR_vsprintf_append(char *last, const char *fmt, va_list ap);
|
NSPR_API(char*) PR_vsprintf_append(char *last, const char *fmt, va_list ap);
|
||||||
PR_EXTERN(PRUint32) PR_vsxprintf(PRStuffFunc f, void *arg, const char *fmt, va_list ap);
|
NSPR_API(PRUint32) PR_vsxprintf(PRStuffFunc f, void *arg, const char *fmt, va_list ap);
|
||||||
PR_EXTERN(PRUint32) PR_vfprintf(struct PRFileDesc* fd, const char *fmt, va_list ap);
|
NSPR_API(PRUint32) PR_vfprintf(struct PRFileDesc* fd, const char *fmt, va_list ap);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
|
@ -128,7 +128,7 @@ PR_EXTERN(PRUint32) PR_vfprintf(struct PRFileDesc* fd, const char *fmt, va_list
|
||||||
***************************************************************************
|
***************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRInt32) PR_sscanf(const char *buf, const char *fmt, ...);
|
NSPR_API(PRInt32) PR_sscanf(const char *buf, const char *fmt, ...);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -31,13 +31,13 @@ PR_BEGIN_EXTERN_C
|
||||||
typedef struct PRProcess PRProcess;
|
typedef struct PRProcess PRProcess;
|
||||||
typedef struct PRProcessAttr PRProcessAttr;
|
typedef struct PRProcessAttr PRProcessAttr;
|
||||||
|
|
||||||
PR_EXTERN(PRProcessAttr *) PR_NewProcessAttr(void);
|
NSPR_API(PRProcessAttr *) PR_NewProcessAttr(void);
|
||||||
|
|
||||||
PR_EXTERN(void) PR_ResetProcessAttr(PRProcessAttr *attr);
|
NSPR_API(void) PR_ResetProcessAttr(PRProcessAttr *attr);
|
||||||
|
|
||||||
PR_EXTERN(void) PR_DestroyProcessAttr(PRProcessAttr *attr);
|
NSPR_API(void) PR_DestroyProcessAttr(PRProcessAttr *attr);
|
||||||
|
|
||||||
PR_EXTERN(void) PR_ProcessAttrSetStdioRedirect(
|
NSPR_API(void) PR_ProcessAttrSetStdioRedirect(
|
||||||
PRProcessAttr *attr,
|
PRProcessAttr *attr,
|
||||||
PRSpecialFD stdioFd,
|
PRSpecialFD stdioFd,
|
||||||
PRFileDesc *redirectFd
|
PRFileDesc *redirectFd
|
||||||
|
@ -46,18 +46,18 @@ PR_EXTERN(void) PR_ProcessAttrSetStdioRedirect(
|
||||||
/*
|
/*
|
||||||
* OBSOLETE -- use PR_ProcessAttrSetStdioRedirect instead.
|
* OBSOLETE -- use PR_ProcessAttrSetStdioRedirect instead.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_SetStdioRedirect(
|
NSPR_API(void) PR_SetStdioRedirect(
|
||||||
PRProcessAttr *attr,
|
PRProcessAttr *attr,
|
||||||
PRSpecialFD stdioFd,
|
PRSpecialFD stdioFd,
|
||||||
PRFileDesc *redirectFd
|
PRFileDesc *redirectFd
|
||||||
);
|
);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_ProcessAttrSetCurrentDirectory(
|
NSPR_API(PRStatus) PR_ProcessAttrSetCurrentDirectory(
|
||||||
PRProcessAttr *attr,
|
PRProcessAttr *attr,
|
||||||
const char *dir
|
const char *dir
|
||||||
);
|
);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_ProcessAttrSetInheritableFD(
|
NSPR_API(PRStatus) PR_ProcessAttrSetInheritableFD(
|
||||||
PRProcessAttr *attr,
|
PRProcessAttr *attr,
|
||||||
PRFileDesc *fd,
|
PRFileDesc *fd,
|
||||||
const char *name
|
const char *name
|
||||||
|
@ -76,23 +76,23 @@ PR_EXTERN(PRStatus) PR_ProcessAttrSetInheritableFD(
|
||||||
** termination using PR_WaitProcess().
|
** termination using PR_WaitProcess().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRProcess*) PR_CreateProcess(
|
NSPR_API(PRProcess*) PR_CreateProcess(
|
||||||
const char *path,
|
const char *path,
|
||||||
char *const *argv,
|
char *const *argv,
|
||||||
char *const *envp,
|
char *const *envp,
|
||||||
const PRProcessAttr *attr);
|
const PRProcessAttr *attr);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_CreateProcessDetached(
|
NSPR_API(PRStatus) PR_CreateProcessDetached(
|
||||||
const char *path,
|
const char *path,
|
||||||
char *const *argv,
|
char *const *argv,
|
||||||
char *const *envp,
|
char *const *envp,
|
||||||
const PRProcessAttr *attr);
|
const PRProcessAttr *attr);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_DetachProcess(PRProcess *process);
|
NSPR_API(PRStatus) PR_DetachProcess(PRProcess *process);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_WaitProcess(PRProcess *process, PRInt32 *exitCode);
|
NSPR_API(PRStatus) PR_WaitProcess(PRProcess *process, PRInt32 *exitCode);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_KillProcess(PRProcess *process);
|
NSPR_API(PRStatus) PR_KillProcess(PRProcess *process);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ PR_BEGIN_EXTERN_C
|
||||||
** code. Clinton: FOAD.
|
** code. Clinton: FOAD.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRSize) PR_GetRandomNoise(
|
NSPR_API(PRSize) PR_GetRandomNoise(
|
||||||
void *buf,
|
void *buf,
|
||||||
PRSize size
|
PRSize size
|
||||||
);
|
);
|
||||||
|
|
|
@ -54,7 +54,7 @@ typedef struct PRRWLock PRRWLock;
|
||||||
** is returned.
|
** is returned.
|
||||||
**
|
**
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(PRRWLock*) PR_NewRWLock(PRUint32 lock_rank, const char *lock_name);
|
NSPR_API(PRRWLock*) PR_NewRWLock(PRUint32 lock_rank, const char *lock_name);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_DestroyRWLock
|
** FUNCTION: PR_DestroyRWLock
|
||||||
|
@ -64,7 +64,7 @@ PR_EXTERN(PRRWLock*) PR_NewRWLock(PRUint32 lock_rank, const char *lock_name);
|
||||||
** OUTPUTS: void
|
** OUTPUTS: void
|
||||||
** RETURN: None
|
** RETURN: None
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(void) PR_DestroyRWLock(PRRWLock *lock);
|
NSPR_API(void) PR_DestroyRWLock(PRRWLock *lock);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_RWLock_Rlock
|
** FUNCTION: PR_RWLock_Rlock
|
||||||
|
@ -74,7 +74,7 @@ PR_EXTERN(void) PR_DestroyRWLock(PRRWLock *lock);
|
||||||
** OUTPUTS: void
|
** OUTPUTS: void
|
||||||
** RETURN: None
|
** RETURN: None
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(void) PR_RWLock_Rlock(PRRWLock *lock);
|
NSPR_API(void) PR_RWLock_Rlock(PRRWLock *lock);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_RWLock_Wlock
|
** FUNCTION: PR_RWLock_Wlock
|
||||||
|
@ -84,7 +84,7 @@ PR_EXTERN(void) PR_RWLock_Rlock(PRRWLock *lock);
|
||||||
** OUTPUTS: void
|
** OUTPUTS: void
|
||||||
** RETURN: None
|
** RETURN: None
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(void) PR_RWLock_Wlock(PRRWLock *lock);
|
NSPR_API(void) PR_RWLock_Wlock(PRRWLock *lock);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
** FUNCTION: PR_RWLock_Unlock
|
** FUNCTION: PR_RWLock_Unlock
|
||||||
|
@ -94,7 +94,7 @@ PR_EXTERN(void) PR_RWLock_Wlock(PRRWLock *lock);
|
||||||
** OUTPUTS: void
|
** OUTPUTS: void
|
||||||
** RETURN: void
|
** RETURN: void
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
PR_EXTERN(void) PR_RWLock_Unlock(PRRWLock *lock);
|
NSPR_API(void) PR_RWLock_Unlock(PRRWLock *lock);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@ typedef struct PRSharedMemory PRSharedMemory;
|
||||||
** retrieved via PR_GetError() and PR_GetOSError();
|
** retrieved via PR_GetError() and PR_GetOSError();
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN( PRSharedMemory * )
|
NSPR_API( PRSharedMemory * )
|
||||||
PR_OpenSharedMemory(
|
PR_OpenSharedMemory(
|
||||||
const char *name,
|
const char *name,
|
||||||
PRSize size,
|
PRSize size,
|
||||||
|
@ -190,7 +190,7 @@ PR_EXTERN( PRSharedMemory * )
|
||||||
**
|
**
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN( void * )
|
NSPR_API( void * )
|
||||||
PR_AttachSharedMemory(
|
PR_AttachSharedMemory(
|
||||||
PRSharedMemory *shm,
|
PRSharedMemory *shm,
|
||||||
PRIntn flags
|
PRIntn flags
|
||||||
|
@ -216,7 +216,7 @@ PR_EXTERN( void * )
|
||||||
** RETURNS: PRStatus
|
** RETURNS: PRStatus
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN( PRStatus )
|
NSPR_API( PRStatus )
|
||||||
PR_DetachSharedMemory(
|
PR_DetachSharedMemory(
|
||||||
PRSharedMemory *shm,
|
PRSharedMemory *shm,
|
||||||
void *addr
|
void *addr
|
||||||
|
@ -238,7 +238,7 @@ PR_EXTERN( PRStatus )
|
||||||
** RETURNS: PRStatus
|
** RETURNS: PRStatus
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN( PRStatus )
|
NSPR_API( PRStatus )
|
||||||
PR_CloseSharedMemory(
|
PR_CloseSharedMemory(
|
||||||
PRSharedMemory *shm
|
PRSharedMemory *shm
|
||||||
);
|
);
|
||||||
|
@ -259,7 +259,7 @@ PR_EXTERN( PRStatus )
|
||||||
** RETURNS: PRStatus
|
** RETURNS: PRStatus
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN( PRStatus )
|
NSPR_API( PRStatus )
|
||||||
PR_DeleteSharedMemory(
|
PR_DeleteSharedMemory(
|
||||||
const char *name
|
const char *name
|
||||||
);
|
);
|
||||||
|
|
|
@ -144,7 +144,7 @@ PR_BEGIN_EXTERN_C
|
||||||
** Pointer to PRFileMap or NULL on error.
|
** Pointer to PRFileMap or NULL on error.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN( PRFileMap *)
|
NSPR_API( PRFileMap *)
|
||||||
PR_OpenAnonFileMap(
|
PR_OpenAnonFileMap(
|
||||||
const char *dirName,
|
const char *dirName,
|
||||||
PRSize size,
|
PRSize size,
|
||||||
|
@ -172,7 +172,7 @@ PR_OpenAnonFileMap(
|
||||||
** PRStatus
|
** PRStatus
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus)
|
NSPR_API(PRStatus)
|
||||||
PR_ProcessAttrSetInheritableFileMap(
|
PR_ProcessAttrSetInheritableFileMap(
|
||||||
PRProcessAttr *attr,
|
PRProcessAttr *attr,
|
||||||
PRFileMap *fm,
|
PRFileMap *fm,
|
||||||
|
@ -197,7 +197,7 @@ PR_ProcessAttrSetInheritableFileMap(
|
||||||
** PRFileMap pointer or NULL.
|
** PRFileMap pointer or NULL.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN( PRFileMap *)
|
NSPR_API( PRFileMap *)
|
||||||
PR_GetInheritedFileMap(
|
PR_GetInheritedFileMap(
|
||||||
const char *shmname
|
const char *shmname
|
||||||
);
|
);
|
||||||
|
@ -221,7 +221,7 @@ PR_GetInheritedFileMap(
|
||||||
** PRStatus
|
** PRStatus
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN( PRStatus )
|
NSPR_API( PRStatus )
|
||||||
PR_ExportFileMapAsString(
|
PR_ExportFileMapAsString(
|
||||||
PRFileMap *fm,
|
PRFileMap *fm,
|
||||||
PRSize bufsize,
|
PRSize bufsize,
|
||||||
|
@ -243,7 +243,7 @@ PR_ExportFileMapAsString(
|
||||||
** PRFileMap pointer or NULL.
|
** PRFileMap pointer or NULL.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN( PRFileMap * )
|
NSPR_API( PRFileMap * )
|
||||||
PR_ImportFileMapFromString(
|
PR_ImportFileMapFromString(
|
||||||
const char *fmstring
|
const char *fmstring
|
||||||
);
|
);
|
||||||
|
|
|
@ -32,14 +32,14 @@ PR_BEGIN_EXTERN_C
|
||||||
** [<sep><root_component><sep>]*(<component><sep>)<leaf_name>
|
** [<sep><root_component><sep>]*(<component><sep>)<leaf_name>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(char) PR_GetDirectorySeparator(void);
|
NSPR_API(char) PR_GetDirectorySeparator(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** OBSOLETE -- the function name is misspelled.
|
** OBSOLETE -- the function name is misspelled.
|
||||||
** Use PR_GetDirectorySeparator instead.
|
** Use PR_GetDirectorySeparator instead.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(char) PR_GetDirectorySepartor(void);
|
NSPR_API(char) PR_GetDirectorySepartor(void);
|
||||||
|
|
||||||
|
|
||||||
/* Types of information available via PR_GetSystemInfo(...) */
|
/* Types of information available via PR_GetSystemInfo(...) */
|
||||||
|
@ -62,17 +62,17 @@ typedef enum {
|
||||||
|
|
||||||
#define SYS_INFO_BUFFER_LENGTH 256
|
#define SYS_INFO_BUFFER_LENGTH 256
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_GetSystemInfo(PRSysInfo cmd, char *buf, PRUint32 buflen);
|
NSPR_API(PRStatus) PR_GetSystemInfo(PRSysInfo cmd, char *buf, PRUint32 buflen);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return the number of bytes in a page
|
** Return the number of bytes in a page
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_GetPageSize(void);
|
NSPR_API(PRInt32) PR_GetPageSize(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return log2 of the size of a page
|
** Return log2 of the size of a page
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRInt32) PR_GetPageShift(void);
|
NSPR_API(PRInt32) PR_GetPageShift(void);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ typedef enum PRThreadPriority
|
||||||
** When the start function returns the thread exits. If it is the last
|
** When the start function returns the thread exits. If it is the last
|
||||||
** PR_USER_THREAD to exit then the process exits.
|
** PR_USER_THREAD to exit then the process exits.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRThread*) PR_CreateThread(PRThreadType type,
|
NSPR_API(PRThread*) PR_CreateThread(PRThreadType type,
|
||||||
void (*start)(void *arg),
|
void (*start)(void *arg),
|
||||||
void *arg,
|
void *arg,
|
||||||
PRThreadPriority priority,
|
PRThreadPriority priority,
|
||||||
|
@ -136,24 +136,24 @@ PR_EXTERN(PRThread*) PR_CreateThread(PRThreadType type,
|
||||||
** The calling thread will not be blocked if the target thread has already
|
** The calling thread will not be blocked if the target thread has already
|
||||||
** terminated.
|
** terminated.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_JoinThread(PRThread *thread);
|
NSPR_API(PRStatus) PR_JoinThread(PRThread *thread);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return the current thread object for the currently running code.
|
** Return the current thread object for the currently running code.
|
||||||
** Never returns NULL.
|
** Never returns NULL.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRThread*) PR_GetCurrentThread(void);
|
NSPR_API(PRThread*) PR_GetCurrentThread(void);
|
||||||
#define PR_CurrentThread() PR_GetCurrentThread() /* for nspr1.0 compat. */
|
#define PR_CurrentThread() PR_GetCurrentThread() /* for nspr1.0 compat. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Get the priority of "thread".
|
** Get the priority of "thread".
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRThreadPriority) PR_GetThreadPriority(const PRThread *thread);
|
NSPR_API(PRThreadPriority) PR_GetThreadPriority(const PRThread *thread);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Change the priority of the "thread" to "priority".
|
** Change the priority of the "thread" to "priority".
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority);
|
NSPR_API(void) PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This routine returns a new index for per-thread-private data table.
|
** This routine returns a new index for per-thread-private data table.
|
||||||
|
@ -181,7 +181,7 @@ PR_EXTERN(void) PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority
|
||||||
*/
|
*/
|
||||||
typedef void (PR_CALLBACK *PRThreadPrivateDTOR)(void *priv);
|
typedef void (PR_CALLBACK *PRThreadPrivateDTOR)(void *priv);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_NewThreadPrivateIndex(
|
NSPR_API(PRStatus) PR_NewThreadPrivateIndex(
|
||||||
PRUintn *newIndex, PRThreadPrivateDTOR destructor);
|
PRUintn *newIndex, PRThreadPrivateDTOR destructor);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -195,7 +195,7 @@ PR_EXTERN(PRStatus) PR_NewThreadPrivateIndex(
|
||||||
**
|
**
|
||||||
** This can return PR_FAILURE if the index is invalid.
|
** This can return PR_FAILURE if the index is invalid.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_SetThreadPrivate(PRUintn tpdIndex, void *priv);
|
NSPR_API(PRStatus) PR_SetThreadPrivate(PRUintn tpdIndex, void *priv);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Recover the per-thread-private data for the current thread. "tpdIndex" is
|
** Recover the per-thread-private data for the current thread. "tpdIndex" is
|
||||||
|
@ -206,7 +206,7 @@ PR_EXTERN(PRStatus) PR_SetThreadPrivate(PRUintn tpdIndex, void *priv);
|
||||||
**
|
**
|
||||||
** A thread can only get access to its own thread-specific-data.
|
** A thread can only get access to its own thread-specific-data.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void*) PR_GetThreadPrivate(PRUintn tpdIndex);
|
NSPR_API(void*) PR_GetThreadPrivate(PRUintn tpdIndex);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This routine sets the interrupt request for a target thread. The interrupt
|
** This routine sets the interrupt request for a target thread. The interrupt
|
||||||
|
@ -218,23 +218,23 @@ PR_EXTERN(void*) PR_GetThreadPrivate(PRUintn tpdIndex);
|
||||||
**
|
**
|
||||||
** PR_Interrupt may itself fail if the target thread is invalid.
|
** PR_Interrupt may itself fail if the target thread is invalid.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_Interrupt(PRThread *thread);
|
NSPR_API(PRStatus) PR_Interrupt(PRThread *thread);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Clear the interrupt request for the calling thread. If no such request
|
** Clear the interrupt request for the calling thread. If no such request
|
||||||
** is pending, this operation is a noop.
|
** is pending, this operation is a noop.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_ClearInterrupt(void);
|
NSPR_API(void) PR_ClearInterrupt(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Block the interrupt for the calling thread.
|
** Block the interrupt for the calling thread.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_BlockInterrupt(void);
|
NSPR_API(void) PR_BlockInterrupt(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Unblock the interrupt for the calling thread.
|
** Unblock the interrupt for the calling thread.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_UnblockInterrupt(void);
|
NSPR_API(void) PR_UnblockInterrupt(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Make the current thread sleep until "ticks" time amount of time
|
** Make the current thread sleep until "ticks" time amount of time
|
||||||
|
@ -243,22 +243,22 @@ PR_EXTERN(void) PR_UnblockInterrupt(void);
|
||||||
** equivalent to PR_INTERVAL_NO_TIMEOUT is an error and will result
|
** equivalent to PR_INTERVAL_NO_TIMEOUT is an error and will result
|
||||||
** in a PR_FAILURE error return.
|
** in a PR_FAILURE error return.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRStatus) PR_Sleep(PRIntervalTime ticks);
|
NSPR_API(PRStatus) PR_Sleep(PRIntervalTime ticks);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Get the scoping of this thread.
|
** Get the scoping of this thread.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRThreadScope) PR_GetThreadScope(const PRThread *thread);
|
NSPR_API(PRThreadScope) PR_GetThreadScope(const PRThread *thread);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Get the type of this thread.
|
** Get the type of this thread.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRThreadType) PR_GetThreadType(const PRThread *thread);
|
NSPR_API(PRThreadType) PR_GetThreadType(const PRThread *thread);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Get the join state of this thread.
|
** Get the join state of this thread.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRThreadState) PR_GetThreadState(const PRThread *thread);
|
NSPR_API(PRThreadState) PR_GetThreadState(const PRThread *thread);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,7 @@ typedef PRTimeParameters (PR_CALLBACK_DECL *PRTimeParamFn)(const PRExplodedTime
|
||||||
#if defined(HAVE_WATCOM_BUG_2)
|
#if defined(HAVE_WATCOM_BUG_2)
|
||||||
PRTime __pascal __export __loadds
|
PRTime __pascal __export __loadds
|
||||||
#else
|
#else
|
||||||
PR_EXTERN(PRTime)
|
NSPR_API(PRTime)
|
||||||
#endif
|
#endif
|
||||||
PR_Now(void);
|
PR_Now(void);
|
||||||
|
|
||||||
|
@ -172,14 +172,14 @@ PR_Now(void);
|
||||||
* as PRExplodedTime.
|
* as PRExplodedTime.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(void) PR_ExplodeTime(
|
NSPR_API(void) PR_ExplodeTime(
|
||||||
PRTime usecs, PRTimeParamFn params, PRExplodedTime *exploded);
|
PRTime usecs, PRTimeParamFn params, PRExplodedTime *exploded);
|
||||||
|
|
||||||
/* Reverse operation of PR_ExplodeTime */
|
/* Reverse operation of PR_ExplodeTime */
|
||||||
#if defined(HAVE_WATCOM_BUG_2)
|
#if defined(HAVE_WATCOM_BUG_2)
|
||||||
PRTime __pascal __export __loadds
|
PRTime __pascal __export __loadds
|
||||||
#else
|
#else
|
||||||
PR_EXTERN(PRTime)
|
NSPR_API(PRTime)
|
||||||
#endif
|
#endif
|
||||||
PR_ImplodeTime(const PRExplodedTime *exploded);
|
PR_ImplodeTime(const PRExplodedTime *exploded);
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ PR_ImplodeTime(const PRExplodedTime *exploded);
|
||||||
* should treat them as "read-only".
|
* should treat them as "read-only".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(void) PR_NormalizeTime(
|
NSPR_API(void) PR_NormalizeTime(
|
||||||
PRExplodedTime *exploded, PRTimeParamFn params);
|
PRExplodedTime *exploded, PRTimeParamFn params);
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
@ -203,16 +203,16 @@ PR_EXTERN(void) PR_NormalizeTime(
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
/* Time parameters that suit current host machine */
|
/* Time parameters that suit current host machine */
|
||||||
PR_EXTERN(PRTimeParameters) PR_LocalTimeParameters(const PRExplodedTime *gmt);
|
NSPR_API(PRTimeParameters) PR_LocalTimeParameters(const PRExplodedTime *gmt);
|
||||||
|
|
||||||
/* Time parameters that represent Greenwich Mean Time */
|
/* Time parameters that represent Greenwich Mean Time */
|
||||||
PR_EXTERN(PRTimeParameters) PR_GMTParameters(const PRExplodedTime *gmt);
|
NSPR_API(PRTimeParameters) PR_GMTParameters(const PRExplodedTime *gmt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Time parameters that represent the US Pacific Time Zone, with the
|
* Time parameters that represent the US Pacific Time Zone, with the
|
||||||
* current daylight saving time rules (for testing only)
|
* current daylight saving time rules (for testing only)
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRTimeParameters) PR_USPacificTimeParameters(const PRExplodedTime *gmt);
|
NSPR_API(PRTimeParameters) PR_USPacificTimeParameters(const PRExplodedTime *gmt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This parses a time/date string into a PRTime
|
* This parses a time/date string into a PRTime
|
||||||
|
@ -245,7 +245,7 @@ PR_EXTERN(PRTimeParameters) PR_USPacificTimeParameters(const PRExplodedTime *gmt
|
||||||
* the time string which you are parsing.
|
* the time string which you are parsing.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PR_EXTERN(PRStatus) PR_ParseTimeString (
|
NSPR_API(PRStatus) PR_ParseTimeString (
|
||||||
const char *string,
|
const char *string,
|
||||||
PRBool default_to_gmt,
|
PRBool default_to_gmt,
|
||||||
PRTime *result);
|
PRTime *result);
|
||||||
|
@ -262,13 +262,13 @@ PR_EXTERN(PRStatus) PR_ParseTimeString (
|
||||||
#ifndef NO_NSPR_10_SUPPORT
|
#ifndef NO_NSPR_10_SUPPORT
|
||||||
|
|
||||||
/* Format a time value into a buffer. Same semantics as strftime() */
|
/* Format a time value into a buffer. Same semantics as strftime() */
|
||||||
PR_EXTERN(PRUint32) PR_FormatTime(char *buf, int buflen, const char *fmt,
|
NSPR_API(PRUint32) PR_FormatTime(char *buf, int buflen, const char *fmt,
|
||||||
const PRExplodedTime *tm);
|
const PRExplodedTime *tm);
|
||||||
|
|
||||||
/* Format a time value into a buffer. Time is always in US English format, regardless
|
/* Format a time value into a buffer. Time is always in US English format, regardless
|
||||||
* of locale setting.
|
* of locale setting.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(PRUint32)
|
NSPR_API(PRUint32)
|
||||||
PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize,
|
PR_FormatTimeUSEnglish( char* buf, PRUint32 bufSize,
|
||||||
const char* format, const PRExplodedTime* tm );
|
const char* format, const PRExplodedTime* tm );
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,7 @@ typedef enum PRTraceOption
|
||||||
#define PR_CREATE_TRACE(handle,qName,rName,description)\
|
#define PR_CREATE_TRACE(handle,qName,rName,description)\
|
||||||
(handle) = PR_CreateTrace((qName),(rName),(description))
|
(handle) = PR_CreateTrace((qName),(rName),(description))
|
||||||
|
|
||||||
PR_EXTERN(PRTraceHandle)
|
NSPR_API(PRTraceHandle)
|
||||||
PR_CreateTrace(
|
PR_CreateTrace(
|
||||||
const char *qName, /* QName for this trace handle */
|
const char *qName, /* QName for this trace handle */
|
||||||
const char *rName, /* RName for this trace handle */
|
const char *rName, /* RName for this trace handle */
|
||||||
|
@ -209,7 +209,7 @@ PR_EXTERN(PRTraceHandle)
|
||||||
#define PR_DESTROY_TRACE(handle)\
|
#define PR_DESTROY_TRACE(handle)\
|
||||||
PR_DestroyTrace((handle))
|
PR_DestroyTrace((handle))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_DestroyTrace(
|
PR_DestroyTrace(
|
||||||
PRTraceHandle handle /* Handle to be destroyed */
|
PRTraceHandle handle /* Handle to be destroyed */
|
||||||
);
|
);
|
||||||
|
@ -246,7 +246,7 @@ PR_EXTERN(void)
|
||||||
#define PR_TRACE(handle,ud0,ud1,ud2,ud3,ud4,ud5,ud6,ud7)\
|
#define PR_TRACE(handle,ud0,ud1,ud2,ud3,ud4,ud5,ud6,ud7)\
|
||||||
PR_Trace((handle),(ud0),(ud1),(ud2),(ud3),(ud4),(ud5),(ud6),(ud7))
|
PR_Trace((handle),(ud0),(ud1),(ud2),(ud3),(ud4),(ud5),(ud6),(ud7))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_Trace(
|
PR_Trace(
|
||||||
PRTraceHandle handle, /* use this trace handle */
|
PRTraceHandle handle, /* use this trace handle */
|
||||||
PRUint32 userData0, /* User supplied data word 0 */
|
PRUint32 userData0, /* User supplied data word 0 */
|
||||||
|
@ -329,7 +329,7 @@ PR_EXTERN(void)
|
||||||
#define PR_SET_TRACE_OPTION(command,value)\
|
#define PR_SET_TRACE_OPTION(command,value)\
|
||||||
PR_SetTraceOption((command),(value))
|
PR_SetTraceOption((command),(value))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_SetTraceOption(
|
PR_SetTraceOption(
|
||||||
PRTraceOption command, /* One of the enumerated values */
|
PRTraceOption command, /* One of the enumerated values */
|
||||||
void *value /* command value or NULL */
|
void *value /* command value or NULL */
|
||||||
|
@ -363,7 +363,7 @@ PR_EXTERN(void)
|
||||||
#define PR_GET_TRACE_OPTION(command,value)\
|
#define PR_GET_TRACE_OPTION(command,value)\
|
||||||
PR_GetTraceOption((command),(value))
|
PR_GetTraceOption((command),(value))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_GetTraceOption(
|
PR_GetTraceOption(
|
||||||
PRTraceOption command, /* One of the enumerated values */
|
PRTraceOption command, /* One of the enumerated values */
|
||||||
void *value /* command value or NULL */
|
void *value /* command value or NULL */
|
||||||
|
@ -395,7 +395,7 @@ PR_EXTERN(void)
|
||||||
#define PR_GET_TRACE_HANDLE_FROM_NAME(handle,qName,rName)\
|
#define PR_GET_TRACE_HANDLE_FROM_NAME(handle,qName,rName)\
|
||||||
(handle) = PR_GetTraceHandleFromName((qName),(rName))
|
(handle) = PR_GetTraceHandleFromName((qName),(rName))
|
||||||
|
|
||||||
PR_EXTERN(PRTraceHandle)
|
NSPR_API(PRTraceHandle)
|
||||||
PR_GetTraceHandleFromName(
|
PR_GetTraceHandleFromName(
|
||||||
const char *qName, /* QName search argument */
|
const char *qName, /* QName search argument */
|
||||||
const char *rName /* RName search argument */
|
const char *rName /* RName search argument */
|
||||||
|
@ -423,7 +423,7 @@ PR_EXTERN(PRTraceHandle)
|
||||||
#define PR_GET_TRACE_NAME_FROM_HANDLE(handle,qName,rName,description)\
|
#define PR_GET_TRACE_NAME_FROM_HANDLE(handle,qName,rName,description)\
|
||||||
PR_GetTraceNameFromHandle((handle),(qName),(rName),(description))
|
PR_GetTraceNameFromHandle((handle),(qName),(rName),(description))
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_GetTraceNameFromHandle(
|
PR_GetTraceNameFromHandle(
|
||||||
PRTraceHandle handle, /* handle as search argument */
|
PRTraceHandle handle, /* handle as search argument */
|
||||||
const char **qName, /* pointer to associated QName */
|
const char **qName, /* pointer to associated QName */
|
||||||
|
@ -461,7 +461,7 @@ PR_EXTERN(void)
|
||||||
#define PR_FIND_NEXT_TRACE_QNAME(next,handle)\
|
#define PR_FIND_NEXT_TRACE_QNAME(next,handle)\
|
||||||
(next) = PR_FindNextTraceQname((handle))
|
(next) = PR_FindNextTraceQname((handle))
|
||||||
|
|
||||||
PR_EXTERN(PRTraceHandle)
|
NSPR_API(PRTraceHandle)
|
||||||
PR_FindNextTraceQname(
|
PR_FindNextTraceQname(
|
||||||
PRTraceHandle handle
|
PRTraceHandle handle
|
||||||
);
|
);
|
||||||
|
@ -499,7 +499,7 @@ PR_EXTERN(PRTraceHandle)
|
||||||
#define PR_FIND_NEXT_TRACE_RNAME(next,rhandle,qhandle)\
|
#define PR_FIND_NEXT_TRACE_RNAME(next,rhandle,qhandle)\
|
||||||
(next) = PR_FindNextTraceRname((rhandle),(qhandle))
|
(next) = PR_FindNextTraceRname((rhandle),(qhandle))
|
||||||
|
|
||||||
PR_EXTERN(PRTraceHandle)
|
NSPR_API(PRTraceHandle)
|
||||||
PR_FindNextTraceRname(
|
PR_FindNextTraceRname(
|
||||||
PRTraceHandle rhandle,
|
PRTraceHandle rhandle,
|
||||||
PRTraceHandle qhandle
|
PRTraceHandle qhandle
|
||||||
|
@ -551,7 +551,7 @@ PR_EXTERN(PRTraceHandle)
|
||||||
#define PR_RECORD_TRACE_ENTRIES()\
|
#define PR_RECORD_TRACE_ENTRIES()\
|
||||||
PR_RecordTraceEntries()
|
PR_RecordTraceEntries()
|
||||||
|
|
||||||
PR_EXTERN(void)
|
NSPR_API(void)
|
||||||
PR_RecordTraceEntries(
|
PR_RecordTraceEntries(
|
||||||
void
|
void
|
||||||
);
|
);
|
||||||
|
@ -600,7 +600,7 @@ PR_EXTERN(void)
|
||||||
PR_GetTraceEntries((buffer),(count),(found))
|
PR_GetTraceEntries((buffer),(count),(found))
|
||||||
|
|
||||||
|
|
||||||
PR_EXTERN(PRIntn)
|
NSPR_API(PRIntn)
|
||||||
PR_GetTraceEntries(
|
PR_GetTraceEntries(
|
||||||
PRTraceEntry *buffer, /* where to write output */
|
PRTraceEntry *buffer, /* where to write output */
|
||||||
PRInt32 count, /* number to get */
|
PRInt32 count, /* number to get */
|
||||||
|
|
|
@ -84,10 +84,10 @@
|
||||||
|
|
||||||
#elif defined(XP_BEOS)
|
#elif defined(XP_BEOS)
|
||||||
|
|
||||||
#define PR_EXPORT(__type) extern _declspec(dllexport) __type
|
#define PR_EXPORT(__type) extern __declspec(dllexport) __type
|
||||||
#define PR_EXPORT_DATA(__type) extern _declspec(dllexport) __type
|
#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
|
||||||
#define PR_IMPORT(__type) extern _declspec(dllexport) __type
|
#define PR_IMPORT(__type) extern __declspec(dllexport) __type
|
||||||
#define PR_IMPORT_DATA(__type) extern _declspec(dllexport) __type
|
#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type
|
||||||
|
|
||||||
#define PR_EXTERN(__type) extern __declspec(dllexport) __type
|
#define PR_EXTERN(__type) extern __declspec(dllexport) __type
|
||||||
#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
|
#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
|
||||||
|
@ -133,10 +133,10 @@
|
||||||
|
|
||||||
#elif defined(XP_MAC)
|
#elif defined(XP_MAC)
|
||||||
|
|
||||||
#define PR_EXPORT(__type) extern _declspec(export) __type
|
#define PR_EXPORT(__type) extern __declspec(export) __type
|
||||||
#define PR_EXPORT_DATA(__type) extern _declspec(export) __type
|
#define PR_EXPORT_DATA(__type) extern __declspec(export) __type
|
||||||
#define PR_IMPORT(__type) extern _declspec(export) __type
|
#define PR_IMPORT(__type) extern __declspec(export) __type
|
||||||
#define PR_IMPORT_DATA(__type) extern _declspec(export) __type
|
#define PR_IMPORT_DATA(__type) extern __declspec(export) __type
|
||||||
|
|
||||||
#define PR_EXTERN(__type) extern __declspec(export) __type
|
#define PR_EXTERN(__type) extern __declspec(export) __type
|
||||||
#define PR_IMPLEMENT(__type) __declspec(export) __type
|
#define PR_IMPLEMENT(__type) __declspec(export) __type
|
||||||
|
|
|
@ -75,7 +75,7 @@ typedef struct {
|
||||||
* All components must define an entrypoint named libVersionPoint which
|
* All components must define an entrypoint named libVersionPoint which
|
||||||
* is of type versionEntryPointType.
|
* is of type versionEntryPointType.
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(const PRVersionDescription *) libVersionPoint(void);
|
NSPR_API(const PRVersionDescription *) libVersionPoint(void);
|
||||||
|
|
||||||
typedef const PRVersionDescription *(*versionEntryPointType)(void);
|
typedef const PRVersionDescription *(*versionEntryPointType)(void);
|
||||||
|
|
||||||
|
|
|
@ -62,17 +62,17 @@ typedef PRInt32 (PR_CALLBACK *PRStdinRead)( void *buf, PRInt32 amount);
|
||||||
typedef PRInt32 (PR_CALLBACK *PRStdoutWrite)( void *buf, PRInt32 amount);
|
typedef PRInt32 (PR_CALLBACK *PRStdoutWrite)( void *buf, PRInt32 amount);
|
||||||
typedef PRInt32 (PR_CALLBACK *PRStderrWrite)( void *buf, PRInt32 amount);
|
typedef PRInt32 (PR_CALLBACK *PRStderrWrite)( void *buf, PRInt32 amount);
|
||||||
|
|
||||||
PR_EXTERN(PRStatus)
|
NSPR_API(PRStatus)
|
||||||
PR_MD_RegisterW16StdioCallbacks(
|
PR_MD_RegisterW16StdioCallbacks(
|
||||||
PRStdinRead inReadf, /* i: function pointer for stdin read */
|
PRStdinRead inReadf, /* i: function pointer for stdin read */
|
||||||
PRStdoutWrite outWritef, /* i: function pointer for stdout write */
|
PRStdoutWrite outWritef, /* i: function pointer for stdout write */
|
||||||
PRStderrWrite errWritef /* i: function pointer for stderr write */
|
PRStderrWrite errWritef /* i: function pointer for stderr write */
|
||||||
);
|
);
|
||||||
|
|
||||||
PR_EXTERN(PRInt32)
|
NSPR_API(PRInt32)
|
||||||
_PL_W16StdioWrite( void *buf, PRInt32 amount );
|
_PL_W16StdioWrite( void *buf, PRInt32 amount );
|
||||||
|
|
||||||
PR_EXTERN(PRInt32)
|
NSPR_API(PRInt32)
|
||||||
_PL_W16StdioRead( void *buf, PRInt32 amount );
|
_PL_W16StdioRead( void *buf, PRInt32 amount );
|
||||||
|
|
||||||
#define PR_STDIO_INIT() PR_MD_RegisterW16StdioCallbacks( \
|
#define PR_STDIO_INIT() PR_MD_RegisterW16StdioCallbacks( \
|
||||||
|
@ -95,7 +95,7 @@ struct PRMethodCallbackStr {
|
||||||
// void * (PR_CALLBACK *perror)( const char *prefix );
|
// void * (PR_CALLBACK *perror)( const char *prefix );
|
||||||
};
|
};
|
||||||
|
|
||||||
PR_EXTERN(void) PR_MDRegisterCallbacks(struct PRMethodCallbackStr *);
|
NSPR_API(void) PR_MDRegisterCallbacks(struct PRMethodCallbackStr *);
|
||||||
|
|
||||||
int PR_CALLBACK _PL_W16CallBackPuts( const char *outputString );
|
int PR_CALLBACK _PL_W16CallBackPuts( const char *outputString );
|
||||||
size_t PR_CALLBACK _PL_W16CallBackStrftime(
|
size_t PR_CALLBACK _PL_W16CallBackStrftime(
|
||||||
|
@ -120,17 +120,17 @@ int PR_CALLBACK _PL_W16CallBackPutenv( const char *assoc );
|
||||||
** ... Don't do this! ... alas, It may never go away.
|
** ... Don't do this! ... alas, It may never go away.
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(int) PR_MD_printf(const char *, ...);
|
NSPR_API(int) PR_MD_printf(const char *, ...);
|
||||||
PR_EXTERN(void) PR_MD_exit(int);
|
NSPR_API(void) PR_MD_exit(int);
|
||||||
PR_EXTERN(size_t) PR_MD_strftime(char *, size_t, const char *, const struct tm *);
|
NSPR_API(size_t) PR_MD_strftime(char *, size_t, const char *, const struct tm *);
|
||||||
PR_EXTERN(int) PR_MD_sscanf(const char *, const char *, ...);
|
NSPR_API(int) PR_MD_sscanf(const char *, const char *, ...);
|
||||||
PR_EXTERN(void*) PR_MD_malloc( size_t size );
|
NSPR_API(void*) PR_MD_malloc( size_t size );
|
||||||
PR_EXTERN(void*) PR_MD_calloc( size_t n, size_t size );
|
NSPR_API(void*) PR_MD_calloc( size_t n, size_t size );
|
||||||
PR_EXTERN(void*) PR_MD_realloc( void* old_blk, size_t size );
|
NSPR_API(void*) PR_MD_realloc( void* old_blk, size_t size );
|
||||||
PR_EXTERN(void) PR_MD_free( void *ptr );
|
NSPR_API(void) PR_MD_free( void *ptr );
|
||||||
PR_EXTERN(char*) PR_MD_getenv( const char *name );
|
NSPR_API(char*) PR_MD_getenv( const char *name );
|
||||||
PR_EXTERN(int) PR_MD_putenv( const char *assoc );
|
NSPR_API(int) PR_MD_putenv( const char *assoc );
|
||||||
PR_EXTERN(int) PR_MD_fprintf(FILE *fPtr, const char *fmt, ...);
|
NSPR_API(int) PR_MD_fprintf(FILE *fPtr, const char *fmt, ...);
|
||||||
|
|
||||||
#define PR_INIT_CALLBACKS() \
|
#define PR_INIT_CALLBACKS() \
|
||||||
{ \
|
{ \
|
||||||
|
@ -151,11 +151,11 @@ PR_EXTERN(int) PR_MD_fprintf(FILE *fPtr, const char *fmt, ...);
|
||||||
/*
|
/*
|
||||||
** Get the exception context for Win16 MFC applications threads
|
** Get the exception context for Win16 MFC applications threads
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void *) PR_W16GetExceptionContext(void);
|
NSPR_API(void *) PR_W16GetExceptionContext(void);
|
||||||
/*
|
/*
|
||||||
** Set the exception context for Win16 MFC applications threads
|
** Set the exception context for Win16 MFC applications threads
|
||||||
*/
|
*/
|
||||||
PR_EXTERN(void) PR_W16SetExceptionContext(void *context);
|
NSPR_API(void) PR_W16SetExceptionContext(void *context);
|
||||||
|
|
||||||
PR_END_EXTERN_C
|
PR_END_EXTERN_C
|
||||||
#else
|
#else
|
||||||
|
|
Загрузка…
Ссылка в новой задаче