[BACK]Return to mq_setattr.3 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / librt

Annotation of src/lib/librt/mq_setattr.3, Revision 1.3

1.3     ! njoly       1: .\"    $NetBSD: mq_setattr.3,v 1.2 2010/06/07 07:21:52 jruoho Exp $
1.1       rmind       2: .\"
                      3: .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
                      4: .\"
1.2       jruoho      5: .Dd June 7, 2010
1.1       rmind       6: .Dt MQ_SETATTR 3
                      7: .Os
                      8: .Sh NAME
                      9: .Nm mq_setattr
                     10: .Nd set message queue attributes (REALTIME)
                     11: .Sh LIBRARY
                     12: .Lb librt
                     13: .Sh SYNOPSIS
                     14: .In mqueue.h
                     15: .Ft int
                     16: .Fo mq_setattr
                     17: .Fa "mqd_t mqdes"
                     18: .Fa "const struct mq_attr *restrict mqstat"
                     19: .Fa "struct mq_attr *restrict omqstat"
                     20: .Fc
                     21: .Sh DESCRIPTION
                     22: The
                     23: .Fn mq_setattr
                     24: function sets attributes associated with the open message queue
                     25: description referenced by the message queue descriptor specified by
                     26: .Fa mqdes .
                     27: .Pp
                     28: The message queue attributes corresponding to the following members
                     29: defined in the
                     30: .Vt mq_attr
                     31: structure will be set to the specified values upon successful completion of
                     32: .Fn mq_setattr :
                     33: .Bl -tag -width mq_flags
                     34: .It Va mq_flags
                     35: The value of this member is the bitwise-logical OR of zero or more of
                     36: .Dv O_NONBLOCK
                     37: and any implementation-defined flags.
                     38: .El
                     39: .Pp
                     40: The values of the
                     41: .Va mq_maxmsg ,
                     42: .Va mq_msgsize ,
                     43: and
                     44: .Va mq_curmsgs
                     45: members of the
                     46: .Vt mq_attr
                     47: structure will be ignored by
                     48: .Fn mq_setattr .
                     49: .Pp
                     50: If
                     51: .Fa omqstat
                     52: is
                     53: .No non- Ns Dv NULL ,
                     54: the
                     55: .Fn mq_setattr
                     56: function will store, in the location referenced by
                     57: .Fa omqstat
                     58: the previous message queue attributes and the current queue status.
                     59: These values are the same as would be returned by a call to
                     60: .Xr mq_getattr 3
                     61: at that point.
                     62: .Sh RETURN VALUES
                     63: Upon successful completion, the
                     64: .Fn mq_setattr
                     65: function returns zero and the attributes of the message queue will
                     66: have been changed as specified.
                     67: Otherwise, the message queue attributes are unchanged,
                     68: and the function returns a value of
                     69: \-1 and sets the global variable
                     70: .Va errno
                     71: to indicate the error.
                     72: .Sh ERRORS
                     73: The
                     74: .Fn mq_setattr
                     75: function fails if:
                     76: .Bl -tag -width Er
                     77: .It Bq Er EBADF
                     78: The
                     79: .Fa mqdes
                     80: argument is not a valid message queue descriptor.
                     81: .El
                     82: .Sh SEE ALSO
1.2       jruoho     83: .Xr mq 3 ,
                     84: .Xr mq_getattr 3
1.1       rmind      85: .Sh STANDARDS
                     86: This function conforms to the
                     87: .St -p1003.1-2001
                     88: standard.
                     89: .Sh HISTORY
                     90: This function first appeared in
                     91: .Nx 5.0 .
                     92: .Sh COPYRIGHT
                     93: Portions of this text are reprinted and reproduced in electronic form
                     94: from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
                     95: -- Portable Operating System Interface (POSIX), The Open Group Base
                     96: Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
                     97: Electrical and Electronics Engineers, Inc and The Open Group.
                     98: In the
                     99: event of any discrepancy between this version and the original IEEE and
                    100: The Open Group Standard, the original IEEE and The Open Group Standard
                    101: is the referee document.
                    102: The original Standard can be obtained online at
1.3     ! njoly     103: .Lk http://www.opengroup.org/unix/online.html .

CVSweb <webmaster@jp.NetBSD.org>