aboutsummaryrefslogtreecommitdiff
path: root/files/ja/mozilla/projects/nspr/about_nspr/index.html
blob: 179b222508250f42413f97712e18b6c3d655ce03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
---
title: NSPRについて
slug: Mozilla/Projects/NSPR/About_NSPR
translation_of: Mozilla/Projects/NSPR/About_NSPR
---
<section id="Quick_Links">
<ol>
  <li><a href="/ja/docs/Mozilla/Projects/NSPR">NSPR</a></li>
  <li><a href="/ja/docs/Mozilla/Projects/NSPR/About_NSPR">About NSPR</a></li>
  <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference">NSPR API Reference</a></li>
  <li><a href="/ja/docs/Mozilla/Projects/NSPR/NSPR_build_instructions">NSPR Build Instruction</a></li>
  <li><a href="/ja/docs/Mozilla/Projects/NSPR/Release_process">NSPR Release Process</a></li>
  <li class="toggle">
    <details>
      <summary>Introduction to NSPR</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Naming_Conventions">NSPR Naming Conventions</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Threads">NSPR Threads</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Thread_Schedoling">Thread Scheduling</a>
              <ol>
                <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Setting_Thread_Priorities">Setting Thread Priorities</a></li>
                <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Preempting_Threads">Preempting Threads</a></li>
                <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Interrupting_Threads">Interrupting Threads</a></li>
              </ol>
            </li>
          </ol>
        </li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Thread_Synchronization">NSPR Thread Synchronization</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Locks_and_Monitors">Locks and Monitors</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#Condition_Variables">Condition Variables</a></li>
          </ol>
        </li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Introduction_to_NSPR#NSPR_Sample_Code">NSPR Sample Code</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>NSPR Types</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Calling_Convention_Types">Calling Convention Types</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Algebraic_Types">Algebraic Types</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#8-.2C_16-.2C_and_32-bit_Integer_Types">8-, 16-, and 32-bit Integer Types</a>
              <ol>
                <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Signed_Integers">Signed Integers</a></li>
                <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Unsigned_Integers">Unsigned Integers</a></li>
              </ol>
            </li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#64-bit_Integer_Types">64-bit Integer Types</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Floating-Point_Number_Type">Floating-Point Integer Type</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Native_OS_Integer_Types">Native OS Integer Types</a></li>
          </ol>
        </li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Miscellaneous_Types">Miscellaneous Types</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Size_Type">Size Type</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Pointer_Difference_Types">Pointer Difference Types</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Boolean_Types">Boolean Types</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Types#Status_Type_for_Return_Values">Status Type for Return Values</a></li>
          </ol>
        </li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Threads</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Threads#Threading_Types_and_Constants">Threading Types and Constants</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Threads#Threading_Functions">Threading Functions</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Threads#Creating.2C_Joining.2C_and_Identifying_Threads">Creating, Joining, and Identifying Threads</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Threads#Controlling_Thread_Priorities">Controlling Thread Priorities</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Threads#Controlling_Per-Thread_Private_Data">Controlling Per-Thread Private Data</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Threads#Interrupting_and_Yielding">Interrupting and Yielding</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Threads#Setting_Global_Thread_Concurrency">Setting Global Thread Concurrency</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Threads#Getting_a_Thread.27s_Scope">Getting a Thread's Scope</a></li>
          </ol>
        </li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Process Initialization</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Identity_and_Versioning">Identity and Versioning</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Name_and_Version_Constants">Name and Version Constants</a></li>
          </ol>
        </li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Initialization_and_Cleanup">Initialization and Cleanup</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Process_Initialization#Module_Initialization">Module Initialization</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Locks</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Locks#Lock_Type">Lock Type</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Locks#Lock_Functions">Lock Functions</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Condition Variables</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Condition_Variables#Condition_Variable_Type">Condition Variable Type</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Condition_Variables#Condition_Variable_Functions">Condition Variable Functions</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Monitors</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Monitors#Monitor_Type">Monitor Type</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Monitors#Monitor_Functions">Monitor Functions</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Cached Monitors</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Cached_Monitors#Cached_Monitor_Functions">Cached Monitor Functions</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>I/O Types</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Directory_Type">Directory Type</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#File_Descriptor_Types">File Descriptor Types</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#File_Info_Types">File Info Types</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Network_Address_Types">Network Address Types</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Types_Used_with_Socket_Options_Functions">Types Used with Socket Options Functions</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Type_Used_with_Memory-Mapped_I.2FO">Type Used with Memory-Mapped I/O</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Types#Offset_Interpretation_for_Seek_Functions">Offset Interpretation for Seek Functions</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>I/O Functions</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Functions_that_Operate_on_Pathnames">Functions that Operate on Pathnames</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Functions_that_Act_on_File_Descriptors">Functions that Act on File Descriptors</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Directory_I.2FO_Functions">Directory I/O Functions</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Socket_Manipolation_Functions">Socket Manipolation Functions</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Converting_Between_Host_and_Network_Addresses">Converting Between Host and Network Addresses</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Memory-Mapped_I.2FO_Functions">Memory-Mapped I/O Functions</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Anonymous_Pipe_Function">Anonymous Pipe Function</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Polling_Functions">Polling Functions</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Pollable_Events">Pollable Events</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/I_O_Functions#Manipulating_Layers">Manipulating Layers</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Network Addresses</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Network_Addresses#Network_Address_Types_and_Constants">Network Address Types and Constants</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Network_Addresses#Network_Address_Functions">Network Address Functions</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Atomic Operations</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_AtomicIncrement">PR_AtomicIncrement</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_AtomicDecrement">PR_AtomicDecrement</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_AtomicSet">PR_AtomicSet</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Interval Timing</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Interval_Timing#Interval_Time_Type_and_Constants">Interval Time Type and Constants</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Interval_Timing#Interval_Functions">Interval Functions</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Date and Time</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Date_and_Time#Types_and_Constants">Types and Constants</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Date_and_Time#Time_Parameter_Callback_Functions">Time Parameter Callback Functions</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Date_and_Time#Functions">Functions</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Memory Management Operations</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Memory_Management_Operations#Memory_Allocation_Functions">Memory Allocation Functions</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Memory_Management_Operations#Memory_Allocation_Macros">Memory Allocation Macros</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>String Operations</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PL_strlen">PL_strlen</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PL_strcpy">PL_strcpy</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PL_strdup">PL_strdup</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PL_strfree">PL_strfree</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Floating Point Number to String Conversion</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_strtod">PR_strtod</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_dtoa">PR_dtoa</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_cnvtf">PR_cnvtf</a></li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Linked Lists</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Linked_Lists#Linked_List_Types">Linked List Types</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PRCList">PRCList</a></li>
          </ol>
        </li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Linked_Lists#Linked_List_Macros">Linked List Macros</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_INIT_CLIST">PR_INIT_CLIST</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_INIT_STATIC_CLIST">PR_INIT_STATIC_CLIST</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_APPEND_LINK">PR_APPEND_LINK</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_INSERT_LINK">PR_INSERT_LINK</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_NEXT_LINK">PR_NEXT_LINK</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_PREV_LINK">PR_PREV_LINK</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_REMOVE_LINK">PR_REMOVE_LINK</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_REMOVE_AND_INIT_LINK">PR_REMOVE_AND_INIT_LINK</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_INSERT_BEFORE">PR_INSERT_BEFORE</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_INSERT_AFTER">PR_INSERT_AFTER</a></li>
          </ol>
        </li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Dynamic Library Linking</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Library_Linking_Types">Library Linking Types</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PRLibrary">PRLibrary</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PRStaticLinkTable">PRStaticLinkTable</a></li>
          </ol>
        </li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Library_Linking_Functions">Library Linking Functions</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_SetLibraryPath">PR_SetLibraryPath</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_GetLibraryPath">PR_GetLibraryPath</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_GetLibraryName">PR_GetLibraryName</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_FreeLibraryName">PR_FreeLibraryName</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_LoadLibrary">PR_LoadLibrary</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_UnloadLibrary">PR_UnloadLibrary</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_FindSymbol">PR_FindSymbol</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_FindSymbolAndLibrary">PR_FindSymbolAndLibrary</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Finding_Symbols_Defined_in_the_Main_Executable_Program">Finding Symbols Defined in the Main Executable Program</a></li>
          </ol>
        </li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Platform_Notes">Platform Notes</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Dynamic_Library_Search_Path">Dynamic Library Search Path</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Dynamic_Library_Linking#Exporting_Symbols_from_the_Main_Executable_Program">Exporting Symbols from the Main Executable Program</a></li>
          </ol>
        </li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Process Management and Interprocess Communication</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Process_Management_Types_and_Constants">Process Management Types and Constants</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PRProcess">PRProcess</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PRProcessAttr">PRProcessAttr</a></li>
          </ol>
        </li>
        <li><a href="/ja/ja/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Process_Management_Functions">Process Management Functions</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Setting_the_Attributes_of_a_New_Process">Setting the Attributes of a New Process</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Process_Management_and_Interprocess_Communication#Creating_and_Managing_Processes">Creating and Managing Processes</a></li>
          </ol>
        </li>
      </ol>
    </details>
  </li>
  <li class="toggle">
    <details>
      <summary>Logging</summary>
      <ol>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Logging#Conditional_Compilation_and_Execution">Conditional Compilation and Execution</a></li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Logging#Log_Types_and_Variables">Log Types and Variables</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PRLogModoleInfo">PRLogModoleInfo</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PRLogModoleLevel">PRLogModoleLevel</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_MODULES">NSPR_LOG_MODULES</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_FILE">NSPR_LOG_FILE</a></li>
          </ol>
        </li>
        <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Logging#Logging_Functions_and_Macros">Logging Functions and Macros</a>
          <ol>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_NewLogModole">PR_NewLogModole</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_SetLogFile">PR_SetLogFile</a></li>
            <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_SetLogBuffering">PR_SetLogBuffering</a>/li&gt;
              </li><li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_LogPrint">PR_LogPrint</a></li>
              <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_LogFlush">PR_LogFlush</a></li>
              <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_LOG_TEST">PR_LOG_TEST</a></li>
              <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_LOG">PR_LOG</a></li>
              <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_Assert_">PR_Assert</a></li>
              <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_ASSERT">PR_ASSERT</a></li>
              <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/PR_NOT_REACHED">PR_NOT_REACHED</a></li>
            </ol>
          </li>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Logging#Use_Example">Use Example</a></li>
        </ol>
      </details>
    </li>
    <li class="toggle">
      <details>
        <summary>Named Shared Memory</summary>
        <ol>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Named_Shared_Memory#Shared_Memory_Protocol">Shared Memory Protocol</a></li>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Named_Shared_Memory#Named_Shared_Memory_Functions">Named Shared Memory Functions</a></li>
        </ol>
      </details>
    </li>
    <li class="toggle">
      <details>
        <summary>Anonymous Shared Memory</summary>
        <ol>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Anonymous_Shared_Memory#Anonymous_Memory_Protocol">Anonymous Memory Protocol</a></li>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Anonymous_Shared_Memory#Anonymous_Shared_Memory_Functions">Anonymous Shared Memory Functions</a></li>
        </ol>
      </details>
    </li>
    <li class="toggle">
      <details>
        <summary>IPC Semaphores</summary>
        <ol>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/IPC_Semaphores#IPC_Semaphore_Functions">IPC Semaphore Functions</a></li>
        </ol>
      </details>
    </li>
    <li class="toggle">
      <details>
        <summary>Thread Pools</summary>
        <ol>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Thread_Pools#Thread_Pool_Types">Thread Pool Types</a></li>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Thread_Pools#Thread_Pool_Functions">Thread Pool Functions</a></li>
        </ol>
      </details>
    </li>
    <li class="toggle">
      <details>
        <summary>Random Number Generator</summary>
        <ol>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Random_Number_Generator#Random_Number_Generator_Function">Random Number Generator Function</a></li>
        </ol>
      </details>
    </li>
    <li class="toggle">
      <details>
        <summary>Hash Tables</summary>
        <ol>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Hash_Tables#Hash_Tables_and_Type_Constants">Hash Tables and Type Constants</a></li>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/Hash_Tables#Hash_Table_Functions">Hash Table Functions</a></li>
        </ol>
      </details>
    </li>
    <li class="toggle">
      <details>
        <summary>NSPR Error Handling</summary>
        <ol>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Type">Error Type</a></li>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Functions">Error Functions</a></li>
          <li><a href="/ja/docs/Mozilla/Projects/NSPR/Reference/NSPR_Error_Handling#Error_Codes">Error Codes</a></li>
        </ol>
      </details>
    </li>
    <li class="toggle">
      <details>
        <summary>Contribute</summary>
        <ol>
          <li><a href="/ja/docs/MDN/Doc_status/NSPR"></a></li>
          <li><a href="/ja/docs/MDN">The MDN Project</a></li>
        </ol>
      </details>
    </li>
  </ol>
</section>

<p>NetScape Portable Runtime (NSPR) provides platform independence for non-GUI operating system facilities. These facilities include threads, thread synchronization, normal file and network I/O, interval timing and calendar time, basic memory management (malloc and free) and shared library linking.</p>

<h3 id="History" name="History">歴史</h3>

<p>A good portion of the library's purpose, and perhaps the primary purpose in the Gromit environment, was to provide the underpinnings of the Java VM, more or less mapping the<em>sys layer</em> that Sun defined for the porting of the Java VM to various platforms. NSPR went beyond that requirement in some areas and since it was also the platform independent layer for most of the servers produced by Netscape. It was expected and preferred that existing code be restructured and perhaps even rewritten in order to use the NSPR API. It is not a goal to provide a platform for the porting into Netscape of externally developed code.</p>

<p>At the time of writing the current generation of NSPR was known as NSPR20. The first generation of NSPR was originally conceived just to satisfy the requirements of porting Java to various host environments. NSPR20, an effort started in 1996, built on that original idea, though very little is left of the original code. (The "20" in "NSPR20" does not mean "version 2.0" but rather "second generation".) Many of the concepts have been reformed, expanded, and matured. Today NSPR may still be appropriate as the platform dependent layer under Java, but its primary application is supporting clients written entirely in C or C++.</p>

<h3 id="How_It_Works" name="How_It_Works">How It Works</h3>

<p>NSPR's goal is to provide uniform service over a wide range of operating system environments. It strives to not export the<em>lowest common denominator</em> , but to exploit the best features of each operating system on which it runs, and still provide a uniform service across a wide range of host offerings.</p>

<h4 id="Threads" name="Threads">Threads</h4>

<p>Threads are the major feature of NSPR. The industry's offering of threads is quite sundry. NSPR, while far from perfect, does provide a single API to which clients may program and expect reasonably consistent behavior. The operating systems provide everything from no concept of threading at all up to and including sophisticated, scalable and efficient implementations. NSPR makes as much use of what the systems offer as it can. It is a goal of NSPR that NSPR impose as little overhead as possible in accessing those appropriate system features.</p>

<h4 id="Thread_synchronization" name="Thread_synchronization">Thread synchronization</h4>

<p>Thread synchronization is loosely based on Monitors as described by C.A.R. Hoare in<em>Monitors: An operating system structuring concept</em> , Communications of the ACM, 17(10), October 1974 and then formalized by Xerox' Mesa programming language ("Mesa Language Manual", J.G. Mitchell et al, Xerox PARC, CSL-79-3 (Apr 1979)). This mechanism provides the basic mutual exclusion (mutex) and thread notification facilities (condition variables) implemented by NSPR. Additionally, NSPR provides synchronization methods more suited for use by Java. The Java-like facilities include monitor<em>reentrancy</em> , implicit and tightly bound notification capabilities with the ability to associate the synchronization objects dynamically.</p>

<h4 id="I.2FO" name="I.2FO">I/O</h4>

<p>NSPR's I/O is a slightly augmented BSD sockets model that allows arbitrary layering. It was originally intended to export synchronous I/O methods only, relying on threads to provide the concurrency needed for complex applications. That method of operation is preferred though it is possible to configure the network I/O channels as<em>non-blocking</em> in the traditional sense.</p>

<h4 id="Network_addresses" name="Network_addresses">Network addresses</h4>

<p>Part of NSPR deals with manipulation of network addresses. NSPR defines a network address object that is Internet Protocol (IP) centric. While the object is not declared as opaque, the API provides methods that allow and encourage clients to treat the addresses as polymorphic items. The goal in this area is to provide a migration path between IPv4 and IPv6. To that end it is possible to perform translations of ASCII strings (DNS names) into NSPR's network address structures, with no regard to whether the addressing technology is IPv4 or IPv6.</p>

<h4 id="Time" name="Time">Time</h4>

<p>Timing facilities are available in two forms: interval timing and calendar functions.</p>

<p>Interval timers are based on a free running, 32-bit, platform dependent resolution timer. Such timers are normally used to specify timeouts on I/O, waiting on condition variables and other rudimentary thread scheduling. Since these timers have finite namespace and are free running, they can wrap at any time. NSPR does not provide an<em>epoch</em> , but expects clients to deal with that issue. The<em>granularity</em> of the timers is guaranteed to be between 10 microseconds and 1 millisecond. This allows a minimal timer<em>period</em> in of approximately 12 hours. But in order to deal with the wrap-around issue, only half that namespace may be utilized. Therefore, the minimal usable interval available from the timers is slightly less than six hours.</p>

<p>Calendar times are 64-bit signed numbers with units of microseconds. The<em>epoch</em> for calendar times is midnight, January 1, 1970, Greenwich Mean Time. Negative times extend to times before 1970, and positive numbers forward. Use of 64 bits allows a representation of times approximately in the range of -30000 to the year 30000. There is a structural representation (<em>i.e., exploded</em> view), routines to acquire the current time from the host system, and convert them to and from the 64-bit and structural representation. Additionally there are routines to convert to and from most well-known forms of ASCII into the 64-bit NSPR representation.</p>

<h4 id="Memory_management" name="Memory_management">Memory management</h4>

<p>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.</p>

<h4 id="Linking" name="Linking">Linking</h4>

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

<h3 id="Where_It.27s_Headed" name="Where_It.27s_Headed">Where It's Headed</h3>

<p>NSPR is applicable as a platform on which to write threaded applications that need to be ported to multiple platforms. The current implementation supports Macintosh (PPC), WIN-32 (WinNT, Win9x) and 20 versions of UNIX and is still expanding. The basic API is stable and expected to remain that way.</p>

<p>NSPR is functionally complete and has entered a mode of sustaining engineering. As operating system vendors issue new releases of their operating systems, NSPR will be moved forward to these new releases by interested players.</p>

<h2 id="Original_Document_Information" name="Original_Document_Information">Original Document Information</h2>

<div class="originaldocinfo">
<ul>
 <li>Author: <a class="link-mailto" href="mailto:larryh@netscape.com">larryh@netscape.com</a></li>
 <li>Last Updated Date: 2000</li>
 <li>(Portions of the Introduction moved to the history section in 2012)</li>
</ul>
</div>

<p> </p>