Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Netscape Portable Runtime
C programming language library

The Netscape Portable Runtime, or NSPR, is a cross-platform abstraction layer library for the C programming language. It provides a uniform API for various operating system functions.

We don't have any images related to Netscape Portable Runtime yet.
We don't have any YouTube videos related to Netscape Portable Runtime yet.
We don't have any PDF documents related to Netscape Portable Runtime yet.
We don't have any Books related to Netscape Portable Runtime yet.
We don't have any archived web articles related to Netscape Portable Runtime yet.

History

NSPR was originally designed to provide a base for the Java virtual machine in Netscape 5. Over time it was extended to allow support for additional functionality used for Netscape's server and client software.2 NSPR continues to be used today by Firefox as well as many of Oracle and Red Hat's server products.3

Features

Threads

NSPR provides a thread API. It uses the OS's threading capabilities where possible. It also provides support for sharing memory between threads, as well as creating and using thread pools. Locks, atomics, semaphores, and both cached and uncached monitors are provided.4

I/O

NSPR provides functions for working with files, directories, anonymous pipes and network sockets.5

Network addresses

NSPR defines an IP-centric network address object. Functions are provided to translate ASCII strings (DNS names) into NSPR's network address structures, regardless of whether the addressing technology uses IPv4 or IPv6.67

Time

NSPR makes timing facilities available in two forms: interval timing and calendar functions.

Interval timers are based on a free running 32-bit resolution timer. Their epoch and interval can be set as needed.

Calendar times are represented using 64-bit signed Unix time. NSPR provides functions for manipulating and converting timestamps.89

Memory management

NSPR provides API to perform the basic malloc, calloc, realloc and free functions. Depending on the platform, the functions may be implemented almost entirely in the NSPR runtime or simply shims that call immediately into the host operating system's offerings.1011

Linking

Support for linking (shared library loading and unloading) forms part of NSPR's feature set. In most cases this is simply a smoothing over of the facilities offered by the various platform providers.1213

Data structures

NSPR provides implementations of a circular linked list and a hash table.14

See also

  • Free and open-source software portal

References

  1. "NSPR". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/

  2. Larry H. "About NSPR". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/about_nspr.html

  3. "NSPR". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/

  4. "NSPR API Reference". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/reference/index.html

  5. "NSPR API Reference". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/reference/index.html

  6. Larry H. "About NSPR". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/about_nspr.html

  7. "NSPR API Reference". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/reference/index.html

  8. Larry H. "About NSPR". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/about_nspr.html

  9. "NSPR API Reference". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/reference/index.html

  10. Larry H. "About NSPR". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/about_nspr.html

  11. "NSPR API Reference". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/reference/index.html

  12. Larry H. "About NSPR". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/about_nspr.html

  13. "NSPR API Reference". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/reference/index.html

  14. "NSPR API Reference". Firefox Source Docs. Mozilla. Retrieved 2024-01-27. https://firefox-source-docs.mozilla.org/nspr/reference/index.html