Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions | Variables
_win16.h File Reference
#include <windows.h>
#include <winsock.h>
#include <errno.h>
#include <direct.h>
#include "nspr.h"

Go to the source code of this file.

Classes

struct  _PRWin16PollDesc
struct  PRPollQueue
struct  _MDCPU
struct  _MDThread
struct  _MDThreadStack
struct  _MDSegment
struct  _MDLock
struct  _MDDir
struct  _MDCVar
struct  _MDSemaphore
struct  _MDFileDesc
struct  _MDProcess
struct  _MDMSStat
struct  _MDFileMap

Defines

#define Remind(x)
#define PR_LINKER_ARCH   "win16"
#define _PR_SI_SYSNAME   "WIN16"
#define _PR_SI_ARCHITECTURE   "x86" /* XXXMB hardcode for now */
#define HAVE_DLL
#define _PR_NO_PREEMPT
#define _PR_LOCAL_THREADS_ONLY
#define _PR_HAVE_ATOMIC_OPS
#define PR_NUM_GCREGS   9
#define _MD_MAGIC_THREAD   0x22222222
#define _MD_MAGIC_THREADSTACK   0x33333333
#define _MD_MAGIC_SEGMENT   0x44444444
#define _MD_MAGIC_DIR   0x55555555
#define _MD_MAGIC_CV   0x66666666
#define _PR_POLLQUEUE_PTR(_qp)   ((PRPollQueue *) ((char*) (_qp) - offsetof(PRPollQueue,links)))
#define _PR_MD_MAX_OSFD   FD_SETSIZE
#define _PR_IOQ(_cpu)   ((_cpu)->md.ioQ)
#define _PR_ADD_TO_IOQ(_pq, _cpu)   PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu))
#define _PR_FD_READ_SET(_cpu)   ((_cpu)->md.fd_read_set)
#define _PR_FD_READ_CNT(_cpu)   ((_cpu)->md.fd_read_cnt)
#define _PR_FD_WRITE_SET(_cpu)   ((_cpu)->md.fd_write_set)
#define _PR_FD_WRITE_CNT(_cpu)   ((_cpu)->md.fd_write_cnt)
#define _PR_FD_EXCEPTION_SET(_cpu)   ((_cpu)->md.fd_exception_set)
#define _PR_FD_EXCEPTION_CNT(_cpu)   ((_cpu)->md.fd_exception_cnt)
#define _PR_IOQ_TIMEOUT(_cpu)   ((_cpu)->md.ioq_timeout)
#define _PR_IOQ_MAX_OSFD(_cpu)   ((_cpu)->md.ioq_max_osfd)
#define _MD_UNIQUEBASE   50000
#define _MD_EINTERRUPTED   _MD_UNIQUEBASE + 1
#define _MD_ETIMEDOUT   _MD_UNIQUEBASE + 2
#define _MD_EIO   _MD_UNIQUEBASE + 3
#define _MD_CREATE_PROCESS   _PR_CreateWindowsProcess
#define _MD_DETACH_PROCESS   _PR_DetachWindowsProcess
#define _MD_WAIT_PROCESS   _PR_WaitWindowsProcess
#define _MD_KILL_PROCESS   _PR_KillWindowsProcess
#define MD_ASSERTINT(x)   PR_ASSERT( (x) < 65535 )
#define MAX_PATH   256
#define _MD_ERRNO()   errno
#define GetLastError()   errno
#define _MD_GET_FILE_ERROR()   errno
#define _MD_SET_FILE_ERROR(_err)   errno = (_err)
#define _MD_OPEN   _PR_MD_OPEN
#define _MD_READ   _PR_MD_READ
#define _MD_WRITE   _PR_MD_WRITE
#define _MD_WRITEV   _PR_MD_WRITEV
#define _MD_LSEEK   _PR_MD_LSEEK
#define _MD_LSEEK64   _PR_MD_LSEEK64
#define _MD_CLOSE_FILE   _PR_MD_CLOSE_FILE
#define _MD_GETFILEINFO   _PR_MD_GETFILEINFO
#define _MD_GETOPENFILEINFO   _PR_MD_GETOPENFILEINFO
#define _MD_STAT   _PR_MD_STAT
#define _MD_RENAME   _PR_MD_RENAME
#define _MD_ACCESS   _PR_MD_ACCESS
#define _MD_DELETE   _PR_MD_DELETE
#define _MD_MKDIR   _PR_MD_MKDIR
#define _MD_RMDIR   _PR_MD_RMDIR
#define _MD_LOCKFILE   _PR_MD_LOCKFILE
#define _MD_TLOCKFILE   _PR_MD_TLOCKFILE
#define _MD_UNLOCKFILE   _PR_MD_UNLOCKFILE
#define _MD_EACCES   WSAEACCES
#define _MD_EADDRINUSE   WSAEADDRINUSE
#define _MD_EADDRNOTAVAIL   WSAEADDRNOTAVAIL
#define _MD_EAFNOSUPPORT   WSAEAFNOSUPPORT
#define _MD_EAGAIN   WSAEWOULDBLOCK
#define _MD_EALREADY   WSAEALREADY
#define _MD_EBADF   WSAEBADF
#define _MD_ECONNREFUSED   WSAECONNREFUSED
#define _MD_ECONNRESET   WSAECONNRESET
#define _MD_EFAULT   WSAEFAULT
#define _MD_EINPROGRESS   WSAEINPROGRESS
#define _MD_EINTR   WSAEINTR
#define _MD_EINVAL   EINVAL
#define _MD_EISCONN   WSAEISCONN
#define _MD_ENETUNREACH   WSAENETUNREACH
#define _MD_ENOENT   ENOENT
#define _MD_ENOTCONN   WSAENOTCONN
#define _MD_ENOTSOCK   WSAENOTSOCK
#define _MD_EOPNOTSUPP   WSAEOPNOTSUPP
#define _MD_EWOULDBLOCK   WSAEWOULDBLOCK
#define _MD_GET_SOCKET_ERROR()   WSAGetLastError()
#define _MD_SET_SOCKET_ERROR(_err)   WSASetLastError(_err)
#define _MD_INIT_FILEDESC(fd)
#define _MD_MAKE_NONBLOCK   _PR_MD_MAKE_NONBLOCK
#define _MD_SHUTDOWN   _PR_MD_SHUTDOWN
#define _MD_LISTEN   _PR_MD_LISTEN
#define _MD_CLOSE_SOCKET   _PR_MD_CLOSE_SOCKET
#define _MD_SENDTO   _PR_MD_SENDTO
#define _MD_RECVFROM   _PR_MD_RECVFROM
#define _MD_SOCKETPAIR(s, type, proto, sv)   -1
#define _MD_GETSOCKNAME   _PR_MD_GETSOCKNAME
#define _MD_GETPEERNAME   _PR_MD_GETPEERNAME
#define _MD_GETSOCKOPT   _PR_MD_GETSOCKOPT
#define _MD_SETSOCKOPT   _PR_MD_SETSOCKOPT
#define _MD_SELECT   select
#define _MD_FSYNC   _PR_MD_FSYNC
#define _MD_SOCKETAVAILABLE   _PR_MD_SOCKETAVAILABLE
#define _MD_INIT_ATOMIC()
#define _MD_ATOMIC_INCREMENT(x)   (*x++)
#define _MD_ATOMIC_ADD(ptr, val)   ((*x) += val)
#define _MD_ATOMIC_DECREMENT(x)   (*x--)
#define _MD_ATOMIC_SET(x, y)   (*x, y)
#define _MD_INIT_IO   _PR_MD_INIT_IO
#define _MD_SOCKET   _PR_MD_SOCKET
#define _MD_CONNECT   _PR_MD_CONNECT
#define _MD_ACCEPT   _PR_MD_ACCEPT
#define _MD_BIND   _PR_MD_BIND
#define _MD_RECV   _PR_MD_RECV
#define _MD_SEND   _PR_MD_SEND
#define _MD_CHECK_FOR_EXIT()
#define _MD_PAUSE_CPU   _PR_MD_PAUSE_CPU
#define PR_DIRECTORY_SEPARATOR   '\\'
#define PR_DIRECTORY_SEPARATOR_STR   "\\"
#define PR_PATH_SEPARATOR   ';'
#define PR_PATH_SEPARATOR_STR   ";"
#define _MD_OPEN_DIR   _PR_MD_OPEN_DIR
#define _MD_CLOSE_DIR   _PR_MD_CLOSE_DIR
#define _MD_READ_DIR   _PR_MD_READ_DIR
#define _MD_INIT_SEGS()
#define _MD_ALLOC_SEGMENT   _MD_AllocSegment
#define _MD_FREE_SEGMENT   _MD_FreeSegment
#define _MD_GET_ENV   _PR_MD_GET_ENV
#define _MD_PUT_ENV   _PR_MD_PUT_ENV
#define _MD_DEFAULT_STACK_SIZE   32767L
#define _MD_INIT_THREAD   _PR_MD_INIT_THREAD
#define _MD_CREATE_THREAD(t, f, p, sc, st, stsiz)   (PR_SUCCESS)
#define _MD_YIELD   _PR_MD_YIELD
#define _MD_SET_PRIORITY(t, p)
#define _MD_CLEAN_THREAD(t)
#define _MD_SETTHREADAFFINITYMASK   _PR_MD_SETTHREADAFFINITYMASK
#define _MD_GETTHREADAFFINITYMASK   _PR_MD_GETTHREADAFFINITYMASK
#define _MD_EXIT_THREAD
#define _MD_SUSPEND_THREAD   _PR_MD_SUSPEND_THREAD
#define _MD_RESUME_THREAD   _PR_MD_RESUME_THREAD
#define _MD_SUSPEND_CPU   _PR_MD_SUSPEND_CPU
#define _MD_RESUME_CPU   _PR_MD_RESUME_CPU
#define _MD_BEGIN_SUSPEND_ALL()
#define _MD_BEGIN_RESUME_ALL()
#define _MD_END_SUSPEND_ALL()
#define _MD_END_RESUME_ALL()
#define _PR_LOCK   _MD_LOCK
#define _PR_UNLOCK   _MD_UNLOCK
#define _MD_NEW_LOCK(l)   (PR_SUCCESS)
#define _MD_FREE_LOCK(l)
#define _MD_LOCK(l)
#define _MD_TEST_AND_LOCK(l)   (-1)
#define _MD_UNLOCK(l)
#define _MD_WAIT   _PR_MD_WAIT
#define _MD_WAKEUP_WAITER(a)
#define _MD_WAKEUP_CPUS   _PR_MD_WAKEUP_CPUS
#define _MD_WAIT_CV   _PR_MD_WAIT_CV
#define _MD_NEW_CV   _PR_MD_NEW_CV
#define _MD_FREE_CV   _PR_MD_FREE_CV
#define _MD_NOTIFY_CV   _PR_MD_NOTIFY_CV
#define _MD_NOTIFYALL_CV   _PR_MD_NOTIFYALL_CV
#define _MD_IOQ_LOCK()
#define _MD_IOQ_UNLOCK()
#define _MD_START_INTERRUPTS()
#define _MD_STOP_INTERRUPTS()
#define _MD_DISABLE_CLOCK_INTERRUPTS()
#define _MD_ENABLE_CLOCK_INTERRUPTS()
#define _MD_BLOCK_CLOCK_INTERRUPTS()
#define _MD_UNBLOCK_CLOCK_INTERRUPTS()
#define _MD_EARLY_INIT   _PR_MD_EARLY_INIT
#define _MD_FINAL_INIT   _PR_MD_FINAL_INIT
#define _MD_INIT_CPUS()
#define _MD_EXIT
#define _MD_CLEANUP_BEFORE_EXIT   _PR_MD_CLEANUP_BEFORE_EXIT
#define _MD_INTERVAL_INIT   _PR_MD_INTERVAL_INIT
#define _MD_GET_INTERVAL   _PR_MD_GET_INTERVAL
#define _MD_INTERVAL_PER_SEC   _PR_MD_INTERVAL_PER_SEC
#define _MD_INTERVAL_PER_MILLISEC()   (_PR_MD_INTERVAL_PER_SEC() / 1000)
#define _MD_INTERVAL_PER_MICROSEC()   (_PR_MD_INTERVAL_PER_SEC() / 1000000)
#define LOCK_SCHEDULER()   0
#define UNLOCK_SCHEDULER()   0
#define _PR_LockSched()   0
#define _PR_UnlockSched()   0
#define _MD_INIT_LOCKS()
#define _MD_INIT_STACK   _PR_MD_INIT_STACK
#define _MD_CLEAR_STACK(stack)
#define PR_CONTEXT_TYPE   CATCHBUF
#define PR_NUM_GCREGS   9
#define _MD_GET_SP(thread)   ((thread)->md.SP)
#define CONTEXT(_t)   ((_t)->md.context)
#define _MD_INIT_CONTEXT(_t, sp, epa, stat)
#define _MD_SWITCH_CONTEXT(_t)
#define _MD_SAVE_CONTEXT(_t)
#define _PR_MD_RESTORE_CONTEXT   _MD_RESTORE_CONTEXT
#define _MD_CREATE_FILE_MAP   _MD_CreateFileMap
#define _MD_GET_MEM_MAP_ALIGNMENT   _MD_GetMemMapAlignment
#define _MD_MEM_MAP   _MD_MemMap
#define _MD_MEM_UNMAP   _MD_MemUnmap
#define _MD_CLOSE_FILE_MAP   _MD_CloseFileMap
#define _PR_MD_MAP_OPENDIR_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_CLOSEDIR_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_READDIR_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_DELETE_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_STAT_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_FSTAT_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_RENAME_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_ACCESS_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_MKDIR_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_RMDIR_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_READ_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_TRANSMITFILE_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_WRITE_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_LSEEK_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_FSYNC_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_CLOSE_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_SOCKET_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_RECV_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_RECVFROM_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_SEND_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_SENDTO_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_ACCEPT_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_ACCEPTEX_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_CONNECT_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_BIND_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_LISTEN_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_SHUTDOWN_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_GETSOCKNAME_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_GETPEERNAME_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_GETSOCKOPT_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_SETSOCKOPT_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_OPEN_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_GETHOSTNAME_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_SELECT_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_LOCKF_ERROR   _PR_MD_map_error
#define _PR_MD_MAP_WSASTARTUP_ERROR   _PR_MD_map_error

Typedefs

typedef PRInt32 PR_CONTEXT_TYPE [PR_NUM_GCREGS]
typedef struct _PRWin16PollDesc _PRWin16PollDesc
typedef struct PRPollQueue PRPollQueue
typedef unsigned short _ino_t
typedef short _dev_t
typedef long _off_t
typedef struct _MDMSStat _MDMSStat

Functions

 NSPR_API (PRInt32) _PR_WaitForFD(PRInt32 osfd
 NSPR_API (void) _PR_Unblock_IO_Wait(struct PRThread *thr)
 Prototypes for machine dependent function implementations.
struct PRProcess_PR_CreateWindowsProcess (const char *path, char *const *argv, char *const *envp, const struct PRProcessAttr *attr)
PRStatus _PR_DetachWindowsProcess (struct PRProcess *process)
PRStatus _PR_WaitWindowsProcess (struct PRProcess *process, PRInt32 *exitCode)
PRStatus _PR_KillWindowsProcess (struct PRProcess *process)
PRStatus _MD_CreateFileMap (struct PRFileMap *fmap, PRInt64 size)
PRInt32 _MD_GetMemMapAlignment (void)
void_MD_MemMap (struct PRFileMap *fmap, PRInt64 offset, PRUint32 len)
PRStatus _MD_MemUnmap (void *addr, PRUint32 size)
PRStatus _MD_CloseFileMap (struct PRFileMap *fmap)
void _PR_MD_map_error (int err)

Variables

struct PRLock_pr_schedLock
char * _pr_top_of_task_stack
PRUintn how
PRUintn PRIntervalTime timeout

Class Documentation

struct _PRWin16PollDesc

Definition at line 83 of file _win16.h.

Class Members
PRInt16 in_flags
PRInt32 osfd
PRInt16 out_flags
struct PRPollQueue

Definition at line 123 of file _unixos.h.

Collaboration diagram for PRPollQueue:
Class Members
PRCList links
PRUintn npds
PRPackedBool on_ioq
_PRWin16PollDesc * pds
_PRUnixPollDesc * pds
struct PRThread * thr
PRIntervalTime timeout
struct _MDCPU

Definition at line 221 of file _aix.h.

Collaboration diagram for _MDCPU:
Class Members
PRInt16 fd_exception_cnt
fd_set fd_exception_set
PRInt16 fd_read_cnt
fd_set fd_read_set
PRInt16 fd_write_cnt
fd_set fd_write_set
PRInt32 id
PRCList ioQ
PRInt32 ioq_max_osfd
PRUint32 ioq_timeout
AbsoluteTime lastThreadSwitch
AbsoluteTime lastWakeUpProcess
PRInt32 suspending_id
PRBool trackScheduling
int unused
int8 unused
struct _MDThreadStack

Definition at line 165 of file _aix.h.

Class Members
PRIntn cxByteCount
PRUint32 magic
PRInt8 notused
char * stackTop
struct _MDSegment

Definition at line 181 of file _aix.h.

Class Members
PRUint32 magic
PRInt8 notused
struct _MDLock

Definition at line 169 of file _aix.h.

Class Members
usptr_t * arena
int32 benaphoreCount
ulock_t lock
PRUint32 magic
PRUint32 mutex
CRITICAL_SECTION mutex
HMTX mutex
PRInt8 notused
sem_id semaphoreID
struct _MDDir

Definition at line 170 of file _beos.h.

Collaboration diagram for _MDDir:
Class Members
char * currentEntryName
DIR * d
WIN32_FIND_DATA d_entry
union _MDDir d_entry
HANDLE d_hdl
HDIR d_hdl
struct dirent * dir
PRBool firstEntry
long ioDirID
short ioFDirIndex
short ioVRefNum
PRUint32 magic
struct _MDCVar

Definition at line 177 of file _aix.h.

Collaboration diagram for _MDCVar:
Class Members
int16 count
PRUint32 magic
ulock_t mdcvar_lock
PRInt8 notused
PRIntn nwait
sem_id sem1
sem_id sem2
PRUint32 unused
struct PRThread * waitHead
struct PRThread * waitTail
struct _MDSemaphore

Definition at line 173 of file _aix.h.

Class Members
PRInt8 notused
HEV sem
HANDLE sem
usema_t * sem
sem_id sid
PRInt32 unused
struct _MDFileDesc

Definition at line 158 of file _beos.h.

Collaboration diagram for _MDFileDesc:
Class Members
PRBool accepted_socket
int connectReturnError
int connectReturnValue
PRBool connectValueValid
OTReason disconnectError
PRBool doListen
PRPackedBool exceptReady
PRBool io_model_committed
_MDSocketCallerInfo misc
PRLock * miscLock
PRPackedBool orderlyDisconnect
int osfd
PRInt32 osfd
PRNetAddr peer_addr
_MDSocketCallerInfo read
PRPackedBool readReady
PRInt32 sock_state
PRBool sync_file_io
_MDSocketCallerInfo write
PRPackedBool writeReady
struct _MDProcess

Definition at line 141 of file _beos.h.

Class Members
HANDLE handle
DWORD id
PRInt8 notused
pid_t pid
PID pid
struct _MDMSStat

Definition at line 195 of file _win16.h.

Class Members
time_t st_atime
time_t st_ctime
_dev_t st_dev
short st_gid
_ino_t st_ino
unsigned short st_mode
time_t st_mtime
short st_nlink
_dev_t st_rdev
_off_t st_size
short st_uid
struct _MDFileMap

Definition at line 183 of file _beos.h.

Class Members
DWORD dwAccess
PRIntn flags
HANDLE hFileMap
PRBool isAnonFM
PRIntn prot
PRInt8 unused

Define Documentation

Definition at line 326 of file _win16.h.

Definition at line 266 of file _win16.h.

Definition at line 347 of file _win16.h.

#define _MD_ATOMIC_ADD (   ptr,
  val 
)    ((*x) += val)

Definition at line 317 of file _win16.h.

#define _MD_ATOMIC_DECREMENT (   x)    (*x--)

Definition at line 318 of file _win16.h.

#define _MD_ATOMIC_INCREMENT (   x)    (*x++)

Definition at line 316 of file _win16.h.

#define _MD_ATOMIC_SET (   x,
  y 
)    (*x, y)

Definition at line 319 of file _win16.h.

Definition at line 369 of file _win16.h.

Definition at line 368 of file _win16.h.

Definition at line 327 of file _win16.h.

Definition at line 409 of file _win16.h.

Definition at line 331 of file _win16.h.

Definition at line 360 of file _win16.h.

Definition at line 418 of file _win16.h.

Definition at line 438 of file _win16.h.

Definition at line 342 of file _win16.h.

Definition at line 261 of file _win16.h.

Definition at line 525 of file _win16.h.

Definition at line 303 of file _win16.h.

Definition at line 325 of file _win16.h.

Definition at line 512 of file _win16.h.

Definition at line 223 of file _win16.h.

#define _MD_CREATE_THREAD (   t,
  f,
  p,
  sc,
  st,
  stsiz 
)    (PR_SUCCESS)

Definition at line 357 of file _win16.h.

Definition at line 355 of file _win16.h.

Definition at line 267 of file _win16.h.

Definition at line 231 of file _win16.h.

Definition at line 407 of file _win16.h.

#define _MD_EACCES   WSAEACCES

Definition at line 276 of file _win16.h.

#define _MD_EADDRINUSE   WSAEADDRINUSE

Definition at line 277 of file _win16.h.

#define _MD_EADDRNOTAVAIL   WSAEADDRNOTAVAIL

Definition at line 278 of file _win16.h.

#define _MD_EAFNOSUPPORT   WSAEAFNOSUPPORT

Definition at line 279 of file _win16.h.

#define _MD_EAGAIN   WSAEWOULDBLOCK

Definition at line 280 of file _win16.h.

#define _MD_EALREADY   WSAEALREADY

Definition at line 281 of file _win16.h.

Definition at line 411 of file _win16.h.

#define _MD_EBADF   WSAEBADF

Definition at line 282 of file _win16.h.

#define _MD_ECONNREFUSED   WSAECONNREFUSED

Definition at line 283 of file _win16.h.

#define _MD_ECONNRESET   WSAECONNRESET

Definition at line 284 of file _win16.h.

#define _MD_EFAULT   WSAEFAULT

Definition at line 285 of file _win16.h.

#define _MD_EINPROGRESS   WSAEINPROGRESS

Definition at line 286 of file _win16.h.

Definition at line 215 of file _win16.h.

#define _MD_EINTR   WSAEINTR

Definition at line 287 of file _win16.h.

Definition at line 288 of file _win16.h.

Definition at line 217 of file _win16.h.

#define _MD_EISCONN   WSAEISCONN

Definition at line 289 of file _win16.h.

Definition at line 408 of file _win16.h.

Definition at line 371 of file _win16.h.

Definition at line 370 of file _win16.h.

#define _MD_ENETUNREACH   WSAENETUNREACH

Definition at line 290 of file _win16.h.

Definition at line 291 of file _win16.h.

#define _MD_ENOTCONN   WSAENOTCONN

Definition at line 292 of file _win16.h.

#define _MD_ENOTSOCK   WSAENOTSOCK

Definition at line 293 of file _win16.h.

#define _MD_EOPNOTSUPP   WSAEOPNOTSUPP

Definition at line 294 of file _win16.h.

#define _MD_ERRNO ( )    errno

Definition at line 249 of file _win16.h.

Definition at line 216 of file _win16.h.

#define _MD_EWOULDBLOCK   WSAEWOULDBLOCK

Definition at line 295 of file _win16.h.

Definition at line 416 of file _win16.h.

Definition at line 363 of file _win16.h.

Definition at line 412 of file _win16.h.

Definition at line 394 of file _win16.h.

Definition at line 381 of file _win16.h.

Definition at line 348 of file _win16.h.

Definition at line 312 of file _win16.h.

Definition at line 351 of file _win16.h.

Definition at line 252 of file _win16.h.

Definition at line 422 of file _win16.h.

Definition at line 515 of file _win16.h.

Definition at line 296 of file _win16.h.

#define _MD_GET_SP (   thread)    ((thread)->md.SP)

Definition at line 466 of file _win16.h.

Definition at line 262 of file _win16.h.

Definition at line 263 of file _win16.h.

Definition at line 308 of file _win16.h.

Definition at line 307 of file _win16.h.

Definition at line 309 of file _win16.h.

Definition at line 362 of file _win16.h.

Definition at line 315 of file _win16.h.

#define _MD_INIT_CONTEXT (   _t,
  sp,
  epa,
  stat 
)
Value:
{                                              \
     *(stat) = PR_TRUE;                        \
     Catch((_t)->md.context );             \
     (_t)->md.context[0] = OFFSETOF(epa);         \
     (_t)->md.context[1] = SELECTOROF(epa);                       \
     (_t)->md.context[2] = OFFSETOF(_pr_top_of_task_stack - 64);  \
     (_t)->md.context[3]  = 0;                 \
}

Definition at line 472 of file _win16.h.

Definition at line 413 of file _win16.h.

Definition at line 299 of file _win16.h.

Definition at line 321 of file _win16.h.

Definition at line 434 of file _win16.h.

Definition at line 346 of file _win16.h.

Definition at line 437 of file _win16.h.

Definition at line 356 of file _win16.h.

Definition at line 421 of file _win16.h.

Definition at line 425 of file _win16.h.

Definition at line 424 of file _win16.h.

Definition at line 423 of file _win16.h.

Definition at line 399 of file _win16.h.

Definition at line 400 of file _win16.h.

Definition at line 239 of file _win16.h.

Definition at line 302 of file _win16.h.

#define _MD_LOCK (   l)

Definition at line 382 of file _win16.h.

Definition at line 270 of file _win16.h.

Definition at line 259 of file _win16.h.

Definition at line 260 of file _win16.h.

#define _MD_MAGIC_CV   0x66666666

Definition at line 80 of file _win16.h.

#define _MD_MAGIC_DIR   0x55555555

Definition at line 79 of file _win16.h.

#define _MD_MAGIC_SEGMENT   0x44444444

Definition at line 78 of file _win16.h.

#define _MD_MAGIC_THREAD   0x22222222

Definition at line 76 of file _win16.h.

#define _MD_MAGIC_THREADSTACK   0x33333333

Definition at line 77 of file _win16.h.

Definition at line 300 of file _win16.h.

Definition at line 519 of file _win16.h.

Definition at line 522 of file _win16.h.

Definition at line 268 of file _win16.h.

Definition at line 393 of file _win16.h.

#define _MD_NEW_LOCK (   l)    (PR_SUCCESS)

Definition at line 380 of file _win16.h.

Definition at line 395 of file _win16.h.

Definition at line 396 of file _win16.h.

Definition at line 255 of file _win16.h.

Definition at line 341 of file _win16.h.

Definition at line 334 of file _win16.h.

Definition at line 352 of file _win16.h.

Definition at line 256 of file _win16.h.

Definition at line 343 of file _win16.h.

Definition at line 328 of file _win16.h.

Definition at line 305 of file _win16.h.

Definition at line 265 of file _win16.h.

Definition at line 367 of file _win16.h.

Definition at line 365 of file _win16.h.

Definition at line 269 of file _win16.h.

Value:
{                                           \
        int     garbCollPlaceHolder;            \
        Catch((_t)->md.context);                \
        (_t)->md.errcode = errno;               \
        (_t)->md.SP = &garbCollPlaceHolder;     \
    }

Definition at line 490 of file _win16.h.

Definition at line 311 of file _win16.h.

Definition at line 329 of file _win16.h.

Definition at line 304 of file _win16.h.

#define _MD_SET_FILE_ERROR (   _err)    errno = (_err)

Definition at line 253 of file _win16.h.

#define _MD_SET_PRIORITY (   t,
  p 
)

Definition at line 359 of file _win16.h.

#define _MD_SET_SOCKET_ERROR (   _err)    WSASetLastError(_err)

Definition at line 297 of file _win16.h.

Definition at line 310 of file _win16.h.

Definition at line 361 of file _win16.h.

Definition at line 301 of file _win16.h.

Definition at line 324 of file _win16.h.

Definition at line 313 of file _win16.h.

#define _MD_SOCKETPAIR (   s,
  type,
  proto,
  sv 
)    -1

Definition at line 306 of file _win16.h.

Definition at line 405 of file _win16.h.

Definition at line 264 of file _win16.h.

Definition at line 406 of file _win16.h.

Definition at line 366 of file _win16.h.

Definition at line 364 of file _win16.h.

Value:
if (!Catch((_t)->md.context)) {            \
        int     garbCollPlaceHolder;           \
        (_t)->md.errcode = errno;              \
        (_t)->md.SP = &garbCollPlaceHolder;    \
        _PR_Schedule();                        \
    }

Definition at line 482 of file _win16.h.

#define _MD_TEST_AND_LOCK (   l)    (-1)

Definition at line 383 of file _win16.h.

Definition at line 271 of file _win16.h.

Definition at line 410 of file _win16.h.

#define _MD_UNIQUEBASE   50000

Definition at line 214 of file _win16.h.

Definition at line 384 of file _win16.h.

Definition at line 272 of file _win16.h.

Definition at line 387 of file _win16.h.

Definition at line 392 of file _win16.h.

Definition at line 235 of file _win16.h.

Definition at line 389 of file _win16.h.

Definition at line 388 of file _win16.h.

Definition at line 257 of file _win16.h.

Definition at line 258 of file _win16.h.

Definition at line 358 of file _win16.h.

#define _PR_ADD_TO_IOQ (   _pq,
  _cpu 
)    PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu))

Definition at line 109 of file _win16.h.

#define _PR_FD_EXCEPTION_CNT (   _cpu)    ((_cpu)->md.fd_exception_cnt)

Definition at line 115 of file _win16.h.

#define _PR_FD_EXCEPTION_SET (   _cpu)    ((_cpu)->md.fd_exception_set)

Definition at line 114 of file _win16.h.

#define _PR_FD_READ_CNT (   _cpu)    ((_cpu)->md.fd_read_cnt)

Definition at line 111 of file _win16.h.

#define _PR_FD_READ_SET (   _cpu)    ((_cpu)->md.fd_read_set)

Definition at line 110 of file _win16.h.

#define _PR_FD_WRITE_CNT (   _cpu)    ((_cpu)->md.fd_write_cnt)

Definition at line 113 of file _win16.h.

#define _PR_FD_WRITE_SET (   _cpu)    ((_cpu)->md.fd_write_set)

Definition at line 112 of file _win16.h.

Definition at line 63 of file _win16.h.

#define _PR_IOQ (   _cpu)    ((_cpu)->md.ioQ)

Definition at line 108 of file _win16.h.

#define _PR_IOQ_MAX_OSFD (   _cpu)    ((_cpu)->md.ioq_max_osfd)

Definition at line 117 of file _win16.h.

#define _PR_IOQ_TIMEOUT (   _cpu)    ((_cpu)->md.ioq_timeout)

Definition at line 116 of file _win16.h.

Definition at line 60 of file _win16.h.

Definition at line 377 of file _win16.h.

#define _PR_LockSched ( )    0

Definition at line 430 of file _win16.h.

Definition at line 552 of file _win16.h.

Definition at line 553 of file _win16.h.

Definition at line 538 of file _win16.h.

Definition at line 555 of file _win16.h.

Definition at line 546 of file _win16.h.

Definition at line 532 of file _win16.h.

Definition at line 554 of file _win16.h.

Definition at line 534 of file _win16.h.

Definition at line 536 of file _win16.h.

Definition at line 545 of file _win16.h.

Definition at line 563 of file _win16.h.

Definition at line 559 of file _win16.h.

Definition at line 558 of file _win16.h.

Definition at line 560 of file _win16.h.

Definition at line 556 of file _win16.h.

Definition at line 565 of file _win16.h.

Definition at line 544 of file _win16.h.

Definition at line 539 of file _win16.h.

Definition at line 562 of file _win16.h.

Definition at line 531 of file _win16.h.

Definition at line 541 of file _win16.h.

Definition at line 533 of file _win16.h.

Definition at line 548 of file _win16.h.

Definition at line 549 of file _win16.h.

Definition at line 537 of file _win16.h.

Definition at line 540 of file _win16.h.

Definition at line 564 of file _win16.h.

Definition at line 550 of file _win16.h.

Definition at line 551 of file _win16.h.

Definition at line 561 of file _win16.h.

Definition at line 557 of file _win16.h.

Definition at line 547 of file _win16.h.

Definition at line 535 of file _win16.h.

Definition at line 542 of file _win16.h.

Definition at line 543 of file _win16.h.

Definition at line 566 of file _win16.h.

Definition at line 107 of file _win16.h.

Definition at line 501 of file _win16.h.

Definition at line 59 of file _win16.h.

#define _PR_POLLQUEUE_PTR (   _qp)    ((PRPollQueue *) ((char*) (_qp) - offsetof(PRPollQueue,links)))

Definition at line 100 of file _win16.h.

#define _PR_SI_ARCHITECTURE   "x86" /* XXXMB hardcode for now */

Definition at line 56 of file _win16.h.

#define _PR_SI_SYSNAME   "WIN16"

Definition at line 55 of file _win16.h.

Definition at line 378 of file _win16.h.

#define _PR_UnlockSched ( )    0

Definition at line 431 of file _win16.h.

#define CONTEXT (   _t)    ((_t)->md.context)

Definition at line 467 of file _win16.h.

Definition at line 250 of file _win16.h.

Definition at line 58 of file _win16.h.

#define LOCK_SCHEDULER ( )    0

Definition at line 428 of file _win16.h.

#define MAX_PATH   256

Definition at line 248 of file _win16.h.

#define MD_ASSERTINT (   x)    PR_ASSERT( (x) < 65535 )

Definition at line 245 of file _win16.h.

#define PR_CONTEXT_TYPE   CATCHBUF

Definition at line 463 of file _win16.h.

Definition at line 337 of file _win16.h.

Definition at line 338 of file _win16.h.

#define PR_LINKER_ARCH   "win16"

Definition at line 54 of file _win16.h.

Definition at line 464 of file _win16.h.

Definition at line 464 of file _win16.h.

Definition at line 339 of file _win16.h.

Definition at line 340 of file _win16.h.

#define Remind (   x)

Definition at line 48 of file _win16.h.

#define UNLOCK_SCHEDULER ( )    0

Definition at line 429 of file _win16.h.


Typedef Documentation

typedef short _dev_t

Definition at line 192 of file _win16.h.

typedef unsigned short _ino_t

Definition at line 191 of file _win16.h.

typedef struct _MDMSStat _MDMSStat
typedef long _off_t

Definition at line 193 of file _win16.h.

Definition at line 74 of file _win16.h.

typedef struct PRPollQueue PRPollQueue

Function Documentation

PRStatus _MD_CloseFileMap ( struct PRFileMap fmap)

Definition at line 1943 of file macio.c.

{
#pragma unused (fmap)

    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
    return PR_FAILURE;
}
PRStatus _MD_CreateFileMap ( struct PRFileMap fmap,
PRInt64  size 
)

Definition at line 1910 of file macio.c.

{
#pragma unused (fmap, size)

    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
    return PR_FAILURE;
}

Definition at line 1918 of file macio.c.

{
    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
    return -1;
}
void* _MD_MemMap ( struct PRFileMap fmap,
PRInt64  offset,
PRUint32  len 
)

Definition at line 1924 of file macio.c.

{
#pragma unused (fmap, offset, len)

    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
    return NULL;
}
PRStatus _MD_MemUnmap ( void addr,
PRUint32  size 
)

Definition at line 1935 of file macio.c.

{
#pragma unused (addr, len)

    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
    return PR_FAILURE;
}
struct PRProcess* _PR_CreateWindowsProcess ( const char *  path,
char *const argv,
char *const envp,
const struct PRProcessAttr attr 
) [read]

Definition at line 444 of file ntmisc.c.

{
    CloseHandle(process->md.handle);
    PR_DELETE(process);
    return PR_SUCCESS;
}
PRStatus _PR_KillWindowsProcess ( struct PRProcess process)

Definition at line 476 of file ntmisc.c.

{
    /*
     * On Unix, if a process terminates normally, its exit code is
     * between 0 and 255.  So here on Windows, we use the exit code
     * 256 to indicate that the process is killed.
     */
    if (TerminateProcess(process->md.handle, 256)) {
       return PR_SUCCESS;
    }
    PR_SetError(PR_UNKNOWN_ERROR, GetLastError());
    return PR_FAILURE;
}

Definition at line 47 of file w16error.c.

{

    switch ( err )
    {
        case  ENOENT:   /* No such file or directory */
                     PR_SetError(PR_FILE_NOT_FOUND_ERROR, err);
            break;
        case  E2BIG:    /* Argument list too big */
            PR_SetError( PR_INVALID_ARGUMENT_ERROR, err );
            break;
        case  ENOEXEC:  /* Exec format error */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EBADF:    /* Bad file number */
            PR_SetError( PR_BAD_DESCRIPTOR_ERROR, err );
            break;
        case  ENOMEM:   /* Not enough Memory */
            PR_SetError( PR_OUT_OF_MEMORY_ERROR, err );
            break;
        case  EACCES:   /* Permission denied */
            PR_SetError( PR_NO_ACCESS_RIGHTS_ERROR, err );
            break;
        case  EEXIST:   /* File exists */
        
 /* RESTART here */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EXDEV:    /* Cross device link */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EINVAL:   /* Invalid argument */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENFILE:   /* File table overflow */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EMFILE:   /* Too many open files */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENOSPC:   /* No space left on device */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        /* math errors */
        case  EDOM:     /* Argument too large */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ERANGE:   /* Result too large */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        /* file locking error */
        case  EDEADLK:      /* Resource deadlock would occur */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EINTR:    /* Interrupt */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ECHILD:   /* Child does not exist */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        /* POSIX errors */
        case  EAGAIN:   /* Resource unavailable, try again */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EBUSY:    /* Device or Resource is busy */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EFBIG:    /* File too large */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EIO:      /* I/O error */
            PR_SetError( PR_IO_ERROR, err );
            break;
        case  EISDIR:   /* Is a directory */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENOTDIR:  /* Not a directory */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EMLINK:   /* Too many links */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENOTBLK:  /* Block device required */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENOTTY:   /* Not a character device */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENXIO:    /* No such device or address */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EPERM:    /* Not owner */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EPIPE:    /* Broken pipe */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EROFS:    /* Read only file system */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ESPIPE:   /* Illegal seek */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ESRCH:    /* No such process */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ETXTBSY:  /* Text file busy */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  EFAULT:   /* Bad address */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENAMETOOLONG: /* Name too long */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENODEV:   /* No such device */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENOLCK:   /* No locks available on system */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENOSYS:   /* Unknown system call */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
        case  ENOTEMPTY:    /* Directory not empty */
        /* Normative Addendum error */
        case  EILSEQ:   /* Multibyte/widw character encoding error */
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
            
        /* WinSock errors */
        case WSAEACCES:
            PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR, err);
            break;
        case WSAEADDRINUSE:
            PR_SetError(PR_ADDRESS_IN_USE_ERROR, err);
            break;
        case WSAEADDRNOTAVAIL:
            PR_SetError(PR_ADDRESS_NOT_AVAILABLE_ERROR, err);
            break;
        case WSAEAFNOSUPPORT:
            PR_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR, err);
            break;
        case WSAEBADF:
            PR_SetError(PR_BAD_DESCRIPTOR_ERROR, err);
            break;
        case WSAECONNREFUSED:
            PR_SetError(PR_CONNECT_REFUSED_ERROR, err);
            break;
        case WSAEFAULT:
            PR_SetError(PR_ACCESS_FAULT_ERROR, err);
            break;
        case WSAEINVAL:
            PR_SetError(PR_BUFFER_OVERFLOW_ERROR, err);
            break;
        case WSAEISCONN:
            PR_SetError(PR_IS_CONNECTED_ERROR, err);
            break;
        case WSAEMFILE:
            PR_SetError(PR_PROC_DESC_TABLE_FULL_ERROR, err);
            break;
        case WSAENETDOWN:
        case WSAENETUNREACH:
            PR_SetError(PR_NETWORK_UNREACHABLE_ERROR, err);
            break;
        case WSAENOBUFS:
            PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, err);
            break;
        case WSAENOPROTOOPT:
        case WSAEMSGSIZE:
            PR_SetError(PR_INVALID_ARGUMENT_ERROR, err);
            break;
        case WSAENOTCONN:
            PR_SetError(PR_NOT_CONNECTED_ERROR, err);
            break;
        case WSAENOTSOCK:
            PR_SetError(PR_NOT_SOCKET_ERROR, err);
            break;
        case WSAEOPNOTSUPP:
            PR_SetError(PR_NOT_TCP_SOCKET_ERROR, err);
            break;
        case WSAEPROTONOSUPPORT:
            PR_SetError(PR_PROTOCOL_NOT_SUPPORTED_ERROR, err);
            break;
        case WSAETIMEDOUT:
            PR_SetError(PR_IO_TIMEOUT_ERROR, err);
            break;
        case WSAEINTR:
            PR_SetError(PR_PENDING_INTERRUPT_ERROR, err );
            break;
        case WSASYSNOTREADY:
        case WSAVERNOTSUPPORTED:
            PR_SetError(PR_PROTOCOL_NOT_SUPPORTED_ERROR, err);
            break;
              case WSAEWOULDBLOCK:
                     PR_SetError(PR_WOULD_BLOCK_ERROR, err);
                     break;
            
        default:
            PR_SetError( PR_UNKNOWN_ERROR, err );
            break;
    }
    return;
} /* end _MD_map_win16_error() */
PRStatus _PR_WaitWindowsProcess ( struct PRProcess process,
PRInt32 exitCode 
)

Definition at line 455 of file ntmisc.c.

{
    DWORD dwRetVal;

    dwRetVal = WaitForSingleObject(process->md.handle, INFINITE);
    if (dwRetVal == WAIT_FAILED) {
        PR_SetError(PR_UNKNOWN_ERROR, GetLastError());
        return PR_FAILURE;
    }
    PR_ASSERT(dwRetVal == WAIT_OBJECT_0);
    if (exitCode != NULL &&
            GetExitCodeProcess(process->md.handle, exitCode) == FALSE) {
        PR_SetError(PR_UNKNOWN_ERROR, GetLastError());
        return PR_FAILURE;
    }
    CloseHandle(process->md.handle);
    PR_DELETE(process);
    return PR_SUCCESS;
}
NSPR_API ( void  )

Prototypes for machine dependent function implementations.

(Too bad NSPR's MD system blows so much that we have to reiterate every stinking thing we implement here in our MD header file.)


Variable Documentation

Definition at line 42 of file ntthread.c.

Definition at line 44 of file w16null.c.

PRUintn how

Definition at line 103 of file _win16.h.

Definition at line 103 of file _win16.h.