Mon Jun 7 07:39:43 2010 UTC ()
Remove some leftover .\" comments.

The sysctl variables will be described in sysctl(7).


(jruoho)
diff -r1.1 -r1.2 src/lib/librt/mq.3

cvs diff -r1.1 -r1.2 src/lib/librt/mq.3 (expand / switch to unified diff)

--- src/lib/librt/mq.3 2010/06/07 07:11:28 1.1
+++ src/lib/librt/mq.3 2010/06/07 07:39:43 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: mq.3,v 1.1 2010/06/07 07:11:28 jruoho Exp $ 1.\" $NetBSD: mq.3,v 1.2 2010/06/07 07:39:43 jruoho Exp $
2.\" 2.\"
3.\" Copyright (c) 2010 Jukka Ruohonen <jruohonen@iki.fi> 3.\" Copyright (c) 2010 Jukka Ruohonen <jruohonen@iki.fi>
4.\" 4.\"
5.\" Redistribution and use in source and binary forms, with or without 5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions 6.\" modification, are permitted provided that the following conditions
7.\" are met: 7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright 8.\" 1. Redistributions of source code must retain the above copyright
9.\" notice, this list of conditions and the following disclaimer. 9.\" notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\" notice, this list of conditions and the following disclaimer in the 11.\" notice, this list of conditions and the following disclaimer in the
12.\" documentation and/or other materials provided with the distribution. 12.\" documentation and/or other materials provided with the distribution.
13.\" 13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 14.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
@@ -216,29 +216,26 @@ an error is returned if a message larger @@ -216,29 +216,26 @@ an error is returned if a message larger
216.Va mq_msgsize 216.Va mq_msgsize
217is sent, and if the message queue is already full, as determined by 217is sent, and if the message queue is already full, as determined by
218.Va mq_maxmsg , 218.Va mq_maxmsg ,
219the call to queue a message will either block or error out. 219the call to queue a message will either block or error out.
220.Pp 220.Pp
221Although there are two functions, 221Although there are two functions,
222.Fn mq_getattr 222.Fn mq_getattr
223and 223and
224.Fn mq_setattr , 224.Fn mq_setattr ,
225to retrieve and set attributes once 225to retrieve and set attributes once
226the message queue has been created, 226the message queue has been created,
227the resource limits cannot be changed 227the resource limits cannot be changed
228by an user once the queue has been created. 228by an user once the queue has been created.
229.\" The super user can however control the limits via few 
230.\" .Xr sysctl 7 
231.\" variables. 
232To avoid blocking in case the maximum number of messages has been reached, the 229To avoid blocking in case the maximum number of messages has been reached, the
233.Dv O_NONBLOCK 230.Dv O_NONBLOCK
234flag can be set as an argument to 231flag can be set as an argument to
235.Fn mq_open . 232.Fn mq_open .
236.Ss Asynchronous Notification 233.Ss Asynchronous Notification
237Instead of blocking in the functions that receive messages, 234Instead of blocking in the functions that receive messages,
238.Nm 235.Nm
239offers an asynchronous mechanism for a process to receive 236offers an asynchronous mechanism for a process to receive
240notifications that messages are available in the message queue. 237notifications that messages are available in the message queue.
241The function 238The function
242.Fn mq_notify 239.Fn mq_notify
243is used to register for notification. 240is used to register for notification.
244Either a signal or a thread can be used as the type of notification; see 241Either a signal or a thread can be used as the type of notification; see
@@ -281,81 +278,42 @@ principle. @@ -281,81 +278,42 @@ principle.
281.Pp 278.Pp
282The basic rule of thumb with realtime prioritization is that low priority 279The basic rule of thumb with realtime prioritization is that low priority
283tasks should never unnecessarily delay high priority tasks. 280tasks should never unnecessarily delay high priority tasks.
284Priority inheritance is not however part of the provided 281Priority inheritance is not however part of the provided
285.Tn API . 282.Tn API .
286The receiver process may run at low priority even 283The receiver process may run at low priority even
287when receiving high priority messages. 284when receiving high priority messages.
288To address this limitation and other potential realtime problems, 285To address this limitation and other potential realtime problems,
289the user may consider other functions from the 286the user may consider other functions from the
290.Lb librt . 287.Lb librt .
291The process scheduling interface described in 288The process scheduling interface described in
292.Xr sched 3 289.Xr sched 3
293can be mentioned as an example. 290can be mentioned as an example.
294.\" 
295.\" XXX: Move this to sysctl(7). 
296.\" 
297.\" .Sh SYSCTL 
298.\" The 
299.\" .Nx 
300.\" implementation defines few 
301.\" .Xr sysctl 8 
302.\" variables available for the superuser. 
303.\" .Bl -tag -width "kern.mq_max_msgsize "-offset indent 
304.\" .It kern.posix_msg 
305.\" The version of the 
306.\" .Tn POSIX 
307.\" standard to which the system attempts 
308.\" to conform with respect to the message queues. 
309.\" .It kern.mq_open_max 
310.\" The maximum number of message queue descriptors 
311.\" that any process is able to open. 
312.\" .It kern.mq_prio_max 
313.\" The maximum priority of any message. 
314.\" .It kern.mq_max_msgsize 
315.\" The maximum size of any message. 
316.\" .It kern.mq_def_maxmsg 
317.\" The default number of messages in a message queue. 
318.\" .El 
319.Sh FUNCTIONS 291.Sh FUNCTIONS
320The following functions are available in the 292The following functions are available in the
321.Tn API. 293.Tn API.
322.Bl -column -offset indent "mq_timedreceive " "XXX" 294.Bl -column -offset indent "mq_timedreceive " "XXX"
323.It Sy Function Ta Sy Description 295.It Sy Function Ta Sy Description
324.It Xr mq_open 3 Ta open a message queue 296.It Xr mq_open 3 Ta open a message queue
325.It Xr mq_close 3 Ta close a message queue 297.It Xr mq_close 3 Ta close a message queue
326.It Xr mq_unlink 3 Ta remove a message queue 298.It Xr mq_unlink 3 Ta remove a message queue
327.It Xr mq_send 3 Ta send a message 299.It Xr mq_send 3 Ta send a message
328.It Xr mq_receive 3 Ta receive a message 300.It Xr mq_receive 3 Ta receive a message
329.It Xr mq_timedsend 3 Ta send a message with a timeout 301.It Xr mq_timedsend 3 Ta send a message with a timeout
330.It Xr mq_timedreceive 3 Ta receive a message with a timeout 302.It Xr mq_timedreceive 3 Ta receive a message with a timeout
331.It Xr mq_getattr 3 Ta get message queue attributes 303.It Xr mq_getattr 3 Ta get message queue attributes
332.It Xr mq_setattr 3 Ta set message queue attributes 304.It Xr mq_setattr 3 Ta set message queue attributes
333.It Xr mq_notify 3 Ta register asynchronous notify 305.It Xr mq_notify 3 Ta register asynchronous notify
334.El 306.El
335.\" 
336.\" XXX: Fill this with fileops? 
337.\" 
338.\" .In addition, the 
339.\" .Nx 
340.\" implementation allows the following standard 
341.\" .Tn I/O 
342.\" and file manipulation calls to be used with message queues: 
343.\" The following functions are available in the 
344.\" .Tn API. 
345.\" .Bl -column -offset indent "mq_timedreceive " "XXX" 
346.\" .It Sy Function Ta Sy Description 
347.\" .It Xr ... 
348.\" .El 
349.Sh COMPATIBILITY 307.Sh COMPATIBILITY
350Despite of some early fears, the 308Despite of some early fears, the
351.Tn POSIX 309.Tn POSIX
352message queue implementations are fairly compatible with each other. 310message queue implementations are fairly compatible with each other.
353Nevertheless, few points can be noted for portable applications. 311Nevertheless, few points can be noted for portable applications.
354.Bl -bullet 312.Bl -bullet
355.It 313.It
356It is not portable to use functions external to the 314It is not portable to use functions external to the
357.Tn API 315.Tn API
358with message queue descriptors. 316with message queue descriptors.
359.It 317.It
360The standard leaves the rules loose with 318The standard leaves the rules loose with
361respect to the message queue names. 319respect to the message queue names.