MCPcopy Create free account
hub / github.com/F-Stack/f-stack / _getmq

Function _getmq

freebsd/kern/uipc_mqueue.c:2173–2193  ·  view source on GitHub ↗

* Get message queue by giving file slot */

Source from the content-addressed store, hash-verified

2171 * Get message queue by giving file slot
2172 */
2173static int
2174_getmq(struct thread *td, int fd, cap_rights_t *rightsp, _fgetf func,
2175 struct file **fpp, struct mqfs_node **ppn, struct mqueue **pmq)
2176{
2177 struct mqfs_node *pn;
2178 int error;
2179
2180 error = func(td, fd, rightsp, fpp);
2181 if (error)
2182 return (error);
2183 if (&mqueueops != (*fpp)->f_ops) {
2184 fdrop(*fpp, td);
2185 return (EBADF);
2186 }
2187 pn = (*fpp)->f_data;
2188 if (ppn)
2189 *ppn = pn;
2190 if (pmq)
2191 *pmq = pn->mn_data;
2192 return (0);
2193}
2194
2195static __inline int
2196getmq(struct thread *td, int fd, struct file **fpp, struct mqfs_node **ppn,

Callers 3

getmqFunction · 0.85
getmq_readFunction · 0.85
getmq_writeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected