File: pthreads.7

package info (click to toggle)
manpages-ja 0.5.0.0.20100315-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 21,156 kB
  • ctags: 1
  • sloc: sh: 13,935; perl: 157; makefile: 114
file content (926 lines) | stat: -rw-r--r-- 22,069 bytes parent folder | download
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
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
'\" t
.\" Copyright (c) 2005 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
.\" Translated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\" Updated 2006-04-15, Akihiro MOTOKI, LDP v2.29
.\" Updated 2007-01-05, Akihiro MOTOKI, LDP v2.43
.\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
.\" Updated 2008-11-05, Akihiro MOTOKI, LDP v3.12
.\" Updated 2008-11-09, Akihiro MOTOKI, LDP v3.13
.\" Updated 2008-12-26, Akihiro MOTOKI, LDP v3.14
.\"
.\"WORD:	manager thread		å
.\"WORD:	thread group		åɡ롼
.\"WORD:	real-time signal	ꥢ륿ॷʥ
.\"WORD:	non-conformant		ɸ
.\"WORD:	alternate signal stack	إʥ륹å
.\"
.TH PTHREADS 7  2008-11-18 "Linux" "Linux Programmer's Manual"
.SH ̾
pthreads \- POSIX å
.SH 
POSIX.1 ϡ̤ POSIX åɤ Pthreads ȤΤ
åɡץߥ󥰤Υ󥿥ե (ؿإåե)
ꤷƤ롣ĤΥץʣΥåɤĤȤǤ
ƤΥåɤƱץ¹Ԥ롣
ΥåɤƱ (ǡȥҡΰ) ͭ뤬
ƥåɤϼʬѤΥå (ưѿ) ġ

POSIX.1 ϥåɴ֤ǤɤΤ褦°ͭ뤫ˤĤƤƤ
(Ĥޤꡢ°ϥåñ̤ǤϤʤץΤǶ̤Ǥ):
.IP \- 3
ץ ID
.IP \- 3
ƥץ ID
.IP \- 3
ץ롼 ID ȥå ID
.IP \- 3
ü
.IP \- 3
桼 ID ȥ롼 ID
.IP \- 3
ץ󤹤եǥץ
.IP \- 3
쥳ɤΥå
.RB ( fcntl (3)
)
.IP \- 3
ʥ
.IP \- 3
ե⡼ɺޥ
.RB ( umask (2))
.IP \- 3
ȡǥ쥯ȥ
.RB ( chdir (2))
ȥ롼ȡǥ쥯ȥ
.RB ( chroot (2))
.IP \- 3
󥿡Х롦
.RB ( setitimer (2))
 POSIX 
.RB ( timer_create (2))
.IP \- 3
nice 
.RB ( setpriority (2))
.IP \- 3
.RB ( setrlimit (2))
.IP \- 3
CPU 
.RB ( times (2))
ȥ꥽
.RB ( getrusage (2))
ξη¬
.PP
åˤĤƤ⡢POSIX.1 ϤɤΤ褦°
ġΥåɤΩ˴뤫ꤷƤ:
.IP \- 3
å ID
.RB ( pthread_t
ǡ)
.IP \- 3
ʥޥ
.RB ( pthread_sigmask (3))
.IP \- 3
.I errno
ѿ
.IP \- 3
إʥ륹å
.RB ( sigaltstack (2))
.IP \- 3
ꥢ륿ࡦ塼󥰤Υݥꥷͥ
.RB ( sched_setscheduler (2)

.BR sched_setparam (2))
.PP
ʲ Linux ͭεǽ⥹åñ̤Ǥ:
.IP \- 3
ѥӥƥ
.RB ( capabilities (7)
)
.IP \- 3
CPU affinity ()
.RB ( sched_setaffinity (2))
.SS "pthreads ؿ֤"
ۤȤɤ pthreads ؿ 0 ֤
Ԥ票顼ֹ֤
pthreads ؿ
.I errno
򥻥åȤʤդ뤳ȡ
POSIX.1-2001 Ǥϡ
顼֤ǽΤ pthreads ؿ顼
.B EINTR
ǼԤ뤳ȤϷ褷ƤʤȵꤷƤ롣
.SS "å ID"
ץγƥåɤ
.RI ( pthread_t
) դʥåɼ̻Ҥġ
μ̻Ҥϡ
.BR pthread_create (3)
θƤӽФ֤롣ޤåɤϼȤΥåɼ̻Ҥ
.BR pthread_self (3)
ȤäƼǤ롣
å ID ΰݾڤΤϡĤΥץˤƤΤߤǤ롣
λåɤ join 줿Ǥϡå ID ϺѤǽ롣
å ID ˼ƤΥåɴؿˤơ
 ID ϸƤӽФƱץΰĤΥåɤ򻲾Ȥ롣
.SS "åɥդʴؿ"
åɥդʴؿϡʣΥåɤƱ˸ƤӽФƤ
(ʤƱ˸ƤӽФ줿˴ؤ餺Ʊ̤֤) ؿΤȤǤ롣

POSIX.1-2001  POSIX.1-2008Ǥϡ㳰
ɸǵꤵƤƤδؿåɥդǤ뤳Ȥ׵ᤷƤ롣
ʲδؿ㳰Ǥ롣
.in +4n
.nf

asctime()
basename()
catgets()
crypt()
ctermid() (NULL ǤʤϤ줿)
ctime()
dbm_clearerr()
dbm_close()
dbm_delete()
dbm_error()
dbm_fetch()
dbm_firstkey()
dbm_nextkey()
dbm_open()
dbm_store()
dirname()
dlerror()
drand48()
ecvt() [POSIX.1-2001 Τ (POSIX.1-2008 Ǻ줿)]
encrypt()
endgrent()
endpwent()
endutxent()
fcvt() [POSIX.1-2001 Τ (POSIX.1-2008 Ǻ줿)]
ftw()
gcvt() [POSIX.1-2001 Τ (POSIX.1-2008 Ǻ줿)]
getc_unlocked()
getchar_unlocked()
getdate()
getenv()
getgrent()
getgrgid()
getgrnam()
gethostbyaddr() [POSIX.1-2001 Τ (POSIX.1-2008 Ǻ줿)]
gethostbyname() [POSIX.1-2001 Τ (POSIX.1-2008 Ǻ줿)]
gethostent()
getlogin()
getnetbyaddr()
getnetbyname()
getnetent()
getopt()
getprotobyname()
getprotobynumber()
getprotoent()
getpwent()
getpwnam()
getpwuid()
getservbyname()
getservbyport()
getservent()
getutxent()
getutxid()
getutxline()
gmtime()
hcreate()
hdestroy()
hsearch()
inet_ntoa()
l64a()
lgamma()
lgammaf()
lgammal()
localeconv()
localtime()
lrand48()
mrand48()
nftw()
nl_langinfo()
ptsname()
putc_unlocked()
putchar_unlocked()
putenv()
pututxline()
rand()
readdir()
setenv()
setgrent()
setkey()
setpwent()
setutxent()
strerror()
strsignal() [POSIX.1-2008 ɲä줿]
strtok()
system() [POSIX.1-2008 ɲä줿]
tmpnam() (NULL ǤʤϤ줿)
ttyname()
unsetenv()
wcrtomb() (Ǹΰ NULL ξ)
wcsrtombs() (Ǹΰ NULL ξ)
wcstombs()
wctomb()
.fi
.in
.SS äݥ (cancellation points)
POSIX.1 εǤϡδؿϼäݥȤǤʤФʤ餺
¾δؿϼäݥȤǤäƤ褤ȤƤ롣
륹åɤäǽǡμä (cancelability type)
 (deferred) ǡΥåɤФä׵᤬Ԥξ硢
äݥȤǤؿƤӽФǡΥåɤΥ󥻥뤬
Ԥ롣

POSIX.1-2001  POSIX.1-2008 ξ⤷Ϥ줫Ǥϡ
ʲδؿϡäݥ (cancellation points) 
뤳ȤɬܤȤʤäƤ롣

.\" FIXME
.\" Document the list of all functions that are cancellation points in glibc
.in +4n
.nf
accept()
aio_suspend()
clock_nanosleep()
close()
connect()
creat()
fcntl() F_SETLKW
fdatasync()
fsync()
getmsg()
getpmsg()
lockf() F_LOCK
mq_receive()
mq_send()
mq_timedreceive()
mq_timedsend()
msgrcv()
msgsnd()
msync()
nanosleep()
open()
openat() [POSIX.1-2008 ɲä줿]
pause()
poll()
pread()
pselect()
pthread_cond_timedwait()
pthread_cond_wait()
pthread_join()
pthread_testcancel()
putmsg()
putpmsg()
pwrite()
read()
readv()
recv()
recvfrom()
recvmsg()
select()
sem_timedwait()
sem_wait()
send()
sendmsg()
sendto()
sigpause() [POSIX.1-2001 only (moves to "may" list in POSIX.1-2008)]
sigsuspend()
sigtimedwait()
sigwait()
sigwaitinfo()
sleep()
system()
tcdrain()
usleep() [POSIX.1-2001 Τ (POSIX.1-2008 Ǻ줿)]
wait()
waitid()
waitpid()
write()
writev()
.fi
.in

POSIX.1-2001  POSIX.1-2008 ξ⤷Ϥ줫Ǥϡ
ʲδؿϡäݥ (cancellation points) 
äƤ褤ȤˤʤäƤ롣

.in +4n
.nf
access()
asctime()
asctime_r()
catclose()
catgets()
catopen()
chmod() [POSIX.1-2008 ɲä줿]
chown() [POSIX.1-2008 ɲä줿]
closedir()
closelog()
ctermid()
ctime()
ctime_r()
dbm_close()
dbm_delete()
dbm_fetch()
dbm_nextkey()
dbm_open()
dbm_store()
dlclose()
dlopen()
dprintf() [POSIX.1-2008 ɲä줿]
endgrent()
endhostent()
endnetent()
endprotoent()
endpwent()
endservent()
endutxent()
faccessat() [POSIX.1-2008 ɲä줿]
fchmod() [POSIX.1-2008 ɲä줿]
fchmodat() [POSIX.1-2008 ɲä줿]
fchown() [POSIX.1-2008 ɲä줿]
fchownat() [POSIX.1-2008 ɲä줿]
fclose()
fcntl() (cmd ǤäƤ)
fflush()
fgetc()
fgetpos()
fgets()
fgetwc()
fgetws()
fmtmsg()
fopen()
fpathconf()
fprintf()
fputc()
fputs()
fputwc()
fputws()
fread()
freopen()
fscanf()
fseek()
fseeko()
fsetpos()
fstat()
fstatat() [POSIX.1-2008 ɲä줿]
ftell()
ftello()
ftw()
futimens() [POSIX.1-2008 ɲä줿]
fwprintf()
fwrite()
fwscanf()
getaddrinfo()
getc()
getc_unlocked()
getchar()
getchar_unlocked()
getcwd()
getdate()
getdelim() [POSIX.1-2008 ɲä줿]
getgrent()
getgrgid()
getgrgid_r()
getgrnam()
getgrnam_r()
gethostbyaddr() [SUSv3 Τ (δؿ POSIX.1-2008 ǺƤ)]
gethostbyname() [SUSv3 Τ (δؿ POSIX.1-2008 ǺƤ)]
gethostent()
gethostid()
gethostname()
getline() [POSIX.1-2008 ɲä줿]
getlogin()
getlogin_r()
getnameinfo()
getnetbyaddr()
getnetbyname()
getnetent()
getopt() (opterr  0 ʳξ)
getprotobyname()
getprotobynumber()
getprotoent()
getpwent()
getpwnam()
getpwnam_r()
getpwuid()
getpwuid_r()
gets()
getservbyname()
getservbyport()
getservent()
getutxent()
getutxid()
getutxline()
getwc()
getwchar()
getwd() [SUSv3 Τ (δؿ POSIX.1-2008 ǺƤ)]
glob()
iconv_close()
iconv_open()
ioctl()
link()
linkat() [POSIX.1-2008 ɲä줿]
lio_listio() [POSIX.1-2008 ɲä줿]
localtime()
localtime_r()
lockf() [POSIX.1-2008 ɲä줿]
lseek()
lstat()
mkdir() [POSIX.1-2008 ɲä줿]
mkdirat() [POSIX.1-2008 ɲä줿]
mkdtemp() [POSIX.1-2008 ɲä줿]
mkfifo() [POSIX.1-2008 ɲä줿]
mkfifoat() [POSIX.1-2008 ɲä줿]
mknod() [POSIX.1-2008 ɲä줿]
mknodat() [POSIX.1-2008 ɲä줿]
mkstemp()
mktime()
nftw()
opendir()
openlog()
pathconf()
pclose()
perror()
popen()
posix_fadvise()
posix_fallocate()
posix_madvise()
posix_openpt()
posix_spawn()
posix_spawnp()
posix_trace_clear()
posix_trace_close()
posix_trace_create()
posix_trace_create_withlog()
posix_trace_eventtypelist_getnext_id()
posix_trace_eventtypelist_rewind()
posix_trace_flush()
posix_trace_get_attr()
posix_trace_get_filter()
posix_trace_get_status()
posix_trace_getnext_event()
posix_trace_open()
posix_trace_rewind()
posix_trace_set_filter()
posix_trace_shutdown()
posix_trace_timedgetnext_event()
posix_typed_mem_open()
printf()
psiginfo() [POSIX.1-2008 ɲä줿]
psignal() [POSIX.1-2008 ɲä줿]
pthread_rwlock_rdlock()
pthread_rwlock_timedrdlock()
pthread_rwlock_timedwrlock()
pthread_rwlock_wrlock()
putc()
putc_unlocked()
putchar()
putchar_unlocked()
puts()
pututxline()
putwc()
putwchar()
readdir()
readdir_r()
readlink() [POSIX.1-2008 ɲä줿]
readlinkat() [POSIX.1-2008 ɲä줿]
remove()
rename()
renameat() [POSIX.1-2008 ɲä줿]
rewind()
rewinddir()
scandir() [POSIX.1-2008 ɲä줿]
scanf()
seekdir()
semop()
setgrent()
sethostent()
setnetent()
setprotoent()
setpwent()
setservent()
setutxent()
sigpause() [POSIX.1-2008 ɲä줿]
stat()
strerror()
strerror_r()
strftime()
symlink()
symlinkat() [POSIX.1-2008 ɲä줿]
sync()
syslog()
tmpfile()
tmpnam()
ttyname()
ttyname_r()
tzset()
ungetc()
ungetwc()
unlink()
unlinkat() [POSIX.1-2008 ɲä줿]
utime() [POSIX.1-2008 ɲä줿]
utimensat() [POSIX.1-2008 ɲä줿]
utimes() [POSIX.1-2008 ɲä줿]
vdprintf() [POSIX.1-2008 ɲä줿]
vfprintf()
vfwprintf()
vprintf()
vwprintf()
wcsftime()
wordexp()
wprintf()
wscanf()
.fi
.in

ˡɸ൬ʤǵꤵƤʤ¾δؿäݥ
Ȥ뤳ȤǧƤ롣
äˡ (block) ǽɸδؿäݥȤ
Ϥ뤳Ȥ
(ե򰷤ǽΤۤȤɤδؿ˴ޤޤ)
.\" So, scanning "cancellation point" comments in the glibc 2.8 header
.\" files, it looks as though at least the following non-standard
.\" functions are cancellation points:
.\" endnetgrent
.\" endspent
.\" epoll_pwait
.\" epoll_wait
.\" fcloseall
.\" fdopendir
.\" fflush_unlocked
.\" fgetc_unlocked
.\" fgetgrent
.\" fgetgrent_r
.\" fgetpwent
.\" fgetpwent_r
.\" fgets_unlocked
.\" fgetspent
.\" fgetspent_r
.\" fgetwc_unlocked
.\" fgetws_unlocked
.\" fputc_unlocked
.\" fputs_unlocked
.\" fputwc_unlocked
.\" fputws_unlocked
.\" fread_unlocked
.\" fwrite_unlocked
.\" gai_suspend
.\" getaddrinfo_a
.\" getdate_r
.\" getgrent_r
.\" getgrouplist
.\" gethostbyaddr_r
.\" gethostbyname2
.\" gethostbyname2_r
.\" gethostbyname_r
.\" gethostent_r
.\" getnetbyaddr_r
.\" getnetbyname_r
.\" getnetent_r
.\" getnetgrent
.\" getnetgrent_r
.\" getprotobyname_r
.\" getprotobynumber_r
.\" getprotoent_r
.\" getpw
.\" getpwent_r
.\" getservbyname_r
.\" getservbyport_r
.\" getservent_r
.\" getspent
.\" getspent_r
.\" getspnam
.\" getspnam_r
.\" getutmp
.\" getutmpx
.\" getw
.\" getwc_unlocked
.\" getwchar_unlocked
.\" initgroups
.\" innetgr
.\" mkostemp
.\" mkostemp64
.\" mkstemp64
.\" ppoll
.\" pthread_timedjoin_np
.\" putgrent
.\" putpwent
.\" putspent
.\" putw
.\" putwc_unlocked
.\" putwchar_unlocked
.\" rcmd
.\" rcmd_af
.\" rexec
.\" rexec_af
.\" rresvport
.\" rresvport_af
.\" ruserok
.\" ruserok_af
.\" setnetgrent
.\" setspent
.\" sgetspent
.\" sgetspent_r
.\" updwtmpx
.\" utmpxname
.\" vfscanf
.\" vfwscanf
.\" vscanf
.\" vsyslog
.\" vwscanf
.SS "Linux ǤΥѥ"
Linux ǤϡPthreads API Ѥץ
.I "cc \-pthread"
ǥѥ뤹٤Ǥ롣
.SS "POSIX åɤ Linux Ǥμ"
ޤǡ2ĤΥåɤμ Linux  GNU C 饤֥ˤ
󶡤Ƥ
.TP
.B LinuxThreads
ǽ Pthreads μ
glibc 2.4 ʹߤϡμϤϤ䥵ݡȤƤʤ
.TP
.BR NPTL " (Native POSIX Threads Library)"
 Pthreads μLinuxThreads ٤ȡ
NPTL  POSIX.1 ׵ͤؤνٹ礤⤯
¿Υåɤݤǽ⤤
NPTL  glibc 2.3.2 ʹߤѲǽǤ롣
NPTL Ѥˤ Linux 2.6 ͥ˼Ƥ뵡ǽɬפǤ롣
.PP
ɤμ⤤ 1:1 ʤġΥåɤ
ͥΥ塼󥰼Τ˥ޥåԥ󥰤롣
ɤΥåɤμ Linux 
.BR clone (2)
ƥॳѤƤ롣
NPTL ǤϡåƱδܵ (mutex  åɤ join ) 
Linux 
.BR futex (2)
ƥॳȤäƼƤ롣
.SS LinuxThreads
μ礭ħϰʲ̤Ǥ:
.IP \- 3
ᥤ󥹥å (ǽΥå) ȥץब
.BR pthread_create (3)
Ȥäƺåɤ˲ä
μǤϡִ (manager)ץåɤ롣
åɤϥåɤκȽλ갷
(Υåɤä kill ȡ꤬뤳Ȥ)
.IP \- 3
μǤǥʥѤƤ롣
Linux 2.2 ʹߤǤϡꥢ륿ॷʥΤǽ 3ĤȤ
.RB ( signal (7)
)
ΥͥǤ
.B SIGUSR1

.B SIGUSR2
Ȥ롣
ץꥱϡåɼѤƤ륷ʥ
ɤȤʤ褦ˤʤФʤʤ
.IP \- 3
åɴ֤ǥץ ID ͭʤ
(ºݤˤ LinuxThreads Υåɤ̾ϾͭץȤ
Ƥ뤬Ĥζ̤Υץ ID ͭƤϤʤ)
(åɤޤ) LinuxThreads åɤ
.BR ps (1)
Ȥ̤ΥץΤ褦˸롣
.PP
LinuxThreads μǤ POSIX.1 ͤæƤ
Ĥ롣ʲ˼褦:
.IP \- 3
.BR getpid (2)
ƤӽФȤˡå˰ۤʤ֤ͤ롣
.IP \- 3
ᥤ󥹥åɰʳΥåɤ
.BR getppid (2)
ƤӽФȡåɤΥץ ID ֤롣
ϡΥåɤ
.BR getppid (2)
Ƥˤϥᥤ󥹥åɤǤ
.BR getppid (2)
Ʊ֤ͤ٤Ǥ롣
.IP \- 3
륹åɤ
.BR fork (2)
Ȥäƿҥץ硢
ɤΥåɤǤ⤳λҥץ
.BR wait (2)
Ǥ٤Ǥ롣ʤ顢μǤϻҥץ
åɤλҥץ
.BR wait (2)
Ǥ롣
.IP \- 3
륹åɤ
.BR execve (2)
ƤӽФ硢¾Υåɤƽλ (POSIX.1 λ̤)
ʤ顢ץ
.BR execve (2)
ƤåɤƱ PID ġ
ᥤ󥹥åɤƱ PID Ĥ٤Ǥ롣
.IP \- 3
åɴ֤ǥ桼 ID ȥ롼 ID ͭʤ
ΤȤϡset-user-ID ץݤʻ֤򾷤ꡢ
ץꥱ
.BR seteuid (2)
ʤɤȤäƿѾ (credentials) ѹ
Pthreads ؿԤ븶Ȥʤ롣
.IP \- 3
åɴ֤Ƕ̤Υå ID ץ롼 ID ͭʤ
.IP \- 3
åɴ֤
.BR fcntl (2)
Ȥäƺ쥳ɡåͭʤ
.IP \- 3
.BR times (2)

.BR getrusage (2)
֤󤬥ץΤξǤʤåñ̤ξǤ롣
.IP \- 3
åɴ֤ǥޥեΥɥ
.RB ( semop (2)
) ͭʤ
.IP \- 3
åɴ֤ǥ󥿡Х롦ޤͭʤ
.IP \- 3
åɤ϶̤ nice ͤͭʤ
.IP \- 3
POSXI.1 ǤϡΤȤƤΥץ륷ʥȡ
̤Υåɤ륷ʥ̤ƹͤƤ롣
POSIX.1 ˤȡץ줿ʥ (㤨
.BR kill (2)
Ȥä) ϡΥץ°åɤΤ
 (arbitrarily) 򤵤줿ĤΥåɤˤ
ȤˤʤäƤ롣LinuxThreads ϥץ륷ʥ
ǰбƤ餺ʥΥåɤˤ뤳ȤǤ롣
.IP \- 3
åɤϤ줾ȼإʥ륹åġ
åɤإʥ륹å
Υåɤåɤ饳ԡ졢Τ
åɤϺǽϰĤإʥ륹åͭ롣
(ͤǤϡåɤإʥ륹åƤʤ
dzϤ٤ȤƤ롣
2ĤΥåɤͭƤإʥ륹åƱ
ʥνԤä硢ͽ¬ԲǽʥץΥ顼
롣)
.SS NPTL
NPTL ǤϡĤΥץƤΥåɤƱåɡ롼
°; åɡ롼פСƱ PID ͭ롣
NPTL ϴå (manager thread) Ѥʤ
NPTL ǥꥢ륿ॷʥΤǽ 2ĤֹѤƤ
.RB ( signal (7)
)ΥʥϥץꥱǤϻѤǤʤ

NPTL ˤ POSIX.1 ˽򤷤ƤʤʤȤĤ:
.IP \- 3
åɤ϶̤ nice ͤͭʤ
.\" FIXME . bug report filed for NPTL nice non-conformance
.\" http://bugzilla.kernel.org/show_bug.cgi?id=6258
.\" Sep 08: there is a patch by Denys Vlasenko to address this
.\" "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
.\" Monitor this to see if it makes it into mainline.
.PP
NPTL ɸΤĤϰΥͥǤΤȯ:
.IP \- 3
.BR times (2)

.BR getrusage (2)
֤󤬥ץΤξǤʤåñ̤ξǤ
(ͥ 2.6.9 ǽ줿)
.IP \- 3
åɴ֤ǥ꥽¤ͭʤ (ͥ 2.6.10 ǽ줿)
.IP \- 3
åɴ֤ǥ󥿡Х롦ޤͭʤ
(ͥ 2.6.12 ǽ줿)
.IP \- 3
ᥤ󥹥åɤ
.BR setsid (2)
Ȥäƿå򳫻Ϥ뤳ȤǤ
(ͥ 2.6.16 ǽ줿)
.IP \- 3
ᥤ󥹥åɤ
.BR setpgid (2)
ȤäƤΥץץ롼ס꡼ˤ뤳ȤǤ
(ͥ 2.6.16 ǽ줿)
.IP \- 3
åɤϤ줾ȼإʥ륹åġ
åɤإʥ륹å
Υåɤåɤ饳ԡ졢Τ
åɤϺǽϰĤإʥ륹åͭ
(ͥ 2.6.16 ǽ줿)
.PP
NPTL μǤϰʲˤĤƤդ뤳:
.IP \- 3
åΥ꥽Υեȡߥå
.RB ( setrlimit (2)

.B RLIMIT_STACK
򻲾) 
.I unlimited
ʳͤꤵƤ硢եȡߥåȤͤ
åɤΥǥեȤΥåȤʤ롣
ͭˤ뤿ˤϡץ¹Ԥ˥ߥåͤ
ꤷƤʤФʤʤƤϡȤ߹ߥޥɤ
.I ulimit -s
(C Ǥ
.IR "limit stacksize" )
Ȥäꤹ롣
.SS "åɼȽ"
glibc 2.3.2 ʹߤǤϡ
.BR getconf (1)
ޥɤȤäơ
ƥΥåɼȽꤹ뤳ȤǤ롣
ʲ򼨤:
.nf
.in +4n

bash$ getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.4
.in
.fi
.PP
 glibc ΥСǤϡʲΤ褦ʥޥɤ
ǥեȤΥåɼȽꤹ뤳ȤǤ롣
.nf
.in +4n

bash$ $( ldd /bin/ls | grep libc.so | awk \(aq{print $3}\(aq ) | \\
                egrep \-i \(aqthreads|ntpl\(aq
        Native POSIX Threads Library by Ulrich Drepper et al
.in
.fi
.SS "åɤμ: LD_ASSUME_KERNEL"
LinuxThreads  NPTL ξ򥵥ݡȤƤ glibc
(glibc 2.3.\fIx\fP) 륷ƥǤϡ
.B LD_ASSUME_KERNEL
ĶѿȤȤǡưŪ󥫤ǥեȤ
򤹤륹åɼ񤭤뤳ȤǤ롣
ѿˤꡢưŪ󥫤ΥСΥͥ
ưƤȲꤹ褦˻ꤹ롣
NPTL ɬפȤ륵ݡȵǽ󶡤ƤʤͥС
ꤹ뤳ȤǡŪ LinuxThreads ȤȤǤ
(Τ褦ʤȤ򤹤Ǥ⤢ꤽʾ̤ϡ
LinuxThreads ɸʿ񤤤˰¸ (줿) ץꥱ
ư)
ʲ򼨤:
.nf
.in +4n

bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\
                awk \(aq{print $3}\(aq ) | egrep \-i \(aqthreads|ntpl\(aq
        linuxthreads-0.10 by Xavier Leroy
.in
.fi
.SH Ϣ
.BR clone (2),
.BR futex (2),
.BR gettid (2),
.BR futex (7),
.BR signal (7),
.br
 Pthreads γƼޥ˥奢ڡ㤨:
.BR pthread_attr_init (3),
.BR pthread_atfork (3),
.BR pthread_cancel (3),
.BR pthread_cleanup_push (3),
.BR pthread_cond_signal (3),
.BR pthread_cond_wait (3),
.BR pthread_create (3),
.BR pthread_detach (3),
.BR pthread_equal (3),
.BR pthread_exit (3),
.BR pthread_key_create (3),
.BR pthread_kill (3),
.BR pthread_mutex_lock (3),
.BR pthread_mutex_unlock (3),
.BR pthread_once (3),
.BR pthread_setcancelstate (3),
.BR pthread_setcanceltype (3),
.BR pthread_setspecific (3),
.BR pthread_sigmask (3),
.BR pthread_testcancel (3)