Name Description Size Coverage
.cvsignore 9 -
Makefile.in 1379 -
ntdllmn.c The DLL entry point (DllMain) for NSPR. The only reason we use DLLMain() now is to find out whether the NSPR DLL is statically or dynamically loaded. When dynamically loaded, we cannot use static thread-local storage. However, static TLS is faster than the TlsXXX() functions. So we want to use static TLS whenever we can. A global variable _pr_use_static_tls is set in DllMain() during process attachment to indicate whether it is safe to use static TLS or not. 1641 -
ntgc.c GC related routines 2949 -
ntinrval.c NT interval timers 1046 -
ntio.c Windows NT IO module This module handles IO for LOCAL_SCOPE and GLOBAL_SCOPE threads. For LOCAL_SCOPE threads, we're using NT fibers. For GLOBAL_SCOPE threads we're using NT-native threads. When doing IO, we want to use completion ports for optimal performance with fibers. But if we use completion ports for all IO, it is difficult to project a blocking model with GLOBAL_SCOPE threads. To handle this we create an extra thread for completing IO for GLOBAL_SCOPE threads. We don't really want to complete IO on a separate thread for LOCAL_SCOPE threads because it means extra context switches, which are really slow on NT... Since we're using a single completion port, some IO will be incorrectly completed on the GLOBAL_SCOPE IO thread; this will mean extra context switching; but I don't think there is anything I can do about it. 129544 -
ntmisc.c ntmisc.c 32394 -
ntsec.c ntsec.c Implement the POSIX-style mode bits (access permissions) for files and other securable objects in Windows NT using Windows NT's security descriptors with appropriate discretionary access-control lists. 7794 -
ntsem.c NT-specific semaphore handling code. 981 -
ntthread.c for _beginthreadex() 14457 -
objs.mk 884 -
w32ipcsem.c File: w32ipcsem.c Description: implements named semaphores for NT and WIN95. 6183 -
w32poll.c This file implements _PR_MD_PR_POLL for Win32. 8536 -
w32rng.c 1756 -
w32shm.c NSPR-to-NT access right mapping table for file-mapping objects. The OR of these three access masks must equal FILE_MAP_ALL_ACCESS. This is because if a file-mapping object with the specified name exists, CreateFileMapping requests full access to the existing object. 9543 -
w95cv.c w95cv.c -- Windows 95 Machine-Dependent Code for Condition Variables We implement our own condition variable wait queue. Each thread has a semaphore object (thread->md.blocked_sema) to block on while waiting on a condition variable. We use a deferred condition notify algorithm. When PR_NotifyCondVar or PR_NotifyAllCondVar is called, the condition notifies are simply recorded in the _MDLock structure. We defer the condition notifies until right after we unlock the lock. This way the awakened threads have a better chance to reaquire the lock. 10796 -
w95dllmain.c The DLL entry point (DllMain) for NSPR. This is used to detach threads that were automatically attached by nspr. 943 -
w95io.c Windows 95 IO module Assumes synchronous I/O. 33019 -
w95sock.c Win95 Sockets module 21146 -
w95thred.c for _beginthreadex() 8708 -
win32_errors.c On Win32, we map three kinds of error codes: - GetLastError(): for Win32 functions - WSAGetLastError(): for Winsock functions - errno: for standard C library functions GetLastError() and WSAGetLastError() return error codes in non-overlapping ranges, so their error codes (ERROR_* and WSAE*) can be mapped by the same function. On the other hand, errno and GetLastError() have overlapping ranges, so we need to use a separate function to map errno. We do not check for WSAEINPROGRESS and WSAEINTR because we do not use blocking Winsock 1.1 calls. Except for the 'socket' call, we do not check for WSAEINITIALISED. It is assumed that if Winsock is not initialized, that fact will be detected at the time we create new sockets. 12372 -