Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions | Variables
_os2.h File Reference
#include <os2.h>
#include <sys/select.h>
#include "prio.h"
#include <errno.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _MDSemaphore
struct  _MDCPU
struct  _MDThread
struct  _MDThreadStack
struct  _MDSegment
struct  _MDDir
struct  _MDCVar
struct  _MDNotified
struct  _MDLock
struct  _MDFileDesc
struct  _MDProcess
struct  __NSPR_TLS
struct  _MDFileMap
struct  _FPREG
struct  _CONTEXTRECORD
union  _MDDir.d_entry
struct  _MDNotified.cv

Defines

#define INCL_LONGLONG
#define INCL_DOS
#define INCL_DOSPROCESS
#define INCL_DOSERRORS
#define INCL_WIN
#define INCL_WPS
#define PR_LINKER_ARCH   "os2"
#define _PR_SI_SYSNAME   "OS2"
#define _PR_SI_ARCHITECTURE   "x86" /* XXXMB hardcode for now */
#define HAVE_DLL
#define _PR_GLOBAL_THREADS_ONLY
#define _PR_HAVE_THREADSAFE_GETHOST
#define _PR_HAVE_ATOMIC_OPS
#define HANDLE   unsigned long
#define HINSTANCE   HMODULE
#define PR_NUM_GCREGS   8
#define GC_VMBASE   0x40000000
#define GC_VMLIMIT   0x00FFFFFF
#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 _MD_CV_NOTIFIED_LENGTH   6
#define _MD_GET_SP(thread)   (thread)->md.gcContext[6]
#define _MD_OPEN   (_PR_MD_OPEN)
#define _MD_OPEN_FILE   (_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   _MD_CloseFile
#define _MD_GETFILEINFO   (_PR_MD_GETFILEINFO)
#define _MD_GETFILEINFO64   (_PR_MD_GETFILEINFO64)
#define _MD_GETOPENFILEINFO   (_PR_MD_GETOPENFILEINFO)
#define _MD_GETOPENFILEINFO64   (_PR_MD_GETOPENFILEINFO64)
#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_MAKE_DIR   (_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   EACCES
#define _MD_EADDRINUSE   EADDRINUSE
#define _MD_EADDRNOTAVAIL   EADDRNOTAVAIL
#define _MD_EAFNOSUPPORT   EAFNOSUPPORT
#define _MD_EAGAIN   EWOULDBLOCK
#define _MD_EALREADY   EALREADY
#define _MD_EBADF   EBADF
#define _MD_ECONNREFUSED   ECONNREFUSED
#define _MD_ECONNRESET   ECONNRESET
#define _MD_EFAULT   SOCEFAULT
#define _MD_EINPROGRESS   EINPROGRESS
#define _MD_EINTR   EINTR
#define _MD_EINVAL   EINVAL
#define _MD_EISCONN   EISCONN
#define _MD_ENETUNREACH   ENETUNREACH
#define _MD_ENOENT   ENOENT
#define _MD_ENOTCONN   ENOTCONN
#define _MD_ENOTSOCK   ENOTSOCK
#define _MD_EOPNOTSUPP   EOPNOTSUPP
#define _MD_EWOULDBLOCK   EWOULDBLOCK
#define _MD_GET_SOCKET_ERROR()   sock_errno()
#define _MD_INIT_FILEDESC(fd)
#define _MD_MAKE_NONBLOCK   _MD_MakeNonblock
#define _MD_INIT_FD_INHERITABLE   (_PR_MD_INIT_FD_INHERITABLE)
#define _MD_QUERY_FD_INHERITABLE   (_PR_MD_QUERY_FD_INHERITABLE)
#define _MD_SHUTDOWN   (_PR_MD_SHUTDOWN)
#define _MD_LISTEN   _PR_MD_LISTEN
#define _MD_CLOSE_SOCKET   _MD_CloseSocket
#define _MD_SENDTO   (_PR_MD_SENDTO)
#define _MD_RECVFROM   (_PR_MD_RECVFROM)
#define _MD_SOCKETPAIR   (_PR_MD_SOCKETPAIR)
#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_FSYNC   _PR_MD_FSYNC
#define _MD_SET_FD_INHERITABLE   (_PR_MD_SET_FD_INHERITABLE)
#define _MD_INIT_ATOMIC()
#define _MD_ATOMIC_INCREMENT   _PR_MD_ATOMIC_INCREMENT
#define _MD_ATOMIC_ADD   _PR_MD_ATOMIC_ADD
#define _MD_ATOMIC_DECREMENT   _PR_MD_ATOMIC_DECREMENT
#define _MD_ATOMIC_SET   _PR_MD_ATOMIC_SET
#define _MD_INIT_IO   (_PR_MD_INIT_IO)
#define _MD_PR_POLL   (_PR_MD_PR_POLL)
#define _MD_SOCKET   (_PR_MD_SOCKET)
#define _MD_SOCKETAVAILABLE   _MD_SocketAvailable
#define _MD_PIPEAVAILABLE   _MD_SocketAvailable
#define _MD_CONNECT   (_PR_MD_CONNECT)
#define _MD_ACCEPT   _MD_Accept
#define _MD_BIND   (_PR_MD_BIND)
#define _MD_RECV   (_PR_MD_RECV)
#define _MD_SEND   (_PR_MD_SEND)
#define _MD_PAUSE_CPU
#define PR_DIRECTORY_SEPARATOR   '\\'
#define PR_DIRECTORY_SEPARATOR_STR   "\\"
#define PR_PATH_SEPARATOR   ';'
#define PR_PATH_SEPARATOR_STR   ";"
#define _MD_ERRNO()   errno
#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(seg, size, vaddr)   0
#define _MD_FREE_SEGMENT(seg)
#define _MD_GET_ENV   (_PR_MD_GET_ENV)
#define _MD_PUT_ENV   (_PR_MD_PUT_ENV)
#define _MD_DEFAULT_STACK_SIZE   65536L
#define _MD_INIT_THREAD   (_PR_MD_INIT_THREAD)
#define _MD_INIT_ATTACHED_THREAD   (_PR_MD_INIT_THREAD)
#define _MD_CREATE_THREAD   (_PR_MD_CREATE_THREAD)
#define _MD_YIELD   (_PR_MD_YIELD)
#define _MD_SET_PRIORITY   (_PR_MD_SET_PRIORITY)
#define _MD_CLEAN_THREAD   (_PR_MD_CLEAN_THREAD)
#define _MD_SETTHREADAFFINITYMASK   (_PR_MD_SETTHREADAFFINITYMASK)
#define _MD_GETTHREADAFFINITYMASK   (_PR_MD_GETTHREADAFFINITYMASK)
#define _MD_EXIT_THREAD   (_PR_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_WAKEUP_CPUS   (_PR_MD_WAKEUP_CPUS)
#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   (_PR_MD_NEW_LOCK)
#define _MD_FREE_LOCK(lock)   (DosCloseMutexSem((lock)->mutex))
#define _MD_LOCK(lock)   (DosRequestMutexSem((lock)->mutex, SEM_INDEFINITE_WAIT))
#define _MD_TEST_AND_LOCK(lock)   (DosRequestMutexSem((lock)->mutex, SEM_INDEFINITE_WAIT),0)
#define _MD_UNLOCK(lock)
#define _MD_WAIT   (_PR_MD_WAIT)
#define _MD_WAKEUP_WAITER   (_PR_MD_WAKEUP_WAITER)
#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()
#define _MD_INIT_CPUS()
#define _MD_INIT_RUNNING_CPU(cpu)
#define _MD_CREATE_PROCESS   _PR_CreateOS2Process
#define _MD_DETACH_PROCESS   _PR_DetachOS2Process
#define _MD_WAIT_PROCESS   _PR_WaitOS2Process
#define _MD_KILL_PROCESS   _PR_KillOS2Process
#define _MD_CLEANUP_BEFORE_EXIT()
#define _MD_EXIT   (_PR_MD_EXIT)
#define _MD_INIT_CONTEXT(_thread, _sp, _main, status)
#define _MD_SWITCH_CONTEXT
#define _MD_RESTORE_CONTEXT
#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 _MD_GET_ATTACHED_THREAD()   pThreadLocalStorage->_pr_currentThread
#define _MD_SET_CURRENT_THREAD(_thread)   _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_currentThread = (_thread)
#define _MD_LAST_THREAD()   pThreadLocalStorage->_pr_thread_last_run
#define _MD_SET_LAST_THREAD(_thread)   _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_thread_last_run = (_thread)
#define _MD_CURRENT_CPU()   pThreadLocalStorage->_pr_currentCPU
#define _MD_SET_CURRENT_CPU(_cpu)   _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_currentCPU = (_cpu)
#define LOCK_SCHEDULER()   0
#define UNLOCK_SCHEDULER()   0
#define _PR_LockSched()   0
#define _PR_UnlockSched()   0
#define _MD_INIT_LOCKS()
#define _MD_INIT_STACK(stack, redzone)
#define _MD_CLEAR_STACK(stack)
#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 CONTEXT_CONTROL   0x00000001
#define CONTEXT_INTEGER   0x00000002
#define CONTEXT_SEGMENTS   0x00000004
#define CONTEXT_FLOATING_POINT   0x00000008
#define CONTEXT_FULL   0x0000000F
#define FreeLibrary(x)   DosFreeModule((HMODULE)x)
#define OutputDebugString(x)

Typedefs

typedef void(* FiberFunc )(void *)
typedef PRInt32 PR_CONTEXT_TYPE [PR_NUM_GCREGS]
typedef int(* FARPROC )()
typedef struct _MDNotified
typedef struct __NSPR_TLS _NSPR_TLS
typedef ULONG DWORD
typedef ULONGPDWORD
typedef struct _FPREG FPREG
typedef struct _CONTEXTRECORD CONTEXTRECORD
typedef struct _CONTEXTRECORDPCONTEXTRECORD

Functions

PRInt32 _MD_CloseFile (PRInt32 osfd)
void _MD_MakeNonblock (PRFileDesc *f)
PRInt32 _MD_CloseSocket (PRInt32 osfd)
PRInt32 _MD_SocketAvailable (PRFileDesc *fd)
PRInt32 _MD_Accept (PRFileDesc *fd, PRNetAddr *raddr, PRUint32 *rlen, PRIntervalTime timeout)
struct PRProcess_PR_CreateOS2Process (const char *path, char *const *argv, char *const *envp, const struct PRProcessAttr *attr)
PRStatus _PR_DetachOS2Process (struct PRProcess *process)
PRStatus _PR_WaitOS2Process (struct PRProcess *process, PRInt32 *exitCode)
PRStatus _PR_KillOS2Process (struct PRProcess *process)
 NSPR_API (void) _PR_MD_ENSURE_TLS(void)
 Prototypes for machine dependent function implementations.
struct PRThread_MD_CURRENT_THREAD (void)
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)
int _MD_os2_get_nonblocking_connect_error (int osfd)

Variables

struct PRLock_pr_schedLock
_NSPR_TLSpThreadLocalStorage
APIRET(* APIENTRY )(TID, ULONG, PCONTEXTRECORD)

Class Documentation

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 _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 _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 _MDNotified

Definition at line 178 of file _os2.h.

Collaboration diagram for _MDNotified:
Class Members
struct _MDNotified cv
struct _MDNotified cv
PRIntn length
_MDNotified * link
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 _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 __NSPR_TLS

Definition at line 476 of file _os2.h.

Collaboration diagram for __NSPR_TLS:
Class Members
struct _PRCPU * _pr_currentCPU
struct PRThread * _pr_currentThread
struct PRThread * _pr_thread_last_run
struct _MDFileMap

Definition at line 183 of file _beos.h.

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

Definition at line 549 of file _os2.h.

Class Members
ULONG hisig
ULONG losig
USHORT signexp
struct _CONTEXTRECORD

Definition at line 554 of file _os2.h.

Collaboration diagram for _CONTEXTRECORD:
Class Members
ULONG ContextFlags
ULONG ctx_EFlags
ULONG ctx_env
ULONG ctx_RegEax
ULONG ctx_RegEbp
ULONG ctx_RegEbx
ULONG ctx_RegEcx
ULONG ctx_RegEdi
ULONG ctx_RegEdx
ULONG ctx_RegEip
ULONG ctx_RegEsi
ULONG ctx_RegEsp
ULONG ctx_SegCs
ULONG ctx_SegDs
ULONG ctx_SegEs
ULONG ctx_SegFs
ULONG ctx_SegGs
ULONG ctx_SegSs
FPREG ctx_stack
union _MDDir.d_entry

Definition at line 157 of file _os2.h.

Class Members
FILEFINDBUF3L large
FILEFINDBUF3 small
struct _MDNotified.cv

Definition at line 181 of file _os2.h.

Class Members
struct _MDCVar * cv
struct PRThread * notifyHead
PRIntn times

Define Documentation

Definition at line 326 of file _os2.h.

Definition at line 243 of file _os2.h.

#define _MD_ALLOC_SEGMENT (   seg,
  size,
  vaddr 
)    0

Definition at line 347 of file _os2.h.

Definition at line 311 of file _os2.h.

Definition at line 312 of file _os2.h.

Definition at line 310 of file _os2.h.

Definition at line 313 of file _os2.h.

Definition at line 371 of file _os2.h.

Definition at line 370 of file _os2.h.

Definition at line 327 of file _os2.h.

Definition at line 429 of file _os2.h.

Definition at line 361 of file _os2.h.

Definition at line 458 of file _os2.h.

Definition at line 512 of file _os2.h.

Definition at line 342 of file _os2.h.

Definition at line 236 of file _os2.h.

Definition at line 534 of file _os2.h.

Definition at line 292 of file _os2.h.

Definition at line 323 of file _os2.h.

Definition at line 521 of file _os2.h.

Definition at line 439 of file _os2.h.

Definition at line 358 of file _os2.h.

#define _MD_CURRENT_CPU ( )    pThreadLocalStorage->_pr_currentCPU

Definition at line 493 of file _os2.h.

Definition at line 176 of file _os2.h.

Definition at line 355 of file _os2.h.

Definition at line 244 of file _os2.h.

Definition at line 447 of file _os2.h.

Definition at line 427 of file _os2.h.

Definition at line 259 of file _os2.h.

Definition at line 260 of file _os2.h.

Definition at line 261 of file _os2.h.

Definition at line 262 of file _os2.h.

Definition at line 263 of file _os2.h.

Definition at line 264 of file _os2.h.

Definition at line 431 of file _os2.h.

Definition at line 265 of file _os2.h.

Definition at line 266 of file _os2.h.

Definition at line 267 of file _os2.h.

#define _MD_EFAULT   SOCEFAULT

Definition at line 268 of file _os2.h.

Definition at line 269 of file _os2.h.

Definition at line 270 of file _os2.h.

Definition at line 271 of file _os2.h.

Definition at line 272 of file _os2.h.

Definition at line 428 of file _os2.h.

Definition at line 373 of file _os2.h.

Definition at line 372 of file _os2.h.

Definition at line 273 of file _os2.h.

Definition at line 274 of file _os2.h.

Definition at line 275 of file _os2.h.

Definition at line 276 of file _os2.h.

Definition at line 277 of file _os2.h.

#define _MD_ERRNO ( )    errno

Definition at line 340 of file _os2.h.

Definition at line 278 of file _os2.h.

Definition at line 459 of file _os2.h.

Definition at line 364 of file _os2.h.

Definition at line 432 of file _os2.h.

Definition at line 414 of file _os2.h.

#define _MD_FREE_LOCK (   lock)    (DosCloseMutexSem((lock)->mutex))

Definition at line 394 of file _os2.h.

Definition at line 348 of file _os2.h.

Definition at line 305 of file _os2.h.

#define _MD_GET_ATTACHED_THREAD ( )    pThreadLocalStorage->_pr_currentThread

Definition at line 486 of file _os2.h.

Definition at line 351 of file _os2.h.

Definition at line 469 of file _os2.h.

Definition at line 524 of file _os2.h.

#define _MD_GET_SOCKET_ERROR ( )    sock_errno()

Definition at line 279 of file _os2.h.

#define _MD_GET_SP (   thread)    (thread)->md.gcContext[6]

Definition at line 224 of file _os2.h.

Definition at line 237 of file _os2.h.

Definition at line 238 of file _os2.h.

Definition at line 239 of file _os2.h.

Definition at line 240 of file _os2.h.

Definition at line 301 of file _os2.h.

Definition at line 300 of file _os2.h.

Definition at line 302 of file _os2.h.

Definition at line 363 of file _os2.h.

Definition at line 309 of file _os2.h.

Definition at line 357 of file _os2.h.

#define _MD_INIT_CONTEXT (   _thread,
  _sp,
  _main,
  status 
)
Value:
PR_BEGIN_MACRO \
    *status = PR_TRUE; \
    PR_END_MACRO

Definition at line 460 of file _os2.h.

Definition at line 433 of file _os2.h.

Definition at line 287 of file _os2.h.

Definition at line 284 of file _os2.h.

Definition at line 316 of file _os2.h.

Definition at line 508 of file _os2.h.

Definition at line 434 of file _os2.h.

Definition at line 346 of file _os2.h.

Definition at line 511 of file _os2.h.

Definition at line 356 of file _os2.h.

Definition at line 468 of file _os2.h.

Definition at line 472 of file _os2.h.

Definition at line 471 of file _os2.h.

Definition at line 470 of file _os2.h.

Definition at line 420 of file _os2.h.

Definition at line 421 of file _os2.h.

Definition at line 455 of file _os2.h.

#define _MD_LAST_THREAD ( )    pThreadLocalStorage->_pr_thread_last_run

Definition at line 490 of file _os2.h.

Definition at line 290 of file _os2.h.

#define _MD_LOCK (   lock)    (DosRequestMutexSem((lock)->mutex, SEM_INDEFINITE_WAIT))

Definition at line 395 of file _os2.h.

Definition at line 248 of file _os2.h.

Definition at line 233 of file _os2.h.

Definition at line 234 of file _os2.h.

#define _MD_MAGIC_CV   0x66666666

Definition at line 119 of file _os2.h.

#define _MD_MAGIC_DIR   0x55555555

Definition at line 118 of file _os2.h.

#define _MD_MAGIC_SEGMENT   0x44444444

Definition at line 117 of file _os2.h.

#define _MD_MAGIC_THREAD   0x22222222

Definition at line 115 of file _os2.h.

#define _MD_MAGIC_THREADSTACK   0x33333333

Definition at line 116 of file _os2.h.

Definition at line 246 of file _os2.h.

Definition at line 286 of file _os2.h.

Definition at line 528 of file _os2.h.

Definition at line 531 of file _os2.h.

Definition at line 245 of file _os2.h.

Definition at line 413 of file _os2.h.

Definition at line 393 of file _os2.h.

Definition at line 415 of file _os2.h.

Definition at line 416 of file _os2.h.

Definition at line 228 of file _os2.h.

Definition at line 341 of file _os2.h.

Definition at line 229 of file _os2.h.

Definition at line 333 of file _os2.h.

Definition at line 322 of file _os2.h.

Definition at line 317 of file _os2.h.

Definition at line 352 of file _os2.h.

Definition at line 288 of file _os2.h.

Definition at line 230 of file _os2.h.

Definition at line 343 of file _os2.h.

Definition at line 328 of file _os2.h.

Definition at line 294 of file _os2.h.

Definition at line 242 of file _os2.h.

Definition at line 465 of file _os2.h.

Definition at line 368 of file _os2.h.

Definition at line 366 of file _os2.h.

Definition at line 247 of file _os2.h.

Definition at line 329 of file _os2.h.

Definition at line 293 of file _os2.h.

#define _MD_SET_CURRENT_CPU (   _cpu)    _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_currentCPU = (_cpu)

Definition at line 494 of file _os2.h.

#define _MD_SET_CURRENT_THREAD (   _thread)    _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_currentThread = (_thread)

Definition at line 488 of file _os2.h.

Definition at line 306 of file _os2.h.

#define _MD_SET_LAST_THREAD (   _thread)    _PR_MD_ENSURE_TLS(); pThreadLocalStorage->_pr_thread_last_run = (_thread)

Definition at line 491 of file _os2.h.

Definition at line 360 of file _os2.h.

Definition at line 303 of file _os2.h.

Definition at line 362 of file _os2.h.

Definition at line 289 of file _os2.h.

Definition at line 319 of file _os2.h.

Definition at line 321 of file _os2.h.

Definition at line 298 of file _os2.h.

Definition at line 425 of file _os2.h.

Definition at line 241 of file _os2.h.

Definition at line 426 of file _os2.h.

Definition at line 367 of file _os2.h.

Definition at line 365 of file _os2.h.

Definition at line 464 of file _os2.h.

#define _MD_TEST_AND_LOCK (   lock)    (DosRequestMutexSem((lock)->mutex, SEM_INDEFINITE_WAIT),0)

Definition at line 396 of file _os2.h.

Definition at line 249 of file _os2.h.

Definition at line 430 of file _os2.h.

Value:
PR_BEGIN_MACRO \
    if (0 != (lock)->notified.length) { \
        md_UnlockAndPostNotifies((lock), NULL, NULL); \
    } else { \
        DosReleaseMutexSem((lock)->mutex); \
    } \
    PR_END_MACRO

Definition at line 397 of file _os2.h.

Definition at line 250 of file _os2.h.

Definition at line 408 of file _os2.h.

Definition at line 412 of file _os2.h.

Definition at line 451 of file _os2.h.

Definition at line 369 of file _os2.h.

Definition at line 409 of file _os2.h.

Definition at line 231 of file _os2.h.

Definition at line 232 of file _os2.h.

Definition at line 359 of file _os2.h.

Definition at line 93 of file _os2.h.

Definition at line 96 of file _os2.h.

Definition at line 95 of file _os2.h.

Definition at line 376 of file _os2.h.

#define _PR_LockSched ( )    0

Definition at line 504 of file _os2.h.

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

Definition at line 90 of file _os2.h.

#define _PR_SI_SYSNAME   "OS2"

Definition at line 89 of file _os2.h.

Definition at line 377 of file _os2.h.

#define _PR_UnlockSched ( )    0

Definition at line 505 of file _os2.h.

#define CONTEXT_CONTROL   0x00000001

Definition at line 542 of file _os2.h.

#define CONTEXT_FLOATING_POINT   0x00000008

Definition at line 545 of file _os2.h.

#define CONTEXT_FULL   0x0000000F

Definition at line 546 of file _os2.h.

#define CONTEXT_INTEGER   0x00000002

Definition at line 543 of file _os2.h.

#define CONTEXT_SEGMENTS   0x00000004

Definition at line 544 of file _os2.h.

#define FreeLibrary (   x)    DosFreeModule((HMODULE)x)

Definition at line 589 of file _os2.h.

#define GC_VMBASE   0x40000000

Definition at line 111 of file _os2.h.

#define GC_VMLIMIT   0x00FFFFFF

Definition at line 112 of file _os2.h.

#define HANDLE   unsigned long

Definition at line 98 of file _os2.h.

Definition at line 92 of file _os2.h.

typedef HINSTANCE   HMODULE

Definition at line 99 of file _os2.h.

Definition at line 44 of file _os2.h.

Definition at line 46 of file _os2.h.

Definition at line 45 of file _os2.h.

Definition at line 42 of file _os2.h.

Definition at line 47 of file _os2.h.

Definition at line 48 of file _os2.h.

#define LOCK_SCHEDULER ( )    0

Definition at line 502 of file _os2.h.

Definition at line 590 of file _os2.h.

Definition at line 336 of file _os2.h.

Definition at line 337 of file _os2.h.

#define PR_LINKER_ARCH   "os2"

Definition at line 88 of file _os2.h.

Definition at line 109 of file _os2.h.

Definition at line 338 of file _os2.h.

Definition at line 339 of file _os2.h.

#define UNLOCK_SCHEDULER ( )    0

Definition at line 503 of file _os2.h.


Typedef Documentation

typedef struct _MDNotified

Definition at line 177 of file _os2.h.

typedef struct __NSPR_TLS _NSPR_TLS
typedef struct _CONTEXTRECORD CONTEXTRECORD
typedef DWORD

Definition at line 537 of file _os2.h.

typedef int(* FARPROC)()

Definition at line 113 of file _os2.h.

typedef void(* FiberFunc)(void *)

Definition at line 107 of file _os2.h.

typedef struct _FPREG FPREG
typedef struct _CONTEXTRECORD * PCONTEXTRECORD
typedef ULONG * PDWORD

Definition at line 537 of file _os2.h.

Definition at line 110 of file _os2.h.


Function Documentation

PRInt32 _MD_Accept ( PRFileDesc fd,
PRNetAddr raddr,
PRUint32 rlen,
PRIntervalTime  timeout 
)

Definition at line 267 of file os2sock.c.

{
    PRInt32 osfd = fd->secret->md.osfd;
    PRInt32 rv, err;
    PRThread *me = _PR_MD_CURRENT_THREAD();

    while ((rv = accept(osfd, (struct sockaddr*) addr, (int*)addrlen)) == -1)
    {
        err = sock_errno();
        if ((err == EWOULDBLOCK) || (err == ECONNABORTED))
        {
            if (fd->secret->nonblocking) {
                break;
            }
                if ((rv = socket_io_wait(osfd, READ_FD, timeout)) < 0)
                    goto done;
        } else if ((err == EINTR) && (!_PR_PENDING_INTERRUPT(me))){
            continue;
        } else {
            break;
        }
    }
    if (rv < 0) {
        _PR_MD_MAP_ACCEPT_ERROR(err);
    }
done:
    return(rv);
}

Definition at line 426 of file os2io.c.

{
    PRInt32 rv;
    
    rv = DosClose((HFILE)osfd);
       if (rv != NO_ERROR)
              _PR_MD_MAP_CLOSE_ERROR(rv);
    return rv;
}
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;
}

Definition at line 91 of file os2sock.c.

{
    PRInt32 rv, err;

    rv = soclose(osfd);
    if (rv == -1) {
        err = sock_errno();
        _PR_MD_MAP_CLOSE_ERROR(err);
    }
    return rv;
}
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;
}
struct PRThread* _MD_CURRENT_THREAD ( void  ) [read]

Definition at line 392 of file os2thred.c.

{
    PRThread *thread;

    thread = _MD_GET_ATTACHED_THREAD();

    if (NULL == thread) {
        thread = _PRI_AttachThread(PR_USER_THREAD, PR_PRIORITY_NORMAL, NULL, 0);
    }

    PR_ASSERT(thread != NULL);
    return thread;
}

Definition at line 1918 of file macio.c.

{
    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
    return -1;
}

Definition at line 667 of file os2sock.c.

{
    PRInt32 osfd = fd->secret->md.osfd;
    PRInt32 err;
    PRUint32  one = 1;
    
    if (osfd <= 2) {
        /* Don't mess around with stdin, stdout or stderr */
        return;
    }

    err = _OS2_IOCTL( osfd, FIONBIO, (char *) &one, sizeof(one));
    if ( err != 0 )
    {
        err = sock_errno();
        _PR_MD_MAP_SOCKET_ERROR(err);
    }
}
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;
}

Definition at line 751 of file os2_errors.c.

{
    int err;
    int len = sizeof(err);
    if (getsockopt(osfd, SOL_SOCKET, SO_ERROR, (char *) &err, &len) == -1) {
        return sock_errno();
    } else {
        return err;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 104 of file os2sock.c.

{
    PRInt32 result;

    if (_OS2_IOCTL(fd->secret->md.osfd, FIONREAD, (char *) &result, sizeof(result)) < 0) {
        PR_SetError(PR_BAD_DESCRIPTOR_ERROR, sock_errno());
        return -1;
    }
    return result;
}
struct PRProcess* _PR_CreateOS2Process ( const char *  path,
char *const argv,
char *const envp,
const struct PRProcessAttr attr 
) [read]
PRStatus _PR_DetachOS2Process ( struct PRProcess process)

Definition at line 465 of file os2misc.c.

{
    /* On OS/2, a process is either created as a child or not. 
     * You can't 'detach' it later on.
     */
    PR_DELETE(process);
    return PR_SUCCESS;
}
PRStatus _PR_KillOS2Process ( struct PRProcess process)

Definition at line 497 of file os2misc.c.

{
   ULONG ulRetVal;
    if ((ulRetVal = DosKillProcess(DKP_PROCESS, process->md.pid)) == NO_ERROR) {
       return PR_SUCCESS;
    }
    PR_SetError(PR_UNKNOWN_ERROR, ulRetVal);
    return PR_FAILURE;
}
PRStatus _PR_WaitOS2Process ( struct PRProcess process,
PRInt32 exitCode 
)

Definition at line 477 of file os2misc.c.

{
    ULONG ulRetVal;
    RESULTCODES results;
    PID pidEnded = 0;

    ulRetVal = DosWaitChild(DCWA_PROCESS, DCWW_WAIT, 
                            &results,
                            &pidEnded, process->md.pid);

    if (ulRetVal != NO_ERROR) {
       printf("\nDosWaitChild rc = %lu\n", ulRetVal);
        PR_SetError(PR_UNKNOWN_ERROR, ulRetVal);
        return PR_FAILURE;
    }
    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 313 of file nsNativeAppSupportOS2.h.

Definition at line 52 of file os2thred.c.