Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Netscape Portable Runtime
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|C programming language library}} {{Multiple issues| {{Primary sources|date=January 2024}} {{Notability|date=January 2024}} }} {{Infobox software | name = Netscape Portable Runtime | caption = | latest release version = {{wikidata|property|reference|edit|P348}} | latest release date = {{release date and age|{{wikidata|qualifier|P348|P577}}}} | programming language = [[C (programming language)|C]] | developer = [[Mozilla Foundation]] / [[Mozilla Corporation]] | operating system = [[Cross-platform]] | genre = [[Library (computer science)|Software library]] | license = [[Mozilla Public License|MPL]] | website = {{URL|https://firefox-source-docs.mozilla.org/nspr/index.html}} }} 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.<ref name="nspr-index">{{cite web |url=https://firefox-source-docs.mozilla.org/nspr/ |title=NSPR |website=Firefox Source Docs |publisher=Mozilla |access-date=2024-01-27}}</ref> == 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.<ref name="nspr-about">{{cite web |url=https://firefox-source-docs.mozilla.org/nspr/about_nspr.html |title=About NSPR |author=Larry H. |website=Firefox Source Docs |publisher=Mozilla |access-date=2024-01-27}}</ref> NSPR continues to be used today by Firefox as well as many of Oracle and Red Hat's server products.<ref name="nspr-index" /> == Features == === Threads === NSPR provides a [[Thread (computer science)|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. [[Lock (computer science)|Locks]], [[Linearizability#Primitive_atomic_instructions|atomics]], [[Semaphore_(programming)|semaphores]], and both cached and uncached [[Monitor (synchronization)|monitors]] are provided.<ref name="nspr-api">{{cite web |url=https://firefox-source-docs.mozilla.org/nspr/reference/index.html |title=NSPR API Reference |website=Firefox Source Docs |publisher=Mozilla |access-date=2024-01-27}}</ref> === I/O === NSPR provides functions for working with files, directories, [[Anonymous pipe|anonymous pipes]] and [[Network socket|network sockets]].<ref name="nspr-api" /> === Network addresses === NSPR defines an [[Internet Protocol|IP]]-centric network address object. Functions are provided to translate [[ASCII]] strings ([[Domain Name System|DNS]] names) into NSPR's network address structures, regardless of whether the addressing technology uses IPv4 or IPv6.<ref name="nspr-about" /><ref name="nspr-api" /> === 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.<ref name="nspr-about" /><ref name="nspr-api" /> === Memory management === NSPR provides API to perform the basic [[malloc]], [[calloc]], [[realloc]] and [[free (programming)|free]] functions. Depending on the platform, the functions may be implemented almost entirely in the NSPR runtime or simply [[shim (computing)|shims]] that call immediately into the host operating system's offerings.<ref name="nspr-about" /><ref name="nspr-api" /> === 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.<ref name="nspr-about" /><ref name="nspr-api" /> === Data structures === NSPR provides implementations of a [[Linked_list#Circular_linked_list|circular linked list]] and a [[hash table]].<ref name="nspr-api" /> == See also == {{Portal|Free and open-source software}} * [[Apache Portable Runtime]] * [[Adaptive Communication Environment]] * [[Cross-platform support middleware]] ==References== {{Reflist}} ==External links== * [https://developer.mozilla.org/docs/NSPR/ Official website] * [https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/ NSPR source code] {{Mozilla projects}} [[Category:Application programming interfaces]] [[Category:Mozilla]] [[Category:Netscape]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Main other
(
edit
)
Template:Mozilla projects
(
edit
)
Template:Multiple issues
(
edit
)
Template:Portal
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Template other
(
edit
)