%!PS-Adobe-1.0 %%Creator: devps (Pipeline Associates, Inc.) %%CreationDate: Fri Sep 13 13:05:40 1996 %%Pages: (atend) %%DocumentFonts: (atend) /devps 180 dict def devps begin /res 10.000000 def /y_offset 843 def /X{exch}bind def /mm {transform round X round X itransform} bind def /r{rmoveto}bind def /m{moveto}bind def /l{lineto}bind def /rl{rlineto}bind def /st{stroke}bind def /gs{gsave}bind def /gr{grestore}bind def /cp{currentpoint}bind def /np{newpath}bind def /ct{curveto}bind def systemdict /setpacking known { /savepacking currentpacking def true setpacking } if /m0{0 0 moveto}bind def /xc{//res div}bind def /yc{//res neg div //y_offset add}bind def /lc{yc X xc X l st}bind def /mc{yc X xc X m}bind def /el{gs /a X def a div 1 X scale cp np a xc 2 div 0 360 arc st gr}bind def /ar{cp 7 2 roll np xc 5 1 roll atan 3 1 roll atan X arc st}bind def /sp{yc X xc X 6 2 roll yc X xc X 6 2 roll yc X xc X 6 2 roll ct}bind def /V{//res neg div //y_offset add currentpoint pop X m}bind def /H{//res div 0 transform X round X itransform pop currentpoint X pop moveto}bind def /h{//res div 0 r}bind def /v{//res neg div 0 X r}bind def /S{X H show}bind def /A{H //res div 1 index stringwidth pop sub 1 index length div 0 3 2 roll ashow}bind def /psize 10 def /height 0 def /cheight { height 0 ne { height } { psize } ifelse } bind def /slant 0 def /FF{findfont X dup 30 div 0 mm pop setlinewidth /psize X def [psize 0 cheight slant sin slant cos div mul cheight 0 0] makefont setfont}bind def /shade{gs /dy X def /dx X def np m 0 /dy rl /dx 0 rl 0 /dy neg rl /dx neg 0 rl closepath .9 setgray fill gr}bind def 1 setlinecap /resolution res 72 mul def /startFig { /SavedState save def userdict maxlength dict begin currentpoint transform DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix itransform moveto /ury exch def /urx exch def /lly exch def /llx exch def /y exch 72 mul resolution div def /x exch 72 mul resolution div def currentpoint /cy exch def /cx exch def /sx x urx llx sub div def /sy y ury lly sub div def sx sy scale cx sx div llx sub cy sy div ury sub translate /DefFigCTM matrix currentmatrix def /initmatrix { DefFigCTM setmatrix } def /defaultmatrix { DefFigCTM exch copy } def /initgraphics { DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix DefFigCTM setmatrix } def /showpage { initgraphics } def }bind def /clipFig { currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll exch lineto exch lineto exch lineto closepath clip newpath moveto }bind def /doclip { llx lly urx ury clipFig } def /endFig { end SavedState restore }bind def /globalstart { fontnum psize slant height resolution currentpoint pagesave restore gsave }bind def /globalend { grestore moveto /resolution exch def /height exch def /slant exch def /psize exch def /fontnum exch def F /pagesave save def }bind def /fontnum 1 def systemdict /setpacking known { savepacking setpacking} if end /BP{ save mark devps begin m0 /DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecap currentlinejoin currentdash currentgray currentmiterlimit ] cvx def }bind def /EP{ end cleartomark restore showpage}def /Encoding-1 256 array def 0 1 255 {Encoding-1 exch /.notdef put} for Encoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-B Encoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-b Encoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accents Encoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessi Encoding-1 dup 8#41 /copyright put dup 8#42 /registered put dup 8#43 /trademark put dup 8#44 /logicalnot put dup 8#45 /Eth put dup 8#46 /eth put dup 8#47 /Thorn put dup 8#50 /thorn put dup 8#51 /brokenbar put dup 8#52 /degree put dup 8#53 /divide put dup 8#54 /multiply put dup 8#55 /minus put dup 8#56 /onehalf put dup 8#57 /onequarter put dup 8#60 /threequarters put dup 8#101 /Aacute put dup 8#102 /Acircumflex put dup 8#103 /Adieresis put dup 8#104 /Agrave put dup 8#105 /Aring put dup 8#106 /Atilde put dup 8#107 /Ccedilla put dup 8#110 /Eacute put dup 8#111 /Ecircumflex put dup 8#112 /Edieresis put dup 8#113 /Egrave put dup 8#114 /Iacute put dup 8#115 /Icircumflex put dup 8#116 /Idieresis put dup 8#117 /Igrave put dup 8#120 /Ntilde put dup 8#121 /Oacute put dup 8#122 /Ocircumflex put dup 8#123 /Odieresis put dup 8#124 /Ograve put dup 8#125 /Otilde put dup 8#126 /Scaron put dup 8#127 /Uacute put dup 8#130 /Ucircumflex put dup 8#131 /Udieresis put dup 8#132 /Ugrave put dup 8#133 /Ydieresis put dup 8#134 /Zcaron put dup 8#135 /aacute put dup 8#136 /acircumflex put dup 8#137 /adieresis put dup 8#140 /agrave put dup 8#141 /aring put dup 8#142 /atilde put dup 8#143 /ccedilla put dup 8#144 /eacute put dup 8#145 /ecircumflex put dup 8#146 /edieresis put dup 8#147 /egrave put dup 8#150 /iacute put dup 8#151 /icircumflex put dup 8#152 /idieresis put dup 8#153 /igrave put dup 8#154 /ntilde put dup 8#155 /oacute put dup 8#156 /ocircumflex put dup 8#157 /odieresis put dup 8#160 /ograve put dup 8#161 /otilde put dup 8#162 /scaron put dup 8#163 /uacute put dup 8#164 /ucircumflex put dup 8#165 /udieresis put dup 8#166 /ugrave put dup 8#167 /ydieresis put dup 8#170 /zcaron put pop /Enc-dict 30 dict def Enc-dict /tmpstr1 50 string put Enc-dict /tmpstr2 50 string put Enc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put /AEnc-def { % arguments: the original font's name, encoding nr Enc-dict begin tmpstr2 cvs /Enc-no exch def % Remember the number in a string dup /OrigName exch def % remember the name findfont dup maxlength dict /newdict exch def % get dictionary for new font { exch dup /FID ne { exch newdict 3 1 roll put } { pop pop } % Ignore FID ifelse } forall newdict begin /Encoding tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval cvn load def % Replace encoding currentdict /UniqueID known { /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueID end % newdict /FNlength OrigName tmpstr1 cvs length def % convert name, remember length FNlength 1 add Enc-no length add string dup 0 OrigName tmpstr1 cvs putinterval dup FNlength (-) putinterval dup FNlength 1 add Enc-no putinterval dup 0 tmpstr1 0 FNlength getinterval putinterval % Add old name cvn dup newdict /FontName 3 2 roll put newdict definefont end % Enc-dict } def /Times-Roman 1 AEnc-def pop /R-1{/Times-Roman-1 FF}def /R{/Times-Roman FF}def /B{/Times-Bold FF}def /I{/Times-Italic FF}def /Times-Bold 1 AEnc-def pop /B-1{/Times-Bold-1 FF}def %%EndProlog %%Page: 1 1 BP /slant 0 def /height 0 def 480 V 10 R 720(FCNTL)S 1048(\()S 1090(2)S 1148(\))S 2696(Eighth)S (Edition)296 2989 A 4799(FCNTL)S 5127(\()S 5169(2)S 5227(\))S 960 V 9 R 720(N)S 722(NA)S 790(AM)S 858(ME)S 940(E)S 1080 V 10 R 1080(fcntl)S 10 R-1 1290(-)S 10 R 1372(miscellaneous)S 1967(\256le)S 2121(descriptor)S 2549(control)S 2859(functions)S 1248 V 9 R 720(S)S 722(SY)S 774(YN)S 842(NO)S 910(OP)S 978(PS)S 1030(SI)S 1082(IS)S 1115(S)S 1368 V 10 B 1080(#include)S 1482()S 1608 V 1080(int)S 1236(fcntl\(int)S 10 I 1623(fd)S 10 B 1701(,)S 1764(int)S 1920(*)S 10 I 1970(cmd)S 10 B 2138(,)S 10 R 2201([)S 10 I 2235(data)S 10 R 2413(])S 10 B 2447(\))S 1776 V 9 R 720(D)S 722(DE)S 790(ES)S 848(SC)S 900(CR)S 962(RI)S 1024(IP)S 1057(PT)S 1109(TI)S 1167(IO)S 1200(ON)S 1268(N)S 1896 V 10 B 1080(Fcntl\(\))S 10 R 1406(performs)S 1803(several)S 2122(\256le)S 2284(descriptor)S 2720(related)S 3028(functions,)S 3461(like)S (duplicating)452 3646 A 4132(a)S 4211(\256le)S 4374(descriptor,)S (setting)268 4836 A 5138(the)S 2016 V 1080("close)S 1356(on)S 1483(exec")S 1736(attribute,)S 2124(etc.)S 2319(The)S 10 I 2503(fd)S 10 R 2608(argument)S 3015(is)S 3109(the)S 3259(\256le)S 3415(descriptor)S 3845(to)S 3950(operate)S 4274(on,)S 10 I 4426(cmd)S 10 R 4621(is)S 4715(the)S 4865(command)S 2136 V 1080(code)S 1299(of)S 1412(the)S 1564(operation)S 1973(to)S 2080(perform,)S 2460(and)S 10 I 2635(data)S 10 R 2843(is)S 2940(an)S 3065(optional)S 3424(argument)S 3834(to)S 3942(give)S 4145(or)S (receive)292 4259 A 4581(parameters.)S 5104(The)S 2256 V 1080(command)S 1501(codes)S 1755(and)S 1925(other)S 2157(symbols)S 2516(and)S 2686(types)S 2923(are)S 3072(declared)S 3439(in)S 3542(.)S 3991(The)S 4173(commands)S 4633(are:)S 2424 V 10 B 1080(fcntl\()S 10 I 1311(fd)S 10 B 1397(,)S 1447(F_DUPFD,)S 1952(int)S 10 I 2095(fd2)S 10 B 2231(\))S 2544 V 10 R 1440(Returns)S 1788(a)S 1868(new)S 2071(\256le)S 2235(descriptor)S 2673(that)S 2859(is)S 2962(a)S (duplicate)369 3043 A 3448(of)S 3568(\256le)S 3733(descriptor)S 10 I 4172(fd)S 10 R 4258(.)S 4344(It)S 4442(shares)S 4730(the)S 4889(same)S 5132(\256le)S 2664 V 1440(pointer)S 1753(and)S 1926(the)S 2077(same)S 2312(\256le)S 2469(status)S 2726(\257ags,)S 2969(but)S 3125(has)S 3287(separate)S 3646(\256le)S 3802(descriptor)S 4232(\257ags)S 4449(that)S 4627(are)S (initially)313 4778 A 5118(off.)S 2784 V 1440(The)S 1624(value)S 1869(of)S 1980(the)S (duplicate)369 2130 A 2526(\256le)S 2682(descriptor)S 3112(is)S 3206(the)S 3356(\256rst)S 3541(free)S 3727(\256le)S 3884(descriptor)S 4315(greater)S 4624(than)S 4825(or)S 4937(equal)S 5183(to)S 2904 V 10 I 1440(fd2)S 10 R 1576(.)S 3072 V 10 B 1080(fcntl\()S 10 I 1311(fd)S 10 B 1397(,)S 1447(F_GETFD\))S 3192 V 10 R 1440(Returns)S 1783(the)S 1936(\256le)S 2095(descriptor)S 2528(\257ags)S 2748(associated)S 3193(with)S 3403(\256le)S 3563(descriptor)S 10 I 3997(fd)S 10 R 4083(.)S 4164(The)S 4352(\257ags)S 4573(are)S 4728(the)S 4882("close)S 5161(on)S 3312 V 1440(exec")S 1705(\257ag)S 10 B 1895(FD_CLOEXEC)S 10 R 2617(that,)S 2832(when)S 3089(set,)S 3265(causes)S 3567(the)S 3729(\256le)S 3897(descriptor)S 4338(to)S 4454(be)S 4587(closed)S 4882(when)S 5138(the)S 3432 V 1440(process)S 1780(executes)S 2165(another)S 2505(program.)S 2935(The)S 3131(Minix-vmd)S 3627(speci\256c)S 10 B (FD_ASYNCHIO)728 3974 A 10 R 4741(\257ag)S 4931(marks)S 5216(a)S 3552 V 1440(\256le)S 1594(descriptor)S 2022(for)S (asynchronous)552 2165 A 2742(I/O)S 2902(operation.)S 3720 V 10 B 1080(fcntl\()S 10 I 1311(fd)S 10 B 1397(,)S 1447(F_SETFD,)S 1934(int)S 10 I (\257ags)189 2077 A 10 B 2274(\))S 3840 V 10 R 1440(Set)S 1594(the)S 1742(\256le)S 1896(descriptor)S 2324(\257ags)S 2539(of)S 10 I 2648(fd)S 10 R 2751(to)S 10 I (\257ags)189 2854 A 10 R 3051(.)S 4008 V 10 B 1080(fcntl\()S 10 I 1311(fd)S 10 B 1397(,)S 1447(F_GETFL\))S 4128 V 10 R 1440(Return)S 1748(the)S 1905(\256le)S 2068(status)S 2331(\257ags)S 2555(and)S 2734(\256le)S (access)258 2897 A 3189(modes)S 3485(associated)S 3933(with)S 4147(the)S 4305(\256le)S 4469(associated)S 4918(with)S 5132(\256le)S 4248 V 1440(descriptor)S 10 I 1873(fd)S 10 R 1959(.)S 2039(The)S 2226(\256le)S 2384(status)S 2642(\257ags)S 2861(are)S 10 B 3014(O_NONBLOCK)S 10 R (\(non)184 3758 A 3971(blocking)S 4351(I/O\))S 4549(and)S 10 B 4723(O_APPEND)S 4368 V 10 R 1440(\(append)S 1798(mode\).)S 2139(The)S 2331(\256le)S (access)258 2495 A 2788(modes)S 3085(are)S 10 B 3244(O_RDONLY)S 10 R 3844(\(read-only\),)S 10 B 4358(O_WRONLY)S 10 R 4985(\(write-)S 4488 V 1440(only\))S 1702(and)S 10 B 1896(O_RDWR)S 10 R 2392(\(read-write\).)S 2975(These)S 3265(\257ags)S 3504(are)S 3677(also)S 3888(used)S 4121(in)S 4248(the)S (second)279 4420 A 4748(argument)S 5177(of)S 4608 V 10 B 1440(open)S 10 R 1647(\(2\).)S 4776 V 10 B 1080(fcntl\()S 10 I 1311(fd)S 10 B 1397(,)S 1447(F_SETFL,)S 1928(int)S 10 I (\257ags)189 2071 A 10 B 2268(\))S 4896 V 10 R 1440(Set)S 1615(the)S 1784(\256le)S 1959(status)S 2234(\257ags)S 2470(of)S 2600(the)S 2769(\256le)S 2944(referenced)S 3417(by)S 10 I 3563(fd)S 10 R 3687(to)S 10 I (\257ags)189 3812 A 10 R 4009(.)S 4106(Only)S 10 B 4354(O_NONBLOCK)S 10 R 5116(and)S 5016 V 10 B 1440(O_APPEND)S 10 R 2003(may)S 2201(be)S 2321(changed.)S (Access)286 2731 A 3042(mode)S 3290(\257ags)S 3505(are)S (ignored.)332 3654 A 5184 V 1080(The)S 1262(next)S 1460(four)S 1653(commands)S 2113(use)S 2272(a)S 2342(parameter)S 2771(of)S 2880(type)S 10 B 3078(struct)S 3356(\257ock)S 10 R 3588(that)S 3764(is)S 3856(de\256ned)S 4177(in)S 4280()S 4679(as:)S 5352 V 1440(struct)S 1689(\257ock)S 1915({)S 5472 V 1640(short)S 2040(l_type;)S 2640(/*)S 2743(F_RDLCK,)S 3241(F_WRLCK,)S 3761(or)S 3870(F_UNLCK)S 4349(*/)S 5592 V 1640(short)S 2040(l_whence;)S 2640(/*)S 2743(SEEK_SET,)S 3276(SEEK_CUR,)S 3836(or)S 3945(SEEK_END)S 4481(*/)S 5712 V 1640(off_t)S 2040(l_start;)S 2640(/*)S 2743(byte)S 2941(offset)S 3196(to)S 3299(start)S 3498(of)S 3607(segment)S 3967(*/)S 5832 V 1640(off_t)S 2040(l_len;)S 2640(/*)S 2743(length)S 3019(of)S 3128(segment)S 3488(*/)S 5952 V 1640(pid_t)S 2040(l_pid;)S 2640(/*)S 2743(process)S 3070(id)S 3173(of)S 3282(the)S 3430(locks')S 3701(owner)S 3978(*/)S 6072 V 1440(};)S 6240 V 1080(This)S 1294(structure)S 1682(describes)S 2092(a)S 2172(segment)S 2542(of)S 2661(a)S 2741(\256le.)S 10 B 2955(L_type)S 10 R 3292(is)S 3394(the)S 3552(lock)S 3761(operation)S 4177(performed)S 4633(on)S 4769(the)S 4928(\256le)S 5093(seg-)S 6360 V 1080(ment:)S 10 B 1336(F_RDLCK)S 10 R 1839(to)S 1944(set)S 2083(a)S 2155(read)S 2356(lock,)S 10 B 2581(F_WRLCK)S 10 R 3111(to)S 3216(set)S 3355(a)S 3427(write)S 3662(lock,)S 3887(and)S 10 B 4058(F_UNLCK)S 10 R 4560(to)S 4664(remove)S 4992(a)S 5063(lock.)S 6480 V 1080(Several)S 1421(processes)S 1845(may)S 2056(have)S 2284(a)S 2368(read)S 2581(lock)S 2793(on)S 2932(a)S 3016(segment,)S 3415(but)S 3582(only)S 3799(one)S 3983(process)S 4324(can)S 4503(have)S 4732(a)S 4816(write)S 5063(lock.)S 6600 V 10 B 1080(L_whence)S 10 R 1555(tells)S 1761(if)S 1861(the)S 10 B 2022(l_start)S 10 R 2340(offset)S 2608(must)S 2841(be)S 2974(interpreted)S 3449(from)S 3682(the)S 3842(start)S 4053(of)S 4174(the)S 4334(\256le)S 4500(\()S 10 B 4534(SEEK_SET)S 10 R 5042(\),)S 5138(the)S 6720 V 1080(current)S 1393(\256le)S (position)323 1549 A 1899(\()S 10 B (SEEK_CUR)537 1933 A 10 R 2470(\),)S 2556(or)S 2667(the)S 2817(end)S 2989(of)S 3100(the)S 3250(\256le)S 3406(\()S 10 B 3440(SEEK_END)S 10 R 3971(\).)S 4082(This)S 4288(is)S (analogous)407 4382 A 4816(to)S 4921(the)S 5071(third)S 6840 V 1080(parameter)S 1525(of)S 10 B 1650(lseek)S 10 R 1863(\(2\).)S 2072(These)S 10 B 2354(SEEK_*)S 10 R 2763(symbols)S 3138(are)S 3303(declared)S 3686(in)S 3805(.)S 10 B 4330(L_start)S 10 R 4689(is)S 4796(the)S 4959(starting)S 6960 V 1080(offset)S 1338(of)S 1450(the)S 1601(segment)S 1964(of)S 2076(the)S 2227(\256le.)S 10 B 2434(L_end)S 10 R 2736(is)S 2831(the)S 2982(length)S 3261(of)S 3373(the)S 3524(segment.)S 3937(If)S 4033(zero)S 4236(then)S 4438(the)S 4590(segment)S 4954(extends)S 7080 V (until)184 1080 A 1296(end)S 1473(of)S 1589(\256le.)S 10 B 1800(L_pid)S 10 R 2089(is)S 2187(the)S 2341(process-id)S 2786(of)S 2901(the)S 3055(process)S 3388(currently)S 3783(holding)S 4120(a)S 4196(lock)S 4400(on)S 4531(the)S 4685(segment.)S 5101(It)S 5194(is)S 7200 V 1080(returned)S 1441(by)S 10 B (F_GETLK)469 1566 A 10 R 2035(.)S 7368 V 10 B 1080(fcntl\()S 10 I 1311(fd)S 10 B 1397(,)S (F_GETLK,)494 1447 A 1966(struct)S 2244(\257ock)S 2476(*)S 10 I 2526(lkp)S 10 B 2657(\))S 7488 V 10 R 1440(Find)S 1652(out)S 1808(if)S 1898(some)S 2138(other)S 2373(process)S 2703(has)S 2865(a)S 2938(lock)S 3139(on)S 3267(a)S 3341(segment)S 3705(of)S 3818(the)S 3970(\256le)S 4128(associated)S 4571(by)S 4700(\256le)S 4858(descriptor)S 7903 V 720(Page)S 941(1)S 4455(September)S 4911(13,)S (1996)200 5061 A 8143 V EP %%Page: 2 2 BP /slant 0 def /height 0 def 480 V 10 R 720(FCNTL)S 1048(\()S 1090(2)S 1148(\))S 2696(Eighth)S (Edition)296 2989 A 4799(FCNTL)S 5127(\()S 5169(2)S 5227(\))S 960 V 10 I 1440(fd)S 10 R 1544(that)S 1720(overlaps)S 2086(with)S 2290(the)S 2438(segment)S 2798(described)S 3209(by)S 3334(the)S 10 B 3482(\257ock)S 10 R 3714(structure)S 4092(pointed)S 4418(to)S 4521(by)S 10 I 4646(lkp)S 10 R 4777(.)S 4852(If)S 4945(the)S 5093(seg-)S 1080 V 1440(ment)S 1672(is)S 1770(not)S 1929(locked)S 2228(then)S 10 B 2432(l_type)S 10 R 2726(is)S 2824(set)S 2967(to)S 10 B 3076(F_UNLCK)S 10 R 3552(.)S 3633(Otherwise)S 4079(an)S 10 B 4205(\257ock)S 10 R 4443(structure)S 4827(is)S 4925(returned)S 1200 V (through)312 1440 A 10 I 1778(lkp)S 10 R 1927(that)S 2104(describes)S 2505(the)S 2654(lock)S 2853(held)S 3052(by)S 3178(the)S 3326(other)S 3558(process.)S 10 B 3935(L_start)S 10 R 4279(is)S 4371(set)S 4508(relative)S 4836(to)S 4939(the)S 5087(start)S 1320 V 1440(of)S 1549(the)S 1697(\256le.)S 1488 V 10 B 1080(fcntl\()S 10 I 1311(fd)S 10 B 1397(,)S (F_SETLK,)472 1447 A 1944(struct)S 2222(\257ock)S 2454(*)S 10 I 2504(lkp)S 10 B 2635(\))S 1608 V 10 R 1440(Register)S 1805(a)S 1879(lock)S 2081(on)S 2210(a)S 2284(segment)S 2648(of)S 2761(the)S 2913(\256le)S 3072(associated)S 3516(with)S 3725(\256le)S 3884(descriptor)S 10 I 4317(fd)S 10 R 4403(.)S 4483(The)S 4670(\256le)S 4829(segment)S 5194(is)S 1728 V 1440(described)S 1861(by)S 1996(the)S 10 B 2154(struct)S 2442(\257ock)S 10 R 2684(pointed)S 3020(to)S 3133(by)S 10 I 3268(lkp)S 10 R 3399(.)S 3484(This)S 3698(call)S 3879(returns)S 4194(an)S 4323(error)S 4554(if)S 4650(any)S 4829(part)S 5020(of)S 5138(the)S 1848 V 1440(segment)S 1800(is)S 1892(already)S 2214(locked.)S 2016 V 10 B 1080(fcntl\()S 10 I 1311(fd)S 10 B 1397(,)S (F_SETLKW,)572 1447 A 2044(struct)S 2322(\257ock)S 2554(*)S 10 I 2604(lkp)S 10 B 2735(\))S 2136 V 10 R 1440(Register)S 1805(a)S 1879(lock)S 2081(on)S 2210(a)S 2284(segment)S 2648(of)S 2761(the)S 2913(\256le)S 3072(associated)S 3516(with)S 3725(\256le)S 3884(descriptor)S 10 I 4317(fd)S 10 R 4403(.)S 4483(The)S 4670(\256le)S 4829(segment)S 5194(is)S 2256 V 1440(described)S 1863(by)S 2000(the)S 10 B 2160(struct)S 2450(\257ock)S 10 R 2693(pointed)S 3030(to)S 3144(by)S 10 I 3280(lkp)S 10 R 3411(.)S 3497(This)S 3712(call)S 3894(blocks)S (waiting)302 4192 A 4530(for)S 4684(the)S 4843(lock)S 5052(to)S 5166(be)S 2376 V 1440(released)S 1796(if)S 1883(any)S 2053(part)S 2235(of)S 2344(the)S 2492(segment)S 2852(is)S 2944(already)S 3266(locked.)S 2544 V 10 B 1080(fcntl\()S 10 I 1311(fd)S 10 B 1397(,)S 1447(F_FREESP,)S 1996(struct)S 2274(\257ock)S 2506(*)S 10 I 2556(lkp)S 10 B 2687(\))S 2664 V 10 R 1440(Free)S 1650(a)S 1725(segment)S 2090(of)S 2204(disk)S (space)224 2401 A 2655(occupied)S 3048(by)S 3178(the)S 3331(\256le)S 3490(associated)S 3934(with)S 4144(\256le)S 4304(descriptor)S 10 I 4738(fd)S 10 R 4824(.)S 4905(The)S 5093(seg-)S 2784 V 1440(ment)S 1673(is)S 1772(described)S 2190(by)S 2322(the)S 10 B 2477(struct)S 2762(\257ock)S 10 R 3001(pointed)S 3334(to)S 3443(by)S 10 I 3574(lkp)S 10 R 3705(.)S 3786(The)S 3974(\256le)S 4134(is)S 4232(truncated)S 4638(in)S 4747(length)S 5029(to)S 5138(the)S 2904 V 1440(byte)S (position)323 1648 A 2006(indicated)S 2410(by)S 10 B 2545(l_start)S 10 R 2860(if)S 10 B 2957(l_len)S 10 R 3199(is)S 3301(zero.)S 3560(If)S 10 B 3663(l_len)S 10 R 3905(is)S (nonzero)324 4008 A 4368(then)S 4577(the)S 4736(\256le)S 4901(keeps)S 5166(its)S 3024 V 1440(size,)S 1657(but)S 1820(the)S 1978(freed)S 2221(bytes)S 2467(now)S 2674(read)S 2882(as)S 3000(zeros.)S 3297(\(Other)S 3595(than)S 3802(sharing)S 4132(the)S 4289(\257ock)S 4524(structure,)S 4936(this)S 5115(call)S 3144 V 1440(has)S 1599(nothing)S 1930(to)S 2033(do)S 2158(with)S 2362(locking.\))S 3312 V 10 B 1080(fcntl\()S 10 I 1311(fd)S 10 B 1397(,)S 1447(F_SEEK,)S (u64_t)240 1877 A 10 I 2142(pos)S 10 B 2289(\))S 3432 V 10 R 1440(This)S 1650(Minix-vmd)S 2138(speci\256c)S 2477(call)S 2654(sets)S 2836(the)S 2990(\256le)S (position)323 3150 A 3504(of)S 3619(the)S 3773(\256le)S 3933(associated)S 4378(with)S 4588(\256le)S 4748(descriptor)S 10 I 5183(fd)S 3552 V 10 R 1440(to)S 1543(the)S 1691(byte)S 1889(offset)S 2144(indicated)S 2538(by)S 2663(the)S 2811(64-bit)S 3076(number)S 10 I 3408(pos)S 10 R 3555(.)S 3630(This)S 3834(is)S (analogous)407 3926 A 4358(to)S 4461(the)S 4609(call)S 3720 V 10 B 1800(lseek\()S 10 I 2047(fd)S 10 B 2133(,)S 10 I 2183(pos)S 10 B 2330(,)S 2380(SEEK_SET\))S 3888 V 10 R 1440(except)S 1728(that)S 10 B 1904(F_SEEK)S 10 R 2309(can)S 2474(be)S 2594(used)S 2803(on)S 2928(devices)S 3255(larger)S 3516(than)S 3714(4)S 3789(gigabyte.)S 4056 V 9 R 720(S)S 722(SE)S 774(EE)S 832(E)S 913(A)S 915(AL)S 983(LS)S 1041(SO)S 1093(O)S 4176 V 10 B 1080(open)S 10 R 1287(\(2\),)S 10 B (dup)168 1455 A 10 R 1623(\(2\),)S 10 B 1791(lseek)S 10 R 2004(\(2\),)S 10 B 2172(ftruncate)S 10 R 2571(\(3\),)S 10 B 2739(int64)S 10 R 2957(\(3\).)S 4344 V 9 R 720(D)S 722(DI)S 790(IA)S 823(AG)S 891(GN)S 959(NO)S 1027(OS)S 1095(ST)S 1147(TI)S 1205(IC)S 1238(CS)S 1300(S)S 4464 V 10 B 1080(Fcntl)S 10 R 1331(returns)S 1637(a)S 1709(\256le)S 1865(descriptor,)S 2320(\257ags,)S 2562(or)S 10 B 2673(0)S 10 R 2750(to)S 2855(indicate)S (success.)327 3201 A 3580(On)S 3730(error)S 10 B-1 3954(-)S 10 B 4011(1)S 10 R 4088(is)S 4182(returned,)S 4570(with)S 10 B (errno)241 4776 A 10 R 5044(set)S 5183(to)S 4584 V 1080(the)S 1228(appropriate)S 1712(error)S 1934(code.)S 2199(The)S 2381(most)S 2601(notable)S 2922(errors)S 3183(are:)S 4752 V 10 B 1080(EINTR)S 4872 V 10 R 1330(If)S 1423(a)S 1493(blocked)S 10 B (F_SETLKW)547 1836 A 10 R 2408(operation)S 2813(is)S 2905(interrupted)S 3372(by)S 3497(a)S 3567(signal)S 3832(that)S 4008(is)S (caught.)293 4100 A 5040 V 10 B 1080(EAGAIN)S 5160 V 10 R 1330(By)S 10 B (F_SETLK)447 1472 A 10 R 1944(if)S 2031(a)S 2101(segment)S (cannot)268 2461 A 2754(be)S 2874(locked.)S 5328 V 10 B 1080(EBADF)S 5448 V 10 R 1330(A)S 1433(bad)S 1609(\256le)S 1769(descriptor)S 2203(in)S 2312(general,)S 2665(or)S 2780(an)S 2906(attempt)S 3239(to)S (place)213 3348 A 3592(a)S 3668(write)S 3907(lock)S 4111(on)S 4242(a)S 4318(\256le)S 4478(that)S 4660(is)S 4758(not)S 4917(open)S 5143(for)S 5568 V (writing,)316 1330 A 1671(etc.)S 5736 V 10 B 1080(ENOLCK)S 5856 V 10 R 1330(No)S 1478(locks)S 1715(available,)S 2129(the)S 2277(\256le)S 2431(system)S 2735(code)S 2950(has)S 3109(run)S 3268(out)S 3421(of)S 3530(internal)S 3863(table)S (space.)249 4084 A 6024 V 9 R 720(A)S 722(AU)S 790(UT)S 858(TH)S 916(HO)S 984(OR)S 1052(R)S 6144 V 10 R 1080(Kees)S 1307(J.)S 1396(Bot)S 1566(\(kjb@cs.vu.nl\))S 7903 V 720(September)S 1176(13,)S (1996)200 1326 A 4990(Page)S 5211(2)S 8143 V EP %%Trailer %%DocumentFonts: Times-Roman Times-Bold Times-Italic %%Pages: 2