NSPR

From CDOT Wiki
Revision as of 12:58, 4 October 2006 by SaraM (talk | contribs)
Jump to: navigation, search

Simply Put: What is NSPR?

NSPR - The Netscape Portable Runtime - a API that allows all operating systems to appear as the same operating system to MOzilla for making it possible to create code that is cross-platform.

What Does NSPR Do?

In order to write code that is cross-platform, a platform abstraction library is needed to provide uniform service for a wide range of operating systems. NSPR provides a layer of abstraction between platforms and services. The services that NSPR offers are: threads, thread synchronization, normal file and network I/O, interval timing and calendar time, basic memory management (malloc and free) and shared library linking. A detailed description of how NSPR works with these services is located here. Much like the Java Vitural Machine (JVM), NSPR controls a consistent behaviour for each of these services, regardless of which operating system is being used.

Resources/Tutorials/Examples

Overview

Someone made an overview of the Netscape portable runtime (a little outdated, 1999) in powerpoint here

API Reference

You can get the reference to the API here

Test Cases

You can get test cases from the Mozilla LXR. The filenames are self explanitory on what API components are tested (eg threads, locks, time). If in doubt, read the README.TXT file which lists all the files and what components they test. They are also meant as example code that is well commented.

Technical Notes

There are several notes on developing NSPR. For example, about forks, killing threads, and porting NSPR to a new platform.

Getting in contact

Telephone

The maintainers have irregular scheduled telephone meetings on Tuesdays. This requires contacting the maintainers for information.

Newsgroup

There is also a newsgroup available here news://news.mozilla.org/netscape.public.mozilla.nspr