1<assertions> 2 <assertion id="1" tag="ref:XSH6:{System Interfaces:mlock:DESCRIPTION}"> 3 The mlock() function shall cause those whole pages containing any part of 4 the address space of the process starting at address addr and continuing for 5 len bytes to be memory-resident until unlocked or until the process exits or 6 execs another process image 7 </assertion> 8 <assertion id="2" tag="ref:XSH6:{System Interfaces:mlock:DESCRIPTION}"> 9 The implementation may require that addr be a multiple of {PAGESIZE} 10 </assertion> 11 <assertion id="3" tag="ref:XSH6:{System Interfaces:mlock:DESCRIPTION}"> 12 Upon successful return from mlock(), pages in the specified range shall be 13 locked and memory-resident 14 </assertion> 15 <assertion id="4" tag="ref:XSH6:{System Interfaces:mlock:DESCRIPTION}"> 16 The appropriate privilege is required to lock process memory with mlock() 17 </assertion> 18 <assertion id="5" tag="ref:XSH6:{System Interfaces:mlock:RETURN VALUE}"> 19 Upon successful completion, the mlock() function shall return a value of 20 zero 21 </assertion> 22 <assertion id="6" tag="ref:XSH6:{System Interfaces:mlock:RETURN VALUE}"> 23 Upon unsuccessful completion, no change is made to any locks in the address 24 space of the process 25 </assertion> 26 <assertion id="7" tag="ref:XSH6:{System Interfaces:mlock:RETURN VALUE}"> 27 Upon unsuccessful completion, the function shall return a value of -1 28 </assertion> 29 <assertion id="8" tag="ref:XSH6:{System Interfaces:mlock:ERRORS}"> 30 The mlock() function shall set errno = ENOMEM if some or all of the address 31 range specified by the addr and len arguments does not correspond to valid 32 mapped pages in the address space of the process 33 </assertion> 34 <assertion id="9" tag="ref:XSH6:{System Interfaces:mlock:ERRORS}"> 35 The mlock() function shall set errno = EAGAIN if some or all of the memory 36 identified by the operation could not be locked when the call was made 37 </assertion> 38 <assertion id="10" tag="ref:XSH6:{System Interfaces:mlock:ERRORS}"> 39 The mlock() function may set errno = EINVAL if the addr argument is not a 40 multiple of {PAGESIZE} 41 </assertion> 42 <assertion id="11" tag="ref:XSH6:{System Interfaces:mlock:ERRORS}"> 43 The mlock() function may set errno = ENOMEM if locking the pages mapped by 44 the specified range would exceed an implementation-defined limit on the 45 amount of memory that the process may lock 46 </assertion> 47 <assertion id="12" tag="ref:XSH6:{System Interfaces:mlock:ERRORS}"> 48 The mlock() function may set errno = EPERM if the calling process does not 49 have the appropriate privilege to perform the requested operation 50 </assertion> 51</assertions> 52