Deleted Added
full compact
1.2.t (1639) 1.2.t (18715)
1.\" Copyright (c) 1983, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)1.2.t 8.1 (Berkeley) 6/8/93
1.\" Copyright (c) 1983, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 16 unchanged lines hidden (view full) ---

25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)1.2.t 8.1 (Berkeley) 6/8/93
33.\" $Id$
33.\"
34.sh "Memory management\(dg
35.NH 3
36Text, data and stack
37.PP
38.FS
39\(dg This section represents the interface planned for later
40releases of the system. Of the calls described in this section,

--- 187 unchanged lines hidden (view full) ---

228PROT_READ and PROT_WRITE.
229The MAP_HASSEMAPHORE flag must have been specified when the region was created.
230To acquire a lock a process calls:
231.DS
232value = mset(sem, wait)
233result int value; semaphore *sem; int wait;
234.DE
235\fIMset\fP indivisibly tests and sets the semaphore \fIsem\fP.
34.\"
35.sh "Memory management\(dg
36.NH 3
37Text, data and stack
38.PP
39.FS
40\(dg This section represents the interface planned for later
41releases of the system. Of the calls described in this section,

--- 187 unchanged lines hidden (view full) ---

229PROT_READ and PROT_WRITE.
230The MAP_HASSEMAPHORE flag must have been specified when the region was created.
231To acquire a lock a process calls:
232.DS
233value = mset(sem, wait)
234result int value; semaphore *sem; int wait;
235.DE
236\fIMset\fP indivisibly tests and sets the semaphore \fIsem\fP.
236If the the previous value is zero, the process has acquired the lock
237If the previous value is zero, the process has acquired the lock
237and \fImset\fP returns true immediately.
238Otherwise, if the \fIwait\fP flag is zero,
239failure is returned.
240If \fIwait\fP is true and the previous value is non-zero,
241\fImset\fP relinquishes the processor until notified that it should retry.
242.LP
243To release a lock a process calls:
244.DS

--- 28 unchanged lines hidden ---
238and \fImset\fP returns true immediately.
239Otherwise, if the \fIwait\fP flag is zero,
240failure is returned.
241If \fIwait\fP is true and the previous value is non-zero,
242\fImset\fP relinquishes the processor until notified that it should retry.
243.LP
244To release a lock a process calls:
245.DS

--- 28 unchanged lines hidden ---