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
(section)
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!
== 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" />
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)