home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
90%
| dexvert
| Hypertext Markup Language File (text/html)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| HTML document text
| default (weak)
| |
99%
| file
| LaTeX document text
| default
| |
98%
| file
| exported SGML document text
| default
| |
97%
| file
| exported SGML document, ASCII text
| default
| |
80%
| TrID
| HyperText Markup Language with DOCTYPE
| default
| |
19%
| TrID
| HyperText Markup Language
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| gt2
| HTML (Hyper Text Markup Language) Datei
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/html
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 42 75 | 69 6c 74 2d 69 6e 20 4d |ts of Bu|ilt-in M|
|000000b0| 6f 64 75 6c 65 20 74 68 | 72 65 61 64 3c 2f 54 49 |odule th|read</TI|
|000000c0| 54 4c 45 3e 0a 0a 3c 4d | 45 54 41 20 48 54 54 50 |TLE>..<M|ETA HTTP|
|000000d0| 2d 45 51 55 49 56 3d 22 | 43 6f 6e 74 65 6e 74 2d |-EQUIV="|Content-|
|000000e0| 54 79 70 65 22 20 43 4f | 4e 54 45 4e 54 3d 22 74 |Type" CO|NTENT="t|
|000000f0| 65 78 74 2f 68 74 6d 6c | 3b 20 63 68 61 72 73 65 |ext/html|; charse|
|00000100| 74 3d 75 74 66 2d 38 22 | 3e 0a 3c 4d 45 54 41 20 |t=utf-8"|>.<META |
|00000110| 4e 41 4d 45 3d 22 76 69 | 65 77 70 6f 72 74 22 20 |NAME="vi|ewport" |
|00000120| 43 4f 4e 54 45 4e 54 3d | 22 77 69 64 74 68 3d 64 |CONTENT=|"width=d|
|00000130| 65 76 69 63 65 2d 77 69 | 64 74 68 2c 20 69 6e 69 |evice-wi|dth, ini|
|00000140| 74 69 61 6c 2d 73 63 61 | 6c 65 3d 31 2e 30 22 3e |tial-sca|le=1.0">|
|00000150| 0a 3c 4d 45 54 41 20 4e | 41 4d 45 3d 22 47 65 6e |.<META N|AME="Gen|
|00000160| 65 72 61 74 6f 72 22 20 | 43 4f 4e 54 45 4e 54 3d |erator" |CONTENT=|
|00000170| 22 4c 61 54 65 58 32 48 | 54 4d 4c 20 76 32 30 32 |"LaTeX2H|TML v202|
|00000180| 32 22 3e 0a 0a 3c 4c 49 | 4e 4b 20 52 45 4c 3d 22 |2">..<LI|NK REL="|
|00000190| 53 54 59 4c 45 53 48 45 | 45 54 22 20 48 52 45 46 |STYLESHE|ET" HREF|
|000001a0| 3d 22 6c 69 62 74 68 72 | 65 61 64 2e 63 73 73 22 |="libthr|ead.css"|
|000001b0| 3e 0a 0a 3c 4c 49 4e 4b | 20 52 45 4c 3d 22 70 72 |>..<LINK| REL="pr|
|000001c0| 65 76 69 6f 75 73 22 20 | 48 52 45 46 3d 22 6c 69 |evious" |HREF="li|
|000001d0| 62 74 68 72 65 61 64 5f | 6d 6e 2e 68 74 6d 6c 22 |bthread_|mn.html"|
|000001e0| 3e 0a 3c 4c 49 4e 4b 20 | 52 45 4c 3d 22 75 70 22 |>.<LINK |REL="up"|
|000001f0| 20 48 52 45 46 3d 22 6c | 69 62 74 68 72 65 61 64 | HREF="l|ibthread|
|00000200| 5f 6d 6e 2e 68 74 6d 6c | 22 3e 0a 3c 2f 48 45 41 |_mn.html|">.</HEA|
|00000210| 44 3e 0a 20 0a 3c 42 4f | 44 59 20 62 67 63 6f 6c |D>. .<BO|DY bgcol|
|00000220| 6f 72 3d 22 23 66 66 66 | 66 66 66 22 20 74 65 78 |or="#fff|fff" tex|
|00000230| 74 3d 22 23 30 30 30 30 | 30 30 22 20 6c 69 6e 6b |t="#0000|00" link|
|00000240| 3d 22 23 39 39 34 34 45 | 45 22 20 76 6c 69 6e 6b |="#9944E|E" vlink|
|00000250| 3d 22 23 30 30 30 30 66 | 66 22 20 61 6c 69 6e 6b |="#0000f|f" alink|
|00000260| 3d 22 23 30 30 66 66 30 | 30 22 3e 0a 0a 3c 48 31 |="#00ff0|0">..<H1|
|00000270| 3e 3c 41 20 49 44 3d 22 | 53 45 43 54 49 4f 4e 30 |><A ID="|SECTION0|
|00000280| 30 30 31 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |00100000|00000000|
|00000290| 30 30 30 22 3e 0a 42 75 | 69 6c 74 2d 69 6e 20 4d |000">.Bu|ilt-in M|
|000002a0| 6f 64 75 6c 65 20 74 68 | 72 65 61 64 3c 2f 41 3e |odule th|read</A>|
|000002b0| 0a 3c 2f 48 31 3e 0a 74 | 68 72 65 61 64 0a 0a 3c |.</H1>.t|hread..<|
|000002c0| 50 3e 0a 54 68 69 73 20 | 6d 6f 64 75 6c 65 20 70 |P>.This |module p|
|000002d0| 72 6f 76 69 64 65 73 20 | 6c 6f 77 2d 6c 65 76 65 |rovides |low-leve|
|000002e0| 6c 20 70 72 69 6d 69 74 | 69 76 65 73 20 66 6f 72 |l primit|ives for|
|000002f0| 20 77 6f 72 6b 69 6e 67 | 20 77 69 74 68 20 6d 75 | working| with mu|
|00000300| 6c 74 69 70 6c 65 0a 74 | 68 72 65 61 64 73 20 28 |ltiple.t|hreads (|
|00000310| 61 2e 6b 2e 61 2e 20 6c | 69 67 68 74 2d 77 65 69 |a.k.a. l|ight-wei|
|00000320| 67 68 74 20 70 72 6f 63 | 65 73 73 65 73 20 6f 72 |ght proc|esses or|
|00000330| 20 74 61 73 6b 73 29 20 | 26 6d 64 61 73 68 3b 20 | tasks) |— |
|00000340| 6d 75 6c 74 69 70 6c 65 | 0a 74 68 72 65 61 64 73 |multiple|.threads|
|00000350| 20 6f 66 20 63 6f 6e 74 | 72 6f 6c 20 73 68 61 72 | of cont|rol shar|
|00000360| 69 6e 67 20 74 68 65 69 | 72 20 67 6c 6f 62 61 6c |ing thei|r global|
|00000370| 20 64 61 74 61 20 73 70 | 61 63 65 2e 20 20 46 6f | data sp|ace. Fo|
|00000380| 72 0a 73 79 6e 63 68 72 | 6f 6e 69 7a 61 74 69 6f |r.synchr|onizatio|
|00000390| 6e 2c 20 73 69 6d 70 6c | 65 20 6c 6f 63 6b 73 20 |n, simpl|e locks |
|000003a0| 28 61 2e 6b 2e 61 2e 20 | 6d 75 74 65 78 65 73 20 |(a.k.a. |mutexes |
|000003b0| 6f 72 20 62 69 6e 61 72 | 79 0a 73 65 6d 61 70 68 |or binar|y.semaph|
|000003c0| 6f 72 65 73 29 20 61 72 | 65 20 70 72 6f 76 69 64 |ores) ar|e provid|
|000003d0| 65 64 2e 0a 0a 3c 50 3e | 0a 54 68 65 20 6d 6f 64 |ed...<P>|.The mod|
|000003e0| 75 6c 65 20 69 73 20 6f | 70 74 69 6f 6e 61 6c 20 |ule is o|ptional |
|000003f0| 61 6e 64 20 73 75 70 70 | 6f 72 74 65 64 20 6f 6e |and supp|orted on|
|00000400| 20 53 47 49 20 49 52 49 | 58 20 34 2e 78 20 61 6e | SGI IRI|X 4.x an|
|00000410| 64 20 35 2e 78 20 61 6e | 64 20 53 75 6e 0a 53 6f |d 5.x an|d Sun.So|
|00000420| 6c 61 72 69 73 20 32 2e | 78 20 73 79 73 74 65 6d |laris 2.|x system|
|00000430| 73 2c 20 61 73 20 77 65 | 6c 6c 20 61 73 20 6f 6e |s, as we|ll as on|
|00000440| 20 73 79 73 74 65 6d 73 | 20 74 68 61 74 20 68 61 | systems| that ha|
|00000450| 76 65 20 61 20 50 54 48 | 52 45 41 44 0a 69 6d 70 |ve a PTH|READ.imp|
|00000460| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 28 65 2e 67 |lementat|ion (e.g|
|00000470| 2e 20 4b 53 52 29 2e 0a | 0a 3c 50 3e 0a 49 74 20 |. KSR)..|.<P>.It |
|00000480| 64 65 66 69 6e 65 73 20 | 74 68 65 20 66 6f 6c 6c |defines |the foll|
|00000490| 6f 77 69 6e 67 20 63 6f | 6e 73 74 61 6e 74 20 61 |owing co|nstant a|
|000004a0| 6e 64 20 66 75 6e 63 74 | 69 6f 6e 73 3a 0a 0a 3c |nd funct|ions:..<|
|000004b0| 50 3e 0a 0a 3c 42 52 3e | 0a 3c 49 4d 47 0a 20 20 |P>..<BR>|.<IMG. |
|000004c0| 53 54 59 4c 45 3d 22 68 | 65 69 67 68 74 3a 20 31 |STYLE="h|eight: 1|
|000004d0| 39 36 2e 32 35 65 78 3b | 20 76 65 72 74 69 63 61 |96.25ex;| vertica|
|000004e0| 6c 2d 61 6c 69 67 6e 3a | 20 2d 30 2e 35 37 65 78 |l-align:| -0.57ex|
|000004f0| 3b 20 22 20 53 52 43 3d | 22 69 6d 67 31 2e 70 6e |; " SRC=|"img1.pn|
|00000500| 67 22 0a 20 41 4c 54 3d | 22 5c 62 65 67 69 6e 7b |g". ALT=|"\begin{|
|00000510| 65 78 63 64 65 73 63 7d | 7b 65 72 72 6f 72 7d 0a |excdesc}|{error}.|
|00000520| 52 61 69 73 65 64 20 6f | 6e 20 74 68 72 65 61 64 |Raised o|n thread|
|00000530| 2d 73 70 65 63 69 66 69 | 63 20 65 72 72 6f 72 73 |-specifi|c errors|
|00000540| 2e 0a 5c 65 6e 64 7b 65 | 78 63 64 65 73 63 7d 22 |..\end{e|xcdesc}"|
|00000550| 3e 0a 3c 42 52 3e 0a 0a | 3c 50 3e 0a 3c 42 52 3e |>.<BR>..|<P>.<BR>|
|00000560| 0a 3c 49 4d 47 0a 20 20 | 53 54 59 4c 45 3d 22 68 |.<IMG. |STYLE="h|
|00000570| 65 69 67 68 74 3a 20 32 | 2e 31 37 65 78 3b 20 76 |eight: 2|.17ex; v|
|00000580| 65 72 74 69 63 61 6c 2d | 61 6c 69 67 6e 3a 20 31 |ertical-|align: 1|
|00000590| 37 36 2e 35 35 65 78 3b | 20 22 20 53 52 43 3d 22 |76.55ex;| " SRC="|
|000005a0| 69 6d 67 32 2e 70 6e 67 | 22 0a 20 41 4c 54 3d 22 |img2.png|". ALT="|
|000005b0| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|000005c0| 7b 73 74 61 72 74 5f 6e | 65 77 5f 74 68 72 65 61 |{start_n|ew_threa|
|000005d0| 64 7d 7b 66 75 6e 63 5c | 2c 20 61 72 67 7d 0a 53 |d}{func\|, arg}.S|
|000005e0| 74 61 72 74 20 61 20 6e | 65 77 20 74 68 72 65 61 |tart a n|ew threa|
|000005f0| 64 2e 20 54 68 65 20 74 | 68 72 65 61 64 20 65 78 |d. The t|hread ex|
|00000600| 2e 2e 2e 0a 2e 2e 2e 65 | 64 20 61 6e 64 0a 74 68 |.......e|d and.th|
|00000610| 65 6e 20 74 68 65 20 74 | 68 72 65 61 64 20 65 78 |en the t|hread ex|
|00000620| 69 74 73 20 28 62 75 74 | 20 6f 74 68 65 72 20 74 |its (but| other t|
|00000630| 68 72 65 61 64 73 20 63 | 6f 6e 74 69 6e 75 65 20 |hreads c|ontinue |
|00000640| 74 6f 20 72 75 6e 29 2e | 0a 5c 65 6e 64 7b 66 75 |to run).|.\end{fu|
|00000650| 6e 63 64 65 73 63 7d 22 | 3e 0a 3c 42 52 3e 0a 0a |ncdesc}"|>.<BR>..|
|00000660| 3c 50 3e 0a 3c 42 52 3e | 0a 3c 49 4d 47 0a 20 20 |<P>.<BR>|.<IMG. |
|00000670| 53 54 59 4c 45 3d 22 68 | 65 69 67 68 74 3a 20 32 |STYLE="h|eight: 2|
|00000680| 2e 33 38 65 78 3b 20 76 | 65 72 74 69 63 61 6c 2d |.38ex; v|ertical-|
|00000690| 61 6c 69 67 6e 3a 20 31 | 37 36 2e 32 37 65 78 3b |align: 1|76.27ex;|
|000006a0| 20 22 20 53 52 43 3d 22 | 69 6d 67 33 2e 70 6e 67 | " SRC="|img3.png|
|000006b0| 22 0a 20 41 4c 54 3d 22 | 5c 62 65 67 69 6e 7b 66 |". ALT="|\begin{f|
|000006c0| 75 6e 63 64 65 73 63 7d | 7b 65 78 69 74 7d 7b 7d |uncdesc}|{exit}{}|
|000006d0| 0a 54 68 69 73 20 69 73 | 20 61 20 73 68 6f 72 74 |.This is| a short|
|000006e0| 68 61 6e 64 20 66 6f 72 | 20 5c 63 6f 64 65 7b 74 |hand for| \code{t|
|000006f0| 68 72 65 61 64 2e 65 78 | 69 74 5f 74 68 72 65 61 |hread.ex|it_threa|
|00000700| 64 28 29 7d 2e 0a 5c 65 | 6e 64 7b 66 75 6e 63 64 |d()}..\e|nd{funcd|
|00000710| 65 73 63 7d 22 3e 0a 3c | 42 52 3e 0a 0a 3c 50 3e |esc}">.<|BR>..<P>|
|00000720| 0a 3c 42 52 3e 0a 3c 49 | 4d 47 0a 20 20 53 54 59 |.<BR>.<I|MG. STY|
|00000730| 4c 45 3d 22 68 65 69 67 | 68 74 3a 20 32 2e 33 38 |LE="heig|ht: 2.38|
|00000740| 65 78 3b 20 76 65 72 74 | 69 63 61 6c 2d 61 6c 69 |ex; vert|ical-ali|
|00000750| 67 6e 3a 20 31 37 36 2e | 34 30 65 78 3b 20 22 20 |gn: 176.|40ex; " |
|00000760| 53 52 43 3d 22 69 6d 67 | 34 2e 70 6e 67 22 0a 20 |SRC="img|4.png". |
|00000770| 41 4c 54 3d 22 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |ALT="\be|gin{func|
|00000780| 64 65 73 63 7d 7b 65 78 | 69 74 5f 74 68 72 65 61 |desc}{ex|it_threa|
|00000790| 64 7d 7b 7d 0a 52 61 69 | 73 65 20 74 68 65 20 5c |d}{}.Rai|se the \|
|000007a0| 63 6f 64 65 7b 53 79 73 | 74 65 6d 45 78 69 74 7d |code{Sys|temExit}|
|000007b0| 20 65 78 63 65 70 74 69 | 6f 6e 2e 20 57 68 65 6e | excepti|on. When|
|000007c0| 20 6e 6f 74 20 63 61 75 | 67 68 74 2c 20 74 68 69 | not cau|ght, thi|
|000007d0| 73 20 77 69 6c 6c 0a 63 | 61 75 73 65 20 74 68 65 |s will.c|ause the|
|000007e0| 20 74 68 72 65 61 64 20 | 74 6f 20 65 78 69 74 20 | thread |to exit |
|000007f0| 73 69 6c 65 6e 74 6c 79 | 2e 0a 5c 65 6e 64 7b 66 |silently|..\end{f|
|00000800| 75 6e 63 64 65 73 63 7d | 22 3e 0a 3c 42 52 3e 0a |uncdesc}|">.<BR>.|
|00000810| 0a 3c 50 3e 0a 3c 42 52 | 3e 0a 3c 49 4d 47 0a 20 |.<P>.<BR|>.<IMG. |
|00000820| 20 53 54 59 4c 45 3d 22 | 68 65 69 67 68 74 3a 20 | STYLE="|height: |
|00000830| 32 2e 31 37 65 78 3b 20 | 76 65 72 74 69 63 61 6c |2.17ex; |vertical|
|00000840| 2d 61 6c 69 67 6e 3a 20 | 31 37 36 2e 36 38 65 78 |-align: |176.68ex|
|00000850| 3b 20 22 20 53 52 43 3d | 22 69 6d 67 35 2e 70 6e |; " SRC=|"img5.pn|
|00000860| 67 22 0a 20 41 4c 54 3d | 22 5c 62 65 67 69 6e 7b |g". ALT=|"\begin{|
|00000870| 66 75 6e 63 64 65 73 63 | 7d 7b 61 6c 6c 6f 63 61 |funcdesc|}{alloca|
|00000880| 74 65 5f 6c 6f 63 6b 7d | 7b 7d 0a 52 65 74 75 72 |te_lock}|{}.Retur|
|00000890| 6e 20 61 20 6e 65 77 20 | 6c 6f 63 6b 20 6f 62 6a |n a new |lock obj|
|000008a0| 65 63 74 2e 20 4d 65 74 | 68 6f 64 73 20 6f 66 20 |ect. Met|hods of |
|000008b0| 6c 6f 63 6b 73 20 61 72 | 65 20 64 65 73 63 72 69 |locks ar|e descri|
|000008c0| 62 65 64 20 62 65 6c 6f | 77 2e 20 54 68 65 0a 6c |bed belo|w. The.l|
|000008d0| 6f 63 6b 20 69 73 20 69 | 6e 69 74 69 61 6c 6c 79 |ock is i|nitially|
|000008e0| 20 75 6e 6c 6f 63 6b 65 | 64 2e 0a 5c 65 6e 64 7b | unlocke|d..\end{|
|000008f0| 66 75 6e 63 64 65 73 63 | 7d 22 3e 0a 3c 42 52 3e |funcdesc|}">.<BR>|
|00000900| 0a 0a 3c 50 3e 0a 3c 42 | 52 3e 0a 3c 49 4d 47 0a |..<P>.<B|R>.<IMG.|
|00000910| 20 20 53 54 59 4c 45 3d | 22 68 65 69 67 68 74 3a | STYLE=|"height:|
|00000920| 20 32 2e 31 37 65 78 3b | 20 76 65 72 74 69 63 61 | 2.17ex;| vertica|
|00000930| 6c 2d 61 6c 69 67 6e 3a | 20 31 37 36 2e 36 38 65 |l-align:| 176.68e|
|00000940| 78 3b 20 22 20 53 52 43 | 3d 22 69 6d 67 36 2e 70 |x; " SRC|="img6.p|
|00000950| 6e 67 22 0a 20 41 4c 54 | 3d 22 5c 62 65 67 69 6e |ng". ALT|="\begin|
|00000960| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 67 65 74 5f 69 |{funcdes|c}{get_i|
|00000970| 64 65 6e 74 7d 7b 7d 0a | 52 65 74 75 72 6e 20 74 |dent}{}.|Return t|
|00000980| 68 65 20 5c 6c 71 20 74 | 68 72 65 61 64 20 69 64 |he \lq t|hread id|
|00000990| 65 6e 74 69 66 69 65 72 | 27 20 6f 66 20 74 68 65 |entifier|' of the|
|000009a0| 20 63 75 72 72 65 6e 74 | 20 74 68 72 65 2e 2e 2e | current| thre...|
|000009b0| 0a 2e 2e 2e 61 79 20 62 | 65 20 72 65 63 79 63 6c |....ay b|e recycl|
|000009c0| 65 64 20 77 68 65 6e 20 | 61 20 74 68 72 65 61 64 |ed when |a thread|
|000009d0| 20 65 78 69 74 73 20 61 | 6e 64 0a 61 6e 6f 74 68 | exits a|nd.anoth|
|000009e0| 65 72 20 74 68 72 65 61 | 64 20 69 73 20 63 72 65 |er threa|d is cre|
|000009f0| 61 74 65 64 2e 0a 5c 65 | 6e 64 7b 66 75 6e 63 64 |ated..\e|nd{funcd|
|00000a00| 65 73 63 7d 22 3e 0a 3c | 42 52 3e 0a 0a 3c 50 3e |esc}">.<|BR>..<P>|
|00000a10| 0a 4c 6f 63 6b 20 6f 62 | 6a 65 63 74 73 20 68 61 |.Lock ob|jects ha|
|00000a20| 76 65 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ve the f|ollowing|
|00000a30| 20 6d 65 74 68 6f 64 73 | 3a 0a 0a 3c 50 3e 0a 0a | methods|:..<P>..|
|00000a40| 3c 42 52 3e 0a 3c 49 4d | 47 0a 20 20 53 54 59 4c |<BR>.<IM|G. STYL|
|00000a50| 45 3d 22 68 65 69 67 68 | 74 3a 20 32 2e 32 34 65 |E="heigh|t: 2.24e|
|00000a60| 78 3b 20 76 65 72 74 69 | 63 61 6c 2d 61 6c 69 67 |x; verti|cal-alig|
|00000a70| 6e 3a 20 31 37 36 2e 34 | 31 65 78 3b 20 22 20 53 |n: 176.4|1ex; " S|
|00000a80| 52 43 3d 22 69 6d 67 37 | 2e 70 6e 67 22 0a 20 41 |RC="img7|.png". A|
|00000a90| 4c 54 3d 22 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |LT="\beg|in{funcd|
|00000aa0| 65 73 63 7d 7b 61 63 71 | 75 69 72 65 7d 7b 5c 6f |esc}{acq|uire}{\o|
|00000ab0| 70 74 69 6f 6e 61 6c 7b | 77 61 69 74 66 6c 61 67 |ptional{|waitflag|
|00000ac0| 7d 7d 0a 57 69 74 68 6f | 75 74 20 74 68 65 20 6f |}}.Witho|ut the o|
|00000ad0| 70 74 69 6f 6e 61 6c 20 | 61 72 67 75 6d 65 6e 74 |ptional |argument|
|00000ae0| 2c 20 74 68 2e 2e 2e 0a | 2e 2e 2e 72 65 74 75 72 |, th....|...retur|
|00000af0| 6e 20 76 61 6c 75 65 20 | 69 73 20 31 20 69 66 20 |n value |is 1 if |
|00000b00| 74 68 65 20 6c 6f 63 6b | 20 69 73 20 61 63 71 75 |the lock| is acqu|
|00000b10| 69 72 65 64 20 73 75 63 | 63 65 73 73 66 75 6c 6c |ired suc|cessfull|
|00000b20| 79 2c 20 30 20 69 66 20 | 6e 6f 74 2e 0a 5c 65 6e |y, 0 if |not..\en|
|00000b30| 64 7b 66 75 6e 63 64 65 | 73 63 7d 22 3e 0a 3c 42 |d{funcde|sc}">.<B|
|00000b40| 52 3e 0a 0a 3c 50 3e 0a | 3c 42 52 3e 0a 3c 49 4d |R>..<P>.|<BR>.<IM|
|00000b50| 47 0a 20 20 53 54 59 4c | 45 3d 22 68 65 69 67 68 |G. STYL|E="heigh|
|00000b60| 74 3a 20 32 2e 31 37 65 | 78 3b 20 76 65 72 74 69 |t: 2.17e|x; verti|
|00000b70| 63 61 6c 2d 61 6c 69 67 | 6e 3a 20 31 37 36 2e 35 |cal-alig|n: 176.5|
|00000b80| 34 65 78 3b 20 22 20 53 | 52 43 3d 22 69 6d 67 38 |4ex; " S|RC="img8|
|00000b90| 2e 70 6e 67 22 0a 20 41 | 4c 54 3d 22 5c 62 65 67 |.png". A|LT="\beg|
|00000ba0| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 72 65 6c |in{funcd|esc}{rel|
|00000bb0| 65 61 73 65 7d 7b 7d 0a | 52 65 6c 65 61 73 65 73 |ease}{}.|Releases|
|00000bc0| 20 74 68 65 20 6c 6f 63 | 6b 2e 20 54 68 65 20 6c | the loc|k. The l|
|00000bd0| 6f 63 6b 20 6d 75 73 74 | 20 68 61 76 65 20 62 65 |ock must| have be|
|00000be0| 65 6e 20 61 63 71 75 69 | 72 65 64 20 65 61 72 6c |en acqui|red earl|
|00000bf0| 69 65 72 2c 20 62 75 74 | 20 6e 6f 74 0a 6e 65 63 |ier, but| not.nec|
|00000c00| 65 73 73 61 72 69 6c 79 | 20 62 79 20 74 68 65 20 |essarily| by the |
|00000c10| 73 61 6d 65 20 74 68 72 | 65 61 64 2e 0a 5c 65 6e |same thr|ead..\en|
|00000c20| 64 7b 66 75 6e 63 64 65 | 73 63 7d 22 3e 0a 3c 42 |d{funcde|sc}">.<B|
|00000c30| 52 3e 0a 0a 3c 50 3e 0a | 3c 42 52 3e 0a 3c 49 4d |R>..<P>.|<BR>.<IM|
|00000c40| 47 0a 20 20 53 54 59 4c | 45 3d 22 68 65 69 67 68 |G. STYL|E="heigh|
|00000c50| 74 3a 20 32 2e 31 30 65 | 78 3b 20 76 65 72 74 69 |t: 2.10e|x; verti|
|00000c60| 63 61 6c 2d 61 6c 69 67 | 6e 3a 20 31 37 36 2e 36 |cal-alig|n: 176.6|
|00000c70| 38 65 78 3b 20 22 20 53 | 52 43 3d 22 69 6d 67 39 |8ex; " S|RC="img9|
|00000c80| 2e 70 6e 67 22 0a 20 41 | 4c 54 3d 22 5c 62 65 67 |.png". A|LT="\beg|
|00000c90| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 6c 6f 63 |in{funcd|esc}{loc|
|00000ca0| 6b 65 64 7d 7b 7d 0a 52 | 65 74 75 72 6e 20 74 68 |ked}{}.R|eturn th|
|00000cb0| 65 20 73 74 61 74 75 73 | 20 6f 66 20 74 68 65 20 |e status| of the |
|00000cc0| 6c 6f 63 6b 3a 5c 20 31 | 20 69 66 20 69 74 20 68 |lock:\ 1| if it h|
|00000cd0| 61 73 20 62 65 65 6e 20 | 61 63 71 75 69 72 65 64 |as been |acquired|
|00000ce0| 20 62 79 20 73 6f 6d 65 | 0a 74 68 72 65 61 64 2c | by some|.thread,|
|00000cf0| 20 30 20 69 66 20 6e 6f | 74 2e 0a 5c 65 6e 64 7b | 0 if no|t..\end{|
|00000d00| 66 75 6e 63 64 65 73 63 | 7d 22 3e 0a 3c 42 52 3e |funcdesc|}">.<BR>|
|00000d10| 0a 0a 3c 50 3e 0a 3c 42 | 3e 43 61 76 65 61 74 73 |..<P>.<B|>Caveats|
|00000d20| 3a 3c 2f 42 3e 0a 0a 3c | 50 3e 0a 0a 3c 55 4c 3e |:</B>..<|P>..<UL>|
|00000d30| 0a 3c 4c 49 3e 54 68 72 | 65 61 64 73 20 69 6e 74 |.<LI>Thr|eads int|
|00000d40| 65 72 61 63 74 20 73 74 | 72 61 6e 67 65 6c 79 20 |eract st|rangely |
|00000d50| 77 69 74 68 20 69 6e 74 | 65 72 72 75 70 74 73 3a |with int|errupts:|
|00000d60| 20 74 68 65 0a 4b 65 79 | 62 6f 61 72 64 49 6e 74 | the.Key|boardInt|
|00000d70| 65 72 72 75 70 74 20 65 | 78 63 65 70 74 69 6f 6e |errupt e|xception|
|00000d80| 20 77 69 6c 6c 20 62 65 | 20 72 65 63 65 69 76 65 | will be| receive|
|00000d90| 64 20 62 79 20 61 6e 20 | 61 72 62 69 74 72 61 72 |d by an |arbitrar|
|00000da0| 79 0a 74 68 72 65 61 64 | 2e 20 20 28 57 68 65 6e |y.thread|. (When|
|00000db0| 20 74 68 65 20 73 69 67 | 6e 61 6c 20 6d 6f 64 75 | the sig|nal modu|
|00000dc0| 6c 65 20 69 73 20 61 76 | 61 69 6c 61 62 6c 65 2c |le is av|ailable,|
|00000dd0| 20 69 6e 74 65 72 72 75 | 70 74 73 0a 61 6c 77 61 | interru|pts.alwa|
|00000de0| 79 73 20 67 6f 20 74 6f | 20 74 68 65 20 6d 61 69 |ys go to| the mai|
|00000df0| 6e 20 74 68 72 65 61 64 | 2e 29 0a 0a 3c 50 3e 0a |n thread|.)..<P>.|
|00000e00| 3c 2f 4c 49 3e 0a 3c 4c | 49 3e 43 61 6c 6c 69 6e |</LI>.<L|I>Callin|
|00000e10| 67 20 73 79 73 2e 65 78 | 69 74 28 29 20 6f 72 20 |g sys.ex|it() or |
|00000e20| 72 61 69 73 69 6e 67 20 | 74 68 65 20 53 79 73 74 |raising |the Syst|
|00000e30| 65 6d 45 78 69 74 20 69 | 73 0a 65 71 75 69 76 61 |emExit i|s.equiva|
|00000e40| 6c 65 6e 74 20 74 6f 20 | 63 61 6c 6c 69 6e 67 20 |lent to |calling |
|00000e50| 74 68 72 65 61 64 2e 65 | 78 69 74 5f 74 68 72 65 |thread.e|xit_thre|
|00000e60| 61 64 28 29 2e 0a 0a 3c | 50 3e 0a 3c 2f 4c 49 3e |ad()...<|P>.</LI>|
|00000e70| 0a 3c 4c 49 3e 4e 6f 74 | 20 61 6c 6c 20 62 75 69 |.<LI>Not| all bui|
|00000e80| 6c 74 2d 69 6e 20 66 75 | 6e 63 74 69 6f 6e 73 20 |lt-in fu|nctions |
|00000e90| 74 68 61 74 20 6d 61 79 | 20 62 6c 6f 63 6b 20 77 |that may| block w|
|00000ea0| 61 69 74 69 6e 67 20 66 | 6f 72 20 49 2f 4f 20 61 |aiting f|or I/O a|
|00000eb0| 6c 6c 6f 77 20 6f 74 68 | 65 72 0a 74 68 72 65 61 |llow oth|er.threa|
|00000ec0| 64 73 20 74 6f 20 72 75 | 6e 2e 20 20 28 54 68 65 |ds to ru|n. (The|
|00000ed0| 20 6d 6f 73 74 20 70 6f | 70 75 6c 61 72 20 6f 6e | most po|pular on|
|00000ee0| 65 73 20 28 73 6c 65 65 | 70 2c 20 72 65 61 64 2c |es (slee|p, read,|
|00000ef0| 0a 73 65 6c 65 63 74 29 | 20 77 6f 72 6b 20 61 73 |.select)| work as|
|00000f00| 20 65 78 70 65 63 74 65 | 64 2e 29 0a 0a 3c 50 3e | expecte|d.)..<P>|
|00000f10| 0a 3c 2f 4c 49 3e 0a 3c | 2f 55 4c 3e 0a 3c 48 52 |.</LI>.<|/UL>.<HR|
|00000f20| 3e 0a 0a 3c 2f 42 4f 44 | 59 3e 0a 3c 2f 48 54 4d |>..</BOD|Y>.</HTM|
|00000f30| 4c 3e 0a | |L>. | |
+--------+-------------------------+-------------------------+--------+--------+