]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man3/Q_IFRAWMASK.3
bhnd(9): Fix a few mandoc related issues
[FreeBSD/FreeBSD.git] / share / man / man3 / Q_IFRAWMASK.3
1 .\"
2 .\" Copyright (c) 2018 Netflix, Inc.
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions, and the following disclaimer,
10 .\"    without modification, immediately at the beginning of the file.
11 .\" 2. The name of the author may not be used to endorse or promote products
12 .\"    derived from this software without specific prior written permission.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
18 .\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd July 8, 2018
29 .Dt Q_IFRAWMASK 3
30 .Os
31 .Sh NAME
32 .Nm Q_IFRAWMASK ,
33 .Nm Q_IFVALIMASK ,
34 .Nm Q_IFVALFMASK ,
35 .Nm Q_GIFRAW ,
36 .Nm Q_GIFABSVAL ,
37 .Nm Q_GIFVAL ,
38 .Nm Q_SIFVAL ,
39 .Nm Q_SIFVALS
40 .Nd fixed-point math functions which manipulate the combined integer/fractional
41 data bits
42 .Sh SYNOPSIS
43 .In sys/qmath.h
44 .Ft ITYPE
45 .Fn Q_IFRAWMASK "QTYPE q"
46 .Ft ITYPE
47 .Fn Q_IFVALIMASK "QTYPE q"
48 .Ft ITYPE
49 .Fn Q_IFVALFMASK "QTYPE q"
50 .Ft ITYPE
51 .Fn Q_GIFRAW "QTYPE q"
52 .Ft ITYPE
53 .Fn Q_GIFABSVAL "QTYPE q"
54 .Ft ITYPE
55 .Fn Q_GIFVAL "QTYPE q"
56 .Ft QTYPE
57 .Fn Q_SIFVAL "QTYPE q" "ITYPE ifv"
58 .Ft QTYPE
59 .Fn Q_SIFVALS "QTYPE q" "ITYPE iv" "ITYPE fv"
60 .Sh DESCRIPTION
61 .Fn Q_IFRAWMASK
62 returns a
63 .Fa q Ns -specific
64 bit mask for
65 .Fa q Ap s
66 combined integer and fractional data bits.
67 .Pp
68 .Fn Q_IFVALIMASK
69 and
70 .Fn Q_IFVALFMASK
71 return
72 .Fa q Ns -specific
73 bit masks for the integer and fractional bits of
74 .Fa q Ap s
75 combined integer and fractional data bits value, i.e., are applicable to the
76 values returned by
77 .Fn Q_GIFABSVAL
78 and
79 .Fn Q_GIFVAL .
80 .Pp
81 .Fn Q_GIFRAW
82 returns
83 .Fa q Ap s
84 raw masked integer/fractional data bits.
85 .Pp
86 .Fn Q_GIFABSVAL
87 and
88 .Fn Q_GIFVAL
89 return the absolute and real values of
90 .Fa q Ap s
91 integer/fractional data bits respectively.
92 .Pp
93 .Fn Q_SIFVAL
94 sets
95 .Fa q Ap s
96 combined integer/fractional data bits to the value
97 .Fa ifv ,
98 whereas
99 .Fn Q_SIFVALS
100 independently sets
101 .Fa q Ap s
102 integer and fractional data bits to the separate values
103 .Fa iv
104 and
105 .Fa fv .
106 .Pp
107 All of those functions operate on
108 the following data types:
109 .Vt s8q_t ,
110 .Vt u8q_t ,
111 .Vt s16q_t ,
112 .Vt u16q_t ,
113 .Vt s32q_t ,
114 .Vt u32q_t ,
115 .Vt s64q_t ,
116 and
117 .Vt u64q_t ,
118 which are referred to generically as
119 .Fa QTYPE .
120 The
121 .Fa ITYPE
122 refers to the
123 .Xr stdint 7
124 integer types.
125 .Pp
126 For more details, see
127 .Xr qmath 3 .
128 .Sh RETURN VALUES
129 .Fn Q_IFRAWMASK ,
130 .Fn Q_IFVALIMASK ,
131 .Fn Q_IFVALFMASK ,
132 .Fn Q_GIFABSVAL ,
133 .Fn Q_GIFVAL ,
134 .Fn Q_GIFRAW ,
135 .Fn Q_GIFABSVAL
136 and
137 .Fn Q_GIFVAL
138 return their respective values as integers of the same underlying ITYPE as
139 .Fa q .
140 .Pp
141 .Fn Q_SIFVAL
142 and
143 .Fn Q_SIFVALS
144 return the value of
145 .Fa q
146 post change.
147 .Sh SEE ALSO
148 .Xr errno 2 ,
149 .Xr qmath 3 ,
150 .Xr stdint 7
151 .Sh HISTORY
152 The
153 .Xr qmath 3
154 functions first appeared in
155 .Fx 13.0 .
156 .Sh AUTHORS
157 .An -nosplit
158 The
159 .Xr qmath 3
160 functions and this manual page were written by
161 .An Lawrence Stewart Aq Mt lstewart@FreeBSD.org
162 and sponsored by Netflix, Inc.