|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: f
Length: 8228 (0x2024)
Names: »flock.2«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./usr/man/cat2/flock.2«
0x0000…0020 0a 0a 0a 5f 08 4f 5f 08 6e 5f 08 6c 5f 08 69 5f 08 6e 5f 08 65 20 5f 08 4d 5f 08 61 5f 08 6e 5f ┆ _ O_ n_ l_ i_ n_ e _ M_ a_ n_┆ 0x0020…0040 08 75 5f 08 61 5f 08 6c 20 20 20 20 20 20 20 20 20 20 20 20 20 53 79 73 74 65 6d 20 43 61 6c 6c ┆ u_ a_ l System Call┆ 0x0040…0060 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 63 6b 28 32 29 0a 0a 0a 0a ┆s flock(2) ┆ 0x0060…0080 4e 08 4e 08 4e 08 4e 41 08 41 08 41 08 41 4d 08 4d 08 4d 08 4d 45 08 45 08 45 08 45 0a 20 20 20 ┆N N N NA A A AM M M ME E E E ┆ 0x0080…00a0 20 20 66 6c 6f 63 6b 20 2d 20 61 70 70 6c 79 2c 20 63 68 61 6e 67 65 2c 20 6f 72 20 72 65 6d 6f ┆ flock - apply, change, or remo┆ 0x00a0…00c0 76 65 20 61 20 66 69 6c 65 2d 6c 65 76 65 6c 20 6c 6f 63 6b 20 6f 6e 20 61 6e 0a 20 20 20 20 20 ┆ve a file-level lock on an ┆ 0x00c0…00e0 6f 70 65 6e 20 66 69 6c 65 0a 0a 53 08 53 08 53 08 53 59 08 59 08 59 08 59 4e 08 4e 08 4e 08 4e ┆open file S S S SY Y Y YN N N N┆ 0x00e0…0100 54 08 54 08 54 08 54 41 08 41 08 41 08 41 58 08 58 08 58 08 58 0a 20 20 20 20 20 23 08 23 08 23 ┆T T T TA A A AX X X X # # #┆ 0x0100…0120 08 23 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 63 08 63 08 63 08 63 6c 08 6c 08 6c 08 6c 75 08 ┆ #i i i in n n nc c c cl l l lu ┆ 0x0120…0140 75 08 75 08 75 64 08 64 08 64 08 64 65 08 65 08 65 08 65 20 3c 08 3c 08 3c 08 3c 73 08 73 08 73 ┆u u ud d d de e e e < < < <s s s┆ 0x0140…0160 08 73 79 08 79 08 79 08 79 73 08 73 08 73 08 73 2f 08 2f 08 2f 08 2f 66 08 66 08 66 08 66 69 08 ┆ sy y y ys s s s/ / / /f f f fi ┆ 0x0160…0180 69 08 69 08 69 6c 08 6c 08 6c 08 6c 65 08 65 08 65 08 65 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 ┆i i il l l le e e e. . . .h h h ┆ 0x0180…01a0 68 3e 08 3e 08 3e 08 3e 0a 0a 20 20 20 20 20 23 08 23 08 23 08 23 64 08 64 08 64 08 64 65 08 65 ┆h> > > > # # # #d d d de e┆ 0x01a0…01c0 08 65 08 65 66 08 66 08 66 08 66 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 65 08 65 08 65 08 65 ┆ e ef f f fi i i in n n ne e e e┆ 0x01c0…01e0 20 20 20 4c 08 4c 08 4c 08 4c 4f 08 4f 08 4f 08 4f 43 08 43 08 43 08 43 4b 08 4b 08 4b 08 4b 5f ┆ L L L LO O O OC C C CK K K K_┆ 0x01e0…0200 08 5f 08 5f 08 5f 53 08 53 08 53 08 53 48 08 48 08 48 08 48 20 20 20 31 08 31 08 31 08 31 20 20 ┆ _ _ _S S S SH H H H 1 1 1 1 ┆ 0x0200…0220 20 20 2f 08 2f 08 2f 08 2f 2a 08 2a 08 2a 08 2a 20 73 08 73 08 73 08 73 68 08 68 08 68 08 68 61 ┆ / / / /* * * * s s s sh h h ha┆ 0x0220…0240 08 61 08 61 08 61 72 08 72 08 72 08 72 65 08 65 08 65 08 65 64 08 64 08 64 08 64 20 6c 08 6c 08 ┆ a a ar r r re e e ed d d d l l ┆ 0x0240…0260 6c 08 6c 6f 08 6f 08 6f 08 6f 63 08 63 08 63 08 63 6b 08 6b 08 6b 08 6b 20 2a 08 2a 08 2a 08 2a ┆l lo o o oc c c ck k k k * * * *┆ 0x0260…0280 2f 08 2f 08 2f 08 2f 0a 20 20 20 20 20 23 08 23 08 23 08 23 64 08 64 08 64 08 64 65 08 65 08 65 ┆/ / / / # # # #d d d de e e┆ 0x0280…02a0 08 65 66 08 66 08 66 08 66 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 65 08 65 08 65 08 65 20 20 ┆ ef f f fi i i in n n ne e e e ┆ 0x02a0…02c0 20 4c 08 4c 08 4c 08 4c 4f 08 4f 08 4f 08 4f 43 08 43 08 43 08 43 4b 08 4b 08 4b 08 4b 5f 08 5f ┆ L L L LO O O OC C C CK K K K_ _┆ 0x02c0…02e0 08 5f 08 5f 45 08 45 08 45 08 45 58 08 58 08 58 08 58 20 20 20 32 08 32 08 32 08 32 20 20 20 20 ┆ _ _E E E EX X X X 2 2 2 2 ┆ 0x02e0…0300 2f 08 2f 08 2f 08 2f 2a 08 2a 08 2a 08 2a 20 65 08 65 08 65 08 65 78 08 78 08 78 08 78 63 08 63 ┆/ / / /* * * * e e e ex x x xc c┆ 0x0300…0320 08 63 08 63 6c 08 6c 08 6c 08 6c 75 08 75 08 75 08 75 73 08 73 08 73 08 73 69 08 69 08 69 08 69 ┆ c cl l l lu u u us s s si i i i┆ 0x0320…0340 76 08 76 08 76 08 76 65 08 65 08 65 08 65 20 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f 63 08 63 ┆v v v ve e e e l l l lo o o oc c┆ 0x0340…0360 08 63 08 63 6b 08 6b 08 6b 08 6b 20 2a 08 2a 08 2a 08 2a 2f 08 2f 08 2f 08 2f 0a 20 20 20 20 20 ┆ c ck k k k * * * */ / / / ┆ 0x0360…0380 23 08 23 08 23 08 23 64 08 64 08 64 08 64 65 08 65 08 65 08 65 66 08 66 08 66 08 66 69 08 69 08 ┆# # # #d d d de e e ef f f fi i ┆ 0x0380…03a0 69 08 69 6e 08 6e 08 6e 08 6e 65 08 65 08 65 08 65 20 20 20 4c 08 4c 08 4c 08 4c 4f 08 4f 08 4f ┆i in n n ne e e e L L L LO O O┆ 0x03a0…03c0 08 4f 43 08 43 08 43 08 43 4b 08 4b 08 4b 08 4b 5f 08 5f 08 5f 08 5f 4e 08 4e 08 4e 08 4e 42 08 ┆ OC C C CK K K K_ _ _ _N N N NB ┆ 0x03c0…03e0 42 08 42 08 42 20 20 20 34 08 34 08 34 08 34 20 20 20 20 2f 08 2f 08 2f 08 2f 2a 08 2a 08 2a 08 ┆B B B 4 4 4 4 / / / /* * * ┆ 0x03e0…0400 2a 20 64 08 64 08 64 08 64 6f 08 6f 08 6f 08 6f 6e 08 6e 08 6e 08 6e 27 08 27 08 27 08 27 74 08 ┆* d d d do o o on n n n' ' ' 't ┆ 0x0400…0420 74 08 74 08 74 20 62 08 62 08 62 08 62 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f 63 08 63 08 63 ┆t t t b b b bl l l lo o o oc c c┆ 0x0420…0440 08 63 6b 08 6b 08 6b 08 6b 20 77 08 77 08 77 08 77 68 08 68 08 68 08 68 65 08 65 08 65 08 65 6e ┆ ck k k k w w w wh h h he e e en┆ 0x0440…0460 08 6e 08 6e 08 6e 20 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f 63 08 63 08 63 08 63 6b 08 6b 08 ┆ n n n l l l lo o o oc c c ck k ┆ 0x0460…0480 6b 08 6b 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 67 08 67 08 67 08 67 20 2a 08 2a 08 2a 08 2a ┆k ki i i in n n ng g g g * * * *┆ 0x0480…04a0 2f 08 2f 08 2f 08 2f 0a 20 20 20 20 20 23 08 23 08 23 08 23 64 08 64 08 64 08 64 65 08 65 08 65 ┆/ / / / # # # #d d d de e e┆ 0x04a0…04c0 08 65 66 08 66 08 66 08 66 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 65 08 65 08 65 08 65 20 20 ┆ ef f f fi i i in n n ne e e e ┆ 0x04c0…04e0 20 4c 08 4c 08 4c 08 4c 4f 08 4f 08 4f 08 4f 43 08 43 08 43 08 43 4b 08 4b 08 4b 08 4b 5f 08 5f ┆ L L L LO O O OC C C CK K K K_ _┆ 0x04e0…0500 08 5f 08 5f 55 08 55 08 55 08 55 4e 08 4e 08 4e 08 4e 20 20 20 38 08 38 08 38 08 38 20 20 20 20 ┆ _ _U U U UN N N N 8 8 8 8 ┆ 0x0500…0520 2f 08 2f 08 2f 08 2f 2a 08 2a 08 2a 08 2a 20 75 08 75 08 75 08 75 6e 08 6e 08 6e 08 6e 6c 08 6c ┆/ / / /* * * * u u u un n n nl l┆ 0x0520…0540 08 6c 08 6c 6f 08 6f 08 6f 08 6f 63 08 63 08 63 08 63 6b 08 6b 08 6b 08 6b 20 2a 08 2a 08 2a 08 ┆ l lo o o oc c c ck k k k * * * ┆ 0x0540…0560 2a 2f 08 2f 08 2f 08 2f 0a 0a 20 20 20 20 20 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 74 08 74 ┆*/ / / / i i i in n n nt t┆ 0x0560…0580 08 74 08 74 20 66 08 66 08 66 08 66 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f 63 08 63 08 63 08 ┆ t t f f f fl l l lo o o oc c c ┆ 0x0580…05a0 63 6b 08 6b 08 6b 08 6b 28 08 28 08 28 08 28 66 08 66 08 66 08 66 64 08 64 08 64 08 64 2c 08 2c ┆ck k k k( ( ( (f f f fd d d d, ,┆ 0x05a0…05c0 08 2c 08 2c 20 6f 08 6f 08 6f 08 6f 70 08 70 08 70 08 70 65 08 65 08 65 08 65 72 08 72 08 72 08 ┆ , , o o o op p p pe e e er r r ┆ 0x05c0…05e0 72 61 08 61 08 61 08 61 74 08 74 08 74 08 74 69 08 69 08 69 08 69 6f 08 6f 08 6f 08 6f 6e 08 6e ┆ra a a at t t ti i i io o o on n┆ 0x05e0…0600 08 6e 08 6e 29 08 29 08 29 08 29 0a 20 20 20 20 20 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 74 ┆ n n) ) ) ) i i i in n n nt┆ 0x0600…0620 08 74 08 74 08 74 20 66 08 66 08 66 08 66 64 08 64 08 64 08 64 2c 08 2c 08 2c 08 2c 20 6f 08 6f ┆ t t t f f f fd d d d, , , , o o┆ 0x0620…0640 08 6f 08 6f 70 08 70 08 70 08 70 65 08 65 08 65 08 65 72 08 72 08 72 08 72 61 08 61 08 61 08 61 ┆ o op p p pe e e er r r ra a a a┆ 0x0640…0660 74 08 74 08 74 08 74 69 08 69 08 69 08 69 6f 08 6f 08 6f 08 6f 6e 08 6e 08 6e 08 6e 3b 08 3b 08 ┆t t t ti i i io o o on n n n; ; ┆ 0x0660…0680 3b 08 3b 0a 0a 44 08 44 08 44 08 44 45 08 45 08 45 08 45 53 08 53 08 53 08 53 43 08 43 08 43 08 ┆; ; D D D DE E E ES S S SC C C ┆ 0x0680…06a0 43 52 08 52 08 52 08 52 49 08 49 08 49 08 49 50 08 50 08 50 08 50 54 08 54 08 54 08 54 49 08 49 ┆CR R R RI I I IP P P PT T T TI I┆ 0x06a0…06c0 08 49 08 49 4f 08 4f 08 4f 08 4f 4e 08 4e 08 4e 08 4e 0a 20 20 20 20 20 5f 08 66 5f 08 6c 5f 08 ┆ I IO O O ON N N N _ f_ l_ ┆ 0x06c0…06e0 6f 5f 08 63 5f 08 6b 20 61 6c 6c 6f 77 73 20 61 20 70 72 6f 63 65 73 73 20 74 6f 20 6d 61 6e 61 ┆o_ c_ k allows a process to mana┆ 0x06e0…0700 67 65 20 66 69 6c 65 2d 6c 65 76 65 6c 20 6c 6f 63 6b 73 2e 0a 0a 20 20 20 20 20 66 08 66 08 66 ┆ge file-level locks. f f f┆ 0x0700…0720 08 66 64 08 64 08 64 08 64 20 20 20 53 70 65 63 69 66 69 65 73 20 74 68 65 20 66 69 6c 65 20 64 ┆ fd d d d Specifies the file d┆ 0x0720…0740 65 73 63 72 69 70 74 6f 72 20 6f 66 20 74 68 65 20 66 69 6c 65 20 77 68 6f 73 65 20 6c 6f 63 6b ┆escriptor of the file whose lock┆ 0x0740…0760 20 69 73 0a 20 20 20 20 20 20 20 20 20 20 62 65 69 6e 67 20 6d 6f 64 69 66 69 65 64 2e 0a 0a 20 ┆ is being modified. ┆ 0x0760…0780 20 20 20 20 6f 08 6f 08 6f 08 6f 70 08 70 08 70 08 70 65 08 65 08 65 08 65 72 08 72 08 72 08 72 ┆ o o o op p p pe e e er r r r┆ 0x0780…07a0 61 08 61 08 61 08 61 74 08 74 08 74 08 74 69 08 69 08 69 08 69 6f 08 6f 08 6f 08 6f 6e 08 6e 08 ┆a a a at t t ti i i io o o on n ┆ 0x07a0…07c0 6e 08 6e 0a 20 20 20 20 20 20 20 20 20 20 53 70 65 63 69 66 69 65 73 20 74 68 65 20 74 79 70 65 ┆n n Specifies the type┆ 0x07c0…07e0 20 6f 66 20 6c 6f 63 6b 20 62 65 69 6e 67 20 6d 61 6e 61 67 65 64 2c 20 77 68 65 74 68 65 72 20 ┆ of lock being managed, whether ┆ 0x07e0…0800 69 74 20 69 73 0a 20 20 20 20 20 20 20 20 20 20 62 65 69 6e 67 20 72 65 6d 6f 76 65 64 20 6f 72 ┆it is being removed or┆ 0x0800…0820 20 61 64 64 65 64 20 61 6e 64 20 77 68 65 74 68 65 72 20 74 68 65 20 63 61 6c 6c 20 6d 61 79 20 ┆ added and whether the call may ┆ 0x0820…0840 62 6c 6f 63 6b 0a 20 20 20 20 20 20 20 20 20 20 77 61 69 74 69 6e 67 20 66 6f 72 20 74 68 65 20 ┆block waiting for the ┆ 0x0840…0860 6c 6f 63 6b 2e 20 20 54 68 65 20 63 6f 6d 70 6c 65 74 65 20 6f 70 65 72 61 74 69 6f 6e 20 69 73 ┆lock. The complete operation is┆ 0x0860…0880 20 73 70 65 63 69 2d 0a 20 20 20 20 20 20 20 20 20 20 66 69 65 64 20 62 79 20 5f 08 6f 5f 08 72 ┆ speci- fied by _ o_ r┆ 0x0880…08a0 69 6e 67 20 28 20 7c 20 29 20 74 68 65 20 76 61 72 69 6f 75 73 20 64 65 66 69 6e 65 73 20 74 6f ┆ing ( | ) the various defines to┆ 0x08a0…08c0 67 65 74 68 65 72 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4c 4f 43 4b 5f 53 48 0a 20 20 20 20 20 ┆gether. LOCK_SH ┆ 0x08c0…08e0 20 20 20 20 20 20 20 20 20 20 69 6e 64 69 63 61 74 65 73 20 74 68 61 74 20 61 20 73 68 61 72 65 ┆ indicates that a share┆ 0x08e0…0900 64 20 6c 6f 63 6b 20 69 73 20 62 65 69 6e 67 20 6d 61 6e 61 67 65 64 2e 0a 0a 20 20 20 20 20 20 ┆d lock is being managed. ┆ 0x0900…0920 20 20 20 20 4c 4f 43 4b 5f 45 58 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 64 69 63 ┆ LOCK_EX indic┆ 0x0920…0940 61 74 65 73 20 74 68 61 74 20 61 6e 20 65 78 63 6c 75 73 69 76 65 20 6c 6f 63 6b 20 69 73 20 62 ┆ates that an exclusive lock is b┆ 0x0940…0960 65 69 6e 67 20 6d 61 6e 61 67 65 64 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4c 4f 43 4b 5f 4e 42 ┆eing managed. LOCK_NB┆ 0x0960…0980 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 64 69 63 61 74 65 73 20 74 68 61 74 20 74 ┆ indicates that t┆ 0x0980…09a0 68 65 20 63 61 6c 6c 20 6d 75 73 74 20 6e 6f 74 20 62 6c 6f 63 6b 20 77 68 69 6c 65 0a 20 20 20 ┆he call must not block while ┆ 0x09a0…09c0 20 20 20 20 20 20 20 20 20 20 20 20 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 61 63 71 75 69 72 ┆ attempting to acquir┆ 0x09c0…09e0 65 20 61 20 6c 6f 63 6b 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4c 4f 43 4b 5f 55 4e 0a 20 20 20 ┆e a lock. LOCK_UN ┆ 0x09e0…0a00 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 64 69 63 61 74 65 73 20 74 68 61 74 20 74 68 65 20 73 ┆ indicates that the s┆ 0x0a00…0a20 70 65 63 69 66 69 65 64 20 6c 6f 63 6b 20 69 73 20 62 65 69 6e 67 0a 20 20 20 20 20 20 20 20 20 ┆pecified lock is being ┆ 0x0a20…0a40 20 20 20 20 20 20 72 65 6d 6f 76 65 64 2e 0a 0a 20 20 20 20 20 53 08 53 08 53 08 53 79 08 79 08 ┆ removed. S S S Sy y ┆ 0x0a40…0a60 79 08 79 73 08 73 08 73 08 73 74 08 74 08 74 08 74 65 08 65 08 65 08 65 6d 08 6d 08 6d 08 6d 20 ┆y ys s s st t t te e e em m m m ┆ 0x0a60…0a80 4c 08 4c 08 4c 08 4c 6f 08 6f 08 6f 08 6f 63 08 63 08 63 08 63 6b 08 6b 08 6b 08 6b 20 52 08 52 ┆L L L Lo o o oc c c ck k k k R R┆ 0x0a80…0aa0 08 52 08 52 65 08 65 08 65 08 65 71 08 71 08 71 08 71 75 08 75 08 75 08 75 69 08 69 08 69 08 69 ┆ R Re e e eq q q qu u u ui i i i┆ 0x0aa0…0ac0 72 08 72 08 72 08 72 65 08 65 08 65 08 65 6d 08 6d 08 6d 08 6d 65 08 65 08 65 08 65 6e 08 6e 08 ┆r r r re e e em m m me e e en n ┆ 0x0ac0…0ae0 6e 08 6e 74 08 74 08 74 08 74 73 08 73 08 73 08 73 0a 20 20 20 20 20 54 58 20 66 6f 72 63 65 73 ┆n nt t t ts s s s TX forces┆ 0x0ae0…0b00 20 61 6c 6c 20 70 72 6f 67 72 61 6d 73 20 74 6f 20 6f 62 73 65 72 76 65 20 74 68 65 20 6c 6f 63 ┆ all programs to observe the loc┆ 0x0b00…0b20 6b 69 6e 67 20 63 6f 6e 73 74 72 61 69 6e 74 73 2e 0a 20 20 20 20 20 54 68 65 72 65 20 61 72 65 ┆king constraints. There are┆ 0x0b20…0b40 20 34 20 74 79 70 65 73 20 6f 66 20 66 69 6c 65 20 6c 6f 63 6b 73 20 61 76 61 69 6c 61 62 6c 65 ┆ 4 types of file locks available┆ 0x0b40…0b60 3a 0a 0a 20 20 20 20 20 49 53 20 20 20 6f 62 74 61 69 6e 65 64 20 77 68 65 6e 20 74 68 65 20 66 ┆: IS obtained when the f┆ 0x0b60…0b80 69 6c 65 20 69 73 20 6f 70 65 6e 65 64 20 77 69 74 68 20 72 65 61 64 2d 6f 6e 6c 79 20 61 63 63 ┆ile is opened with read-only acc┆ 0x0b80…0ba0 65 73 73 2e 0a 20 20 20 20 20 20 20 20 20 20 41 6e 20 49 53 20 6c 6f 63 6b 20 69 73 20 63 6f 6d ┆ess. An IS lock is com┆ 0x0ba0…0bc0 70 61 74 69 62 6c 65 20 77 69 74 68 20 6f 74 68 65 72 20 49 53 20 6c 6f 63 6b 73 2c 20 77 69 74 ┆patible with other IS locks, wit┆ 0x0bc0…0be0 68 20 49 58 0a 20 20 20 20 20 20 20 20 20 20 6c 6f 63 6b 73 2c 20 61 6e 64 20 77 69 74 68 20 53 ┆h IX locks, and with S┆ 0x0be0…0c00 20 6c 6f 63 6b 73 2e 0a 0a 20 20 20 20 20 49 58 20 20 20 6f 62 74 61 69 6e 65 64 20 77 68 65 6e ┆ locks. IX obtained when┆ 0x0c00…0c20 20 74 68 65 20 66 69 6c 65 73 20 69 73 20 6f 70 65 6e 65 64 20 77 69 74 68 20 72 65 61 64 2f 77 ┆ the files is opened with read/w┆ 0x0c20…0c40 72 69 74 65 2c 0a 20 20 20 20 20 20 20 20 20 20 77 72 69 74 65 2d 6f 6e 6c 79 2c 20 6f 72 20 61 ┆rite, write-only, or a┆ 0x0c40…0c60 70 70 65 6e 64 20 61 63 63 65 73 73 2e 20 20 41 6e 20 49 58 20 6c 6f 63 6b 20 69 73 20 63 6f 6d ┆ppend access. An IX lock is com┆ 0x0c60…0c80 70 61 74 69 62 6c 65 0a 20 20 20 20 20 20 20 20 20 20 77 69 74 68 20 6f 74 68 65 72 20 49 58 20 ┆patible with other IX ┆ 0x0c80…0ca0 6c 6f 63 6b 73 20 61 6e 64 20 77 69 74 68 20 49 53 20 6c 6f 63 6b 73 2e 0a 0a 20 20 20 20 20 53 ┆locks and with IS locks. S┆ 0x0ca0…0cc0 20 20 20 20 6f 62 74 61 69 6e 65 64 20 77 68 65 6e 20 74 68 65 20 66 69 6c 65 20 69 73 20 6f 70 ┆ obtained when the file is op┆ 0x0cc0…0ce0 65 6e 65 64 20 77 69 74 68 20 74 68 65 20 4f 5f 53 48 4c 4f 43 4b 20 66 6c 61 67 0a 20 20 20 20 ┆ened with the O_SHLOCK flag ┆ 0x0ce0…0d00 20 20 20 20 20 20 6f 72 20 77 68 65 6e 20 74 68 65 20 5f 08 66 5f 08 6c 5f 08 6f 5f 08 63 5f 08 ┆ or when the _ f_ l_ o_ c_ ┆ 0x0d00…0d20 6b 20 63 61 6c 6c 20 69 73 20 6d 61 64 65 2e 20 20 41 6e 20 53 20 6c 6f 63 6b 20 69 73 20 63 6f ┆k call is made. An S lock is co┆ 0x0d20…0d40 6d 70 61 74 69 2d 0a 20 20 20 20 20 20 20 20 20 20 62 6c 65 20 77 69 74 68 20 6f 74 68 65 72 20 ┆mpati- ble with other ┆ 0x0d40…0d60 53 20 6c 6f 63 6b 73 20 61 6e 64 20 77 69 74 68 20 49 53 20 6c 6f 63 6b 73 2e 0a 0a 20 20 20 20 ┆S locks and with IS locks. ┆ 0x0d60…0d80 20 58 20 20 20 20 6f 62 74 61 69 6e 65 64 20 77 68 65 6e 20 74 68 65 20 66 69 6c 65 20 69 73 20 ┆ X obtained when the file is ┆ 0x0d80…0da0 6f 70 65 6e 65 64 20 77 69 74 68 20 74 68 65 20 4f 5f 45 58 4c 4f 43 4b 20 66 6c 61 67 0a 20 20 ┆opened with the O_EXLOCK flag ┆ 0x0da0…0dc0 20 20 20 20 20 20 20 20 6f 72 20 77 68 65 6e 20 74 68 65 20 5f 08 66 5f 08 6c 5f 08 6f 5f 08 63 ┆ or when the _ f_ l_ o_ c┆ 0x0dc0…0de0 5f 08 6b 20 63 61 6c 6c 20 69 73 20 6d 61 64 65 2e 20 20 41 6e 20 58 20 6c 6f 63 6b 20 69 73 20 ┆_ k call is made. An X lock is ┆ 0x0de0…0e00 6e 6f 74 0a 0a 0a 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 ┆not compatible w┆ 0x0e00…0e20 69 74 68 20 61 6e 79 20 6f 74 68 65 72 20 6c 6f 63 6b 73 2e 0a 0a 20 20 20 20 20 43 08 43 08 43 ┆ith any other locks. C C C┆ 0x0e20…0e40 08 43 75 08 75 08 75 08 75 72 08 72 08 72 08 72 72 08 72 08 72 08 72 65 08 65 08 65 08 65 6e 08 ┆ Cu u u ur r r rr r r re e e en ┆ 0x0e40…0e60 6e 08 6e 08 6e 74 08 74 08 74 08 74 2d 08 2d 08 2d 08 2d 4c 08 4c 08 4c 08 4c 6f 08 6f 08 6f 08 ┆n n nt t t t- - - -L L L Lo o o ┆ 0x0e60…0e80 6f 63 08 63 08 63 08 63 6b 08 6b 08 6b 08 6b 20 53 08 53 08 53 08 53 74 08 74 08 74 08 74 61 08 ┆oc c c ck k k k S S S St t t ta ┆ 0x0e80…0ea0 61 08 61 08 61 74 08 74 08 74 08 74 65 08 65 08 65 08 65 2e 08 2e 08 2e 08 2e 20 20 54 68 65 20 ┆a a at t t te e e e. . . . The ┆ 0x0ea0…0ec0 73 79 73 74 65 6d 20 6d 61 69 6e 74 61 69 6e 73 20 74 68 65 20 63 75 72 72 65 6e 74 2d 6c 6f 63 ┆system maintains the current-loc┆ 0x0ec0…0ee0 6b 0a 20 20 20 20 20 73 74 61 74 65 20 66 6f 72 20 65 61 63 68 20 66 69 6c 65 2e 20 20 54 68 69 ┆k state for each file. Thi┆ 0x0ee0…0f00 73 20 69 73 20 74 68 65 20 6d 6f 73 74 20 72 65 73 74 72 69 63 74 69 76 65 20 6c 6f 63 6b 20 69 ┆s is the most restrictive lock i┆ 0x0f00…0f20 6e 0a 20 20 20 20 20 65 66 66 65 63 74 20 6f 6e 20 74 68 65 20 66 69 6c 65 2e 20 20 41 64 64 69 ┆n effect on the file. Addi┆ 0x0f20…0f40 74 69 6f 6e 61 6c 20 6c 6f 63 6b 20 72 65 71 75 65 73 74 73 20 61 72 65 20 63 6f 6d 70 61 72 65 ┆tional lock requests are compare┆ 0x0f40…0f60 64 0a 20 20 20 20 20 61 67 61 69 6e 73 74 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 74 61 74 65 ┆d against the current state┆ 0x0f60…0f80 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 2e 0a 0a 20 20 ┆ to determine compatibility. ┆ 0x0f80…0fa0 20 20 20 54 08 54 08 54 08 54 72 08 72 08 72 08 72 61 08 61 08 61 08 61 6e 08 6e 08 6e 08 6e 73 ┆ T T T Tr r r ra a a an n n ns┆ 0x0fa0…0fc0 08 73 08 73 08 73 61 08 61 08 61 08 61 63 08 63 08 63 08 63 74 08 74 08 74 08 74 69 08 69 08 69 ┆ s s sa a a ac c c ct t t ti i i┆ 0x0fc0…0fe0 08 69 6f 08 6f 08 6f 08 6f 6e 08 6e 08 6e 08 6e 73 08 73 08 73 08 73 2e 08 2e 08 2e 08 2e 20 20 ┆ io o o on n n ns s s s. . . . ┆ 0x0fe0…1000 54 58 20 70 65 72 66 6f 72 6d 73 20 61 75 74 6f 6d 61 74 69 63 20 6c 6f 63 6b 69 6e 67 20 28 61 ┆TX performs automatic locking (a┆ 0x1000…1020 74 20 74 68 65 20 64 61 74 61 2d 0a 20 20 20 20 20 62 6c 6f 63 6b 20 6c 65 76 65 6c 29 20 66 6f ┆t the data- block level) fo┆ 0x1020…1040 72 20 66 69 6c 65 73 20 74 68 61 74 20 61 72 65 20 6f 70 65 6e 65 64 20 77 69 74 68 20 74 68 65 ┆r files that are opened with the┆ 0x1040…1060 20 4f 5f 43 4f 4e 54 52 4f 4c 0a 20 20 20 20 20 66 6c 61 67 20 73 65 74 20 61 6e 64 20 61 72 65 ┆ O_CONTROL flag set and are┆ 0x1060…1080 20 75 73 65 64 20 69 6e 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 6d 6f 64 65 2e 0a 0a 20 20 20 20 ┆ used in transaction mode. ┆ 0x1080…10a0 20 4d 08 4d 08 4d 08 4d 75 08 75 08 75 08 75 6c 08 6c 08 6c 08 6c 74 08 74 08 74 08 74 69 08 69 ┆ M M M Mu u u ul l l lt t t ti i┆ 0x10a0…10c0 08 69 08 69 70 08 70 08 70 08 70 6c 08 6c 08 6c 08 6c 65 08 65 08 65 08 65 20 4c 08 4c 08 4c 08 ┆ i ip p p pl l l le e e e L L L ┆ 0x10c0…10e0 4c 6f 08 6f 08 6f 08 6f 63 08 63 08 63 08 63 6b 08 6b 08 6b 08 6b 73 08 73 08 73 08 73 2e 08 2e ┆Lo o o oc c c ck k k ks s s s. .┆ 0x10e0…1100 08 2e 08 2e 20 20 4d 75 6c 74 69 70 6c 65 20 6c 6f 63 6b 73 20 6d 61 79 20 62 65 20 61 70 70 6c ┆ . . Multiple locks may be appl┆ 0x1100…1120 69 65 64 20 74 6f 20 61 20 66 69 6c 65 20 62 79 0a 20 20 20 20 20 74 68 65 20 73 61 6d 65 20 70 ┆ied to a file by the same p┆ 0x1120…1140 72 6f 63 65 73 73 2e 20 20 54 68 65 20 60 60 65 66 66 65 63 74 69 76 65 20 6c 6f 63 6b 27 27 20 ┆rocess. The ``effective lock'' ┆ 0x1140…1160 69 73 20 74 68 65 20 75 6e 69 6f 6e 20 6f 66 0a 20 20 20 20 20 61 6c 6c 20 6f 66 20 74 68 65 20 ┆is the union of all of the ┆ 0x1160…1180 6c 6f 63 6b 73 20 6f 62 74 61 69 6e 65 64 20 66 6f 72 20 74 68 65 20 66 69 6c 65 2e 20 20 48 6f ┆locks obtained for the file. Ho┆ 0x1180…11a0 77 65 76 65 72 2c 20 6f 6e 6c 79 20 74 68 65 20 53 0a 20 20 20 20 20 61 6e 64 20 49 58 20 6c 6f ┆wever, only the S and IX lo┆ 0x11a0…11c0 63 6b 73 20 63 6f 6d 70 6c 65 6d 65 6e 74 20 65 61 63 68 20 6f 74 68 65 72 2e 20 20 49 66 20 61 ┆cks complement each other. If a┆ 0x11c0…11e0 6e 20 65 78 63 6c 75 73 69 76 65 20 6c 6f 63 6b 20 69 73 0a 20 20 20 20 20 68 65 6c 64 2c 20 6e ┆n exclusive lock is held, n┆ 0x11e0…1200 6f 20 6f 74 68 65 72 20 6c 6f 63 6b 73 20 61 72 65 20 67 72 61 6e 74 65 64 20 77 68 69 6c 65 20 ┆o other locks are granted while ┆ 0x1200…1220 74 68 65 20 6c 6f 63 6b 20 69 73 20 68 65 6c 64 2e 0a 20 20 20 20 20 54 68 65 20 65 78 63 6c 75 ┆the lock is held. The exclu┆ 0x1220…1240 73 69 76 65 20 6c 6f 63 6b 20 69 73 20 6e 6f 74 20 67 72 61 6e 74 65 64 20 77 68 69 6c 65 20 61 ┆sive lock is not granted while a┆ 0x1240…1260 6e 79 20 6f 74 68 65 72 20 6c 6f 63 6b 20 69 73 0a 20 20 20 20 20 68 65 6c 64 20 6f 6e 20 74 68 ┆ny other lock is held on th┆ 0x1260…1280 65 20 66 69 6c 65 2e 0a 0a 20 20 20 20 20 4c 6f 63 6b 73 20 61 72 65 20 6d 61 69 6e 74 61 69 6e ┆e file. Locks are maintain┆ 0x1280…12a0 65 64 20 6f 6e 20 70 65 72 2d 70 72 6f 63 65 73 73 20 61 6e 64 20 70 65 72 2d 64 69 73 6b 2d 66 ┆ed on per-process and per-disk-f┆ 0x12a0…12c0 69 6c 65 20 62 61 73 69 73 2e 0a 20 20 20 20 20 4d 75 6c 74 69 70 6c 65 20 72 65 66 65 72 65 6e ┆ile basis. Multiple referen┆ 0x12c0…12e0 63 65 73 20 74 6f 20 61 20 73 69 6e 67 6c 65 20 6c 6f 63 6b 20 72 65 73 75 6c 74 20 66 72 6f 6d ┆ces to a single lock result from┆ 0x12e0…1300 20 65 69 74 68 65 72 0a 20 20 20 20 20 66 69 6c 65 73 20 77 69 74 68 20 6d 75 6c 74 69 70 6c 65 ┆ either files with multiple┆ 0x1300…1320 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 20 63 61 6c 6c 73 20 6f 75 74 73 74 61 6e 64 69 6e 67 2c ┆ _ o_ p_ e_ n calls outstanding,┆ 0x1320…1340 20 6f 72 20 66 69 6c 65 20 64 65 73 63 72 69 70 2d 0a 20 20 20 20 20 74 6f 72 73 20 64 75 70 6c ┆ or file descrip- tors dupl┆ 0x1340…1360 69 63 61 74 65 64 20 77 69 74 68 20 74 68 65 20 5f 08 64 5f 08 75 5f 08 70 20 63 61 6c 6c 2e 20 ┆icated with the _ d_ u_ p call. ┆ 0x1360…1380 20 28 54 68 69 73 20 69 73 20 69 6e 73 74 65 61 64 20 6f 66 20 6d 75 6c 2d 0a 20 20 20 20 20 74 ┆ (This is instead of mul- t┆ 0x1380…13a0 69 70 6c 65 20 69 6e 73 74 61 6e 63 65 73 20 6f 66 20 61 20 6c 6f 63 6b 2e 29 0a 20 20 20 20 20 ┆iple instances of a lock.) ┆ 0x13a0…13c0 44 6f 77 6e 67 72 61 64 69 6e 67 20 74 68 65 20 6c 6f 63 6b 20 6f 6e 20 61 6e 79 20 73 75 63 68 ┆Downgrading the lock on any such┆ 0x13c0…13e0 20 64 65 73 63 72 69 70 74 6f 72 20 72 65 73 75 6c 74 73 20 69 6e 20 74 68 65 0a 20 20 20 20 20 ┆ descriptor results in the ┆ 0x13e0…1400 6c 6f 63 6b 20 62 65 69 6e 67 20 64 6f 77 6e 67 72 61 64 65 64 20 66 6f 72 20 61 6c 6c 20 64 65 ┆lock being downgraded for all de┆ 0x1400…1420 73 63 72 69 70 74 6f 72 73 2e 0a 20 20 20 20 20 41 20 5f 08 63 5f 08 6c 5f 08 6f 5f 08 73 5f 08 ┆scriptors. A _ c_ l_ o_ s_ ┆ 0x1420…1440 65 20 63 61 6c 6c 20 6f 6e 20 6f 6e 65 20 73 75 63 68 20 64 65 73 63 72 69 70 74 6f 72 20 72 65 ┆e call on one such descriptor re┆ 0x1440…1460 73 75 6c 74 73 20 69 6e 20 61 6e 79 20 72 65 6d 61 69 6e 69 6e 67 0a 20 20 20 20 20 64 65 73 63 ┆sults in any remaining desc┆ 0x1460…1480 72 69 70 74 6f 72 73 20 72 65 74 61 69 6e 69 6e 67 20 74 68 65 20 68 69 67 68 65 73 74 2d 6c 6f ┆riptors retaining the highest-lo┆ 0x1480…14a0 63 6b 20 73 74 61 74 65 20 6f 62 74 61 69 6e 65 64 2e 20 20 54 68 65 0a 20 20 20 20 20 6c 6f 63 ┆ck state obtained. The loc┆ 0x14a0…14c0 6b 20 69 73 20 6e 6f 74 20 64 6f 77 6e 67 72 61 64 65 64 2e 20 20 54 68 65 20 6c 6f 63 6b 20 69 ┆k is not downgraded. The lock i┆ 0x14c0…14e0 73 20 72 65 6d 6f 76 65 64 20 6f 6e 20 74 68 65 20 6c 61 73 74 0a 20 20 20 20 20 63 6c 6f 73 65 ┆s removed on the last close┆ 0x14e0…1500 2e 0a 0a 20 20 20 20 20 43 08 43 08 43 08 43 68 08 68 08 68 08 68 61 08 61 08 61 08 61 6e 08 6e ┆. C C C Ch h h ha a a an n┆ 0x1500…1520 08 6e 08 6e 67 08 67 08 67 08 67 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 67 08 67 08 67 08 67 ┆ n ng g g gi i i in n n ng g g g┆ 0x1520…1540 20 74 08 74 08 74 08 74 68 08 68 08 68 08 68 65 08 65 08 65 08 65 20 4c 08 4c 08 4c 08 4c 6f 08 ┆ t t t th h h he e e e L L L Lo ┆ 0x1540…1560 6f 08 6f 08 6f 63 08 63 08 63 08 63 6b 08 6b 08 6b 08 6b 20 54 08 54 08 54 08 54 79 08 79 08 79 ┆o o oc c c ck k k k T T T Ty y y┆ 0x1560…1580 08 79 70 08 70 08 70 08 70 65 08 65 08 65 08 65 2e 08 2e 08 2e 08 2e 20 20 41 20 70 72 6f 67 72 ┆ yp p p pe e e e. . . . A progr┆ 0x1580…15a0 61 6d 20 6d 61 79 20 63 68 61 6e 67 65 20 74 68 65 20 74 79 70 65 20 6f 66 0a 20 20 20 20 20 6c ┆am may change the type of l┆ 0x15a0…15c0 6f 63 6b 20 69 74 20 68 6f 6c 64 73 20 6f 6e 20 61 20 64 65 73 63 72 69 70 74 6f 72 20 75 73 69 ┆ock it holds on a descriptor usi┆ 0x15c0…15e0 6e 67 20 74 68 65 20 5f 08 66 5f 08 6c 5f 08 6f 5f 08 63 5f 08 6b 20 63 61 6c 6c 2e 20 20 4f 6e ┆ng the _ f_ l_ o_ c_ k call. On┆ 0x15e0…1600 6c 79 0a 20 20 20 20 20 74 68 65 20 53 20 61 6e 64 20 58 20 6c 6f 63 6b 73 20 63 61 6e 20 62 65 ┆ly the S and X locks can be┆ 0x1600…1620 20 61 66 66 65 63 74 65 64 20 62 79 20 5f 08 66 5f 08 6c 5f 08 6f 5f 08 63 5f 08 6b 3b 20 74 68 ┆ affected by _ f_ l_ o_ c_ k; th┆ 0x1620…1640 65 20 49 53 20 61 6e 64 20 49 58 0a 20 20 20 20 20 72 65 71 75 69 72 65 20 74 68 61 74 20 74 68 ┆e IS and IX require that th┆ 0x1640…1660 65 20 66 69 6c 65 20 62 65 20 63 6c 6f 73 65 64 20 74 6f 20 63 68 61 6e 67 65 20 74 68 65 20 6c ┆e file be closed to change the l┆ 0x1660…1680 6f 63 6b 73 2e 0a 0a 20 20 20 20 20 50 72 6f 63 65 73 73 65 73 20 74 68 61 74 20 61 72 65 20 6e ┆ocks. Processes that are n┆ 0x1680…16a0 6f 74 20 69 6e 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 6d 6f 64 65 20 63 61 6e 20 70 65 72 66 6f ┆ot in transaction mode can perfo┆ 0x16a0…16c0 72 6d 20 6c 6f 63 6b 0a 20 20 20 20 20 63 68 61 6e 67 65 73 20 77 69 74 68 6f 75 74 20 72 65 73 ┆rm lock changes without res┆ 0x16c0…16e0 74 72 69 63 74 69 6f 6e 2e 0a 0a 20 20 20 20 20 50 72 6f 63 65 73 73 65 73 20 69 6e 20 74 72 61 ┆triction. Processes in tra┆ 0x16e0…1700 6e 73 61 63 74 69 6f 6e 20 6d 6f 64 65 20 75 73 65 20 74 77 6f 2d 70 68 61 73 65 20 6c 6f 63 6b ┆nsaction mode use two-phase lock┆ 0x1700…1720 69 6e 67 3a 20 6c 6f 63 6b 73 0a 20 20 20 20 20 63 61 6e 20 62 65 20 5f 08 75 5f 08 70 5f 08 67 ┆ing: locks can be _ u_ p_ g┆ 0x1720…1740 5f 08 72 5f 08 61 5f 08 64 5f 08 65 5f 08 64 20 77 69 74 68 6f 75 74 20 72 65 73 74 72 69 63 74 ┆_ r_ a_ d_ e_ d without restrict┆ 0x1740…1760 69 6f 6e 2c 20 62 75 74 20 61 6c 6c 20 64 6f 77 6e 67 72 61 64 65 73 20 61 72 65 0a 20 20 20 20 ┆ion, but all downgrades are ┆ 0x1760…1780 20 5f 08 64 5f 08 65 5f 08 66 5f 08 65 5f 08 72 5f 08 72 5f 08 65 5f 08 64 20 75 6e 74 69 6c 20 ┆ _ d_ e_ f_ e_ r_ r_ e_ d until ┆ 0x1780…17a0 74 68 65 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 63 6f 6d 6d 69 74 73 2e 20 20 49 66 20 61 20 74 ┆the transaction commits. If a t┆ 0x17a0…17c0 72 61 6e 73 61 63 74 69 6f 6e 0a 20 20 20 20 20 61 62 6f 72 74 73 2c 20 74 68 65 20 6c 6f 63 6b ┆ransaction aborts, the lock┆ 0x17c0…17e0 20 73 74 61 74 65 20 6f 66 20 65 61 63 68 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 20 69 ┆ state of each file descriptor i┆ 0x17e0…1800 73 20 72 65 73 74 6f 72 65 64 0a 20 20 20 20 20 74 6f 20 69 74 73 20 73 74 61 74 65 20 61 74 20 ┆s restored to its state at ┆ 0x1800…1820 74 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 6f 66 20 74 68 65 20 74 72 61 6e 73 61 63 74 69 6f 6e ┆the beginning of the transaction┆ 0x1820…1840 2e 0a 0a 20 20 20 20 20 54 68 65 20 63 61 6c 6c 20 69 73 20 72 65 73 74 61 72 74 65 64 20 61 75 ┆. The call is restarted au┆ 0x1840…1860 74 6f 6d 61 74 69 63 61 6c 6c 79 20 69 66 20 74 68 65 20 73 69 67 6e 61 6c 20 64 65 6c 69 76 65 ┆tomatically if the signal delive┆ 0x1860…1880 72 79 0a 20 20 20 20 20 63 61 75 73 65 73 20 70 72 65 6d 61 74 75 72 65 20 74 65 72 6d 69 6e 61 ┆ry causes premature termina┆ 0x1880…18a0 74 69 6f 6e 2e 0a 0a 20 20 20 20 20 46 08 46 08 46 08 46 6f 08 6f 08 6f 08 6f 72 08 72 08 72 08 ┆tion. F F F Fo o o or r r ┆ 0x18a0…18c0 72 6b 08 6b 08 6b 08 6b 73 08 73 08 73 08 73 0a 20 20 20 20 20 54 68 65 20 66 69 6c 65 2d 6c 6f ┆rk k k ks s s s The file-lo┆ 0x18c0…18e0 63 6b 20 73 74 61 74 65 20 69 6e 20 74 68 65 20 70 61 72 65 6e 74 20 70 72 6f 63 65 73 73 20 64 ┆ck state in the parent process d┆ 0x18e0…1900 65 74 65 72 6d 69 6e 65 73 20 62 6f 74 68 0a 20 20 20 20 20 74 68 65 20 63 68 69 6c 64 27 73 20 ┆etermines both the child's ┆ 0x1900…1920 6c 6f 63 6b 20 73 74 61 74 65 20 61 6e 64 20 77 68 65 74 68 65 72 20 74 68 65 20 64 65 73 63 72 ┆lock state and whether the descr┆ […truncated at 200 lines…]