|
|
1.1 ! root 1: .TH PLOCK 2 ! 2: .SH NAME ! 3: plock \- lock process, text, or data in memory ! 4: .SH SYNOPSIS ! 5: .B #include <sys/lock.h> ! 6: .PP ! 7: .B int plock (op) ! 8: .br ! 9: .B int op; ! 10: .SH DESCRIPTION ! 11: .I Plock ! 12: allows the calling process to lock its text segment (text lock), ! 13: its data segment (data lock), or both its text and data segments (process lock) ! 14: into memory. ! 15: Locked segments are immune to all routine swapping. ! 16: .I Plock ! 17: also allows these segments to be unlocked. ! 18: The effective user \s-1ID\s+1 of the calling process must be super-user to ! 19: use this call. ! 20: .I Op ! 21: specifies the following: ! 22: .RS 8 ! 23: .TP 14 ! 24: .SM ! 25: .B PROCLOCK \- ! 26: lock text and data segments into memory (process lock) ! 27: .TP ! 28: .SM ! 29: .B TXTLOCK \- ! 30: lock text segment into memory (text lock) ! 31: .TP ! 32: .SM ! 33: .B DATLOCK \- ! 34: lock data segment into memory (data lock) ! 35: .TP ! 36: .SM ! 37: .B UNLOCK \- ! 38: remove locks ! 39: .RE ! 40: .PP ! 41: .I Plock ! 42: will fail and not perform the requested operation if one or more of ! 43: the following are true: ! 44: .TP 15 ! 45: .SM ! 46: \%[EPERM] ! 47: The effective user \s-1ID\s+1 of the calling process is not super-user. ! 48: .TP ! 49: .SM ! 50: \%[EINVAL] ! 51: .I Op ! 52: is equal to ! 53: .SM ! 54: .B PROCLOCK ! 55: and a process lock, a text lock, or a data lock already exists on the calling ! 56: process. ! 57: .TP ! 58: .SM ! 59: \%[EINVAL] ! 60: .I Op ! 61: is equal to ! 62: .SM ! 63: .B TXTLOCK ! 64: and a text lock, or a process lock already exists on the calling process. ! 65: .TP ! 66: .SM ! 67: \%[EINVAL] ! 68: .I Op ! 69: is equal to ! 70: .SM ! 71: .B DATLOCK ! 72: and a data lock, or a process lock already exists on the calling ! 73: process. ! 74: .TP ! 75: .SM ! 76: \%[EINVAL] ! 77: .I Op ! 78: is equal to ! 79: .SM ! 80: .B UNLOCK ! 81: and no type of lock exists on the calling process. ! 82: .SH RETURN VALUE ! 83: Upon successful completion, a value of 0 is returned to the calling process. ! 84: Otherwise, a value of \-1 is returned and ! 85: .I errno ! 86: is set to indicate the error. ! 87: .SH SEE ALSO ! 88: exec(2), exit(2), fork(2). ! 89: .\" @(#)plock.2 6.2 of 9/6/83
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.