NSPR 3.1 Release
Table of Contents
- What's New
- Library Version Specification
- Release Components
- Test Data
- Reporting bugs
- Building from source
- Contact Info
2.1 New functions and features1. Support for creation of kernel/bound threads
A new value of PRThreadScope, PR_GLOBAL_BOUND_THREAD, can be used to create a kernel/bound thread on platforms where native support is available.2. Faster implementation of atomic operations
The implementation of atomic operations now uses multiple locks, as opposed to a single global lock, on platforms that don't support native atomic operations.3. Enhancement implementation of PLEvent
Multiple event queues can be created on all platforms. Global data and functions referencing global data (e.g. PL_GetMainEventQueue()) have been removed. Event queues may be created using different notification methods: platform native methods and monitored (using PRMonitor). See specs/plevent.html for specification of all changes.4. Inheritance of file descriptors
NSPR file descriptors can be inherited by a child process from a parent process when using PR_CreateProcess. This feature is fully supported on Unix and NT and partially supported on Win95/98 (sockets cannot be inherited).5. Localizable error code translation
The NSPR error codes can be translated to text strings with UTF-8 encoding. NSPR provides translation to US-English text, with support for adding callback functions for translation to other languages.6. Faster implementation of TransmitFile function on AIX
The implementation is for a draft/preliminary API and is subject to change in future releases without affecting backward compatibility.
The new implementation uses the native send_file function on AIX 4.3.2, for faster performance.
7. Static libraries not supported
Static libraries are no longer supported.
8. Year 2000 Certification
2.2 Bug fixesSeveral bugs are fixed in this release.
2.3 Obsolete interfaceThe reader-writer lock interface in libnsps is obsolete as it is now implemented in libnspr.
The full release number of nspr library can be determined in several ways:
1. The nspr library exports a function, libVersionPoint, that can be
called to retrieve the version of the library. The function and data
prototypes are available for other libraries to provide similar version
2. On Win32 systems, the version number is embedded in the resource descriptor of the DLL and can be viewed using Windows Explorer. On Unix system, the "what" command of sccs or the "ident" command of rcs can be used to obtain the version information.
3. The PR_VersionCheck function can be called to check for compatibility; given a version number the function returns success condition if the version of the nspr library loaded into the application is compatible.
Certified OS releases
|Sun WorkShop 4.2|
|Sun WorkShop 4.2|
|6.5||MIPS Pro 7.2.1/-n32|
|4.0D||DEC C V5.6-079
DIGITAL C++ V6.1-027
|A.10.30 HP C Compiler
HP C++ HPCPLUSPLUS A.10.28
|11.0||A.11.01.00 HP C Compiler
a HP ANSI C++ B3910B A.03.13
|11.0||A.11.00.00 HP C Compiler
HP aC++ B3910B A.03.04
|Linux (Redhat)||Redhat 5.2 (kernel 2.0)
kernel 2.0 and 2.2.1
|4.0 SP3/SP4||VC++ 4.2|
|Windows 95||Win 95
Win NT 4.0
Important changes to note are:
The pthreads-based (n32) version of nspr is now the default and only version available. The sproc-based version (o32) is discontinued..
Two binaries are supported for Solaris3. Win32
1. The Solaris 2.5.1 binary is for applications running on Solaris 2.5.1 and Solaris 2.6.
2. The Solaris 2.6 binary is for applications running on Solaris 2.6 and 2.7.
The two binaries are needed because Sun does not support applications built on Solaris 2.5.1 but run on Solaris 2.7.
To use purify on Solaris, libpthread should be explicitly specified in the list of libraries passed to the linker, ahead of other system libraries such as -lposix4, -lsocket, -ldl, etc.,.
Support for NT 3.51 is no longer available for both the Win NT and Win95 builds of NSPR.
For the nspr library, binary compatibility does not preclude the addition of new error codes to the set of nspr error codes already defined. An application should allow for nspr functions returning error codes not documented for the particular release with which it is linked. This helps to retain backward compatibility as new error codes are added upon discovery of new information about platform-specific error codes.
6.1 Platform DirectoryThe platform-dependent name of the directory where the components are placed is of the form
SunOS5.5.1_OPT.OBJ (optimized build)
IRIX6.2_n32_PTH_DBG.OBJ (built using the -n32 compiler option,
pthreads implementation strategy)
6.2 Implementation StrategyFor the implementation of nspr, different strategies are used on different platforms. On some platforms the nspr threads map directly to the native threads on the platform, while on others nspr supports both threads that are scheduled by nspr and the native threads.
The default implementation strategies in this release are:
- pthreads: all Unix platforms
- classic: Win NT (combined MxN model, with Windows threads and fibers)
- native threads: Win95
6.3 ComponentsUnder each <platform> directory, there are:
1. include directory, containing the header files
2. lib directory, containing the libraries. Three libraries are built on all platforms: nspr, plc, plds. Two other
libraries are built on server platforms only: ares and prstrms. Only shared (dynamic link) and purified
(for a subset of platforms) versions of the libraries are built.
The nspr library exports the core nspr20 functions.
The plc (Portable Library C) library is a separate library from
the core nspr20. You do
not need to use plc if you just want to use the core nspr20 functions. The plc library currently
contains thread-safe string functions and command-line option functions.
The plds (Portable Library Data Structures) library supports data structures such as arenas, hash tables, and event queues. It is important to note that services of plds are not thread-safe. To use these services in a multi-threaded environment, clients have to implement their own thread-safe access, by acquiring locks/monitors, for example.
For Solaris platforms with UltraSparc processors only, a platform-specific library, libultrasparc, is also supplied. This library implements optimized versions of atomic operations by using the features present in the UltraSparc (V9) processors, but not in the Sparc (V8) processors. This library is linked into libnspr, with the name libatomic, by use of the auxiliary filter mechanism of the Solaris linker. To use this library at runtime, on UltraSparc systems, libultrasparc21.so should be copied into a file named libatomic.so and the new file should be present in the path searched by the linker.
3. bin directory, containing a perl script, compile-et.pl, and a Java
4. mdheader.jar, jar file for the header files.
5. mdbinary.jar, jar for the libraries, executable programs, and scripts.
7.1 Runtime Error DetectionA subset of the test programs were run successfully on Solaris and Windows NT (both Win95 and Win NT versions) with the purify program. Bugsplat. The following information is required
- platform (Solaris 2.5.1, HP-UX 11.0, etc.)
- number of cpus in the system
- a stack trace, in the event of a crash
- reproducibility of the problem
- location of core dump, if available, along with those for the libraries and executables
NSPR20_RELEASE_3_1. You can check out the source from CVS by
cvs co -r NSPR20_RELEASE_3_1 ns/nspr20
To build, do
http://warp/projects/hardcore/prj-nspr20 - nspr home page
nsprgroup - the nspr team
nspr20eng - mailing list for nspr developers
nspr20clients - mailing list for nspr clients
netscape.public.mozilla.nspr - nspr newsgroup at mozilla.org