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