| 2251 | } |
| 2252 | |
| 2253 | int |
| 2254 | sys_kmq_setattr(struct thread *td, struct kmq_setattr_args *uap) |
| 2255 | { |
| 2256 | struct mq_attr attr, oattr; |
| 2257 | int error; |
| 2258 | |
| 2259 | if (uap->attr != NULL) { |
| 2260 | error = copyin(uap->attr, &attr, sizeof(attr)); |
| 2261 | if (error != 0) |
| 2262 | return (error); |
| 2263 | } |
| 2264 | error = kern_kmq_setattr(td, uap->mqd, uap->attr != NULL ? &attr : NULL, |
| 2265 | &oattr); |
| 2266 | if (error == 0 && uap->oattr != NULL) { |
| 2267 | bzero(oattr.__reserved, sizeof(oattr.__reserved)); |
| 2268 | error = copyout(&oattr, uap->oattr, sizeof(oattr)); |
| 2269 | } |
| 2270 | return (error); |
| 2271 | } |
| 2272 | |
| 2273 | int |
| 2274 | sys_kmq_timedreceive(struct thread *td, struct kmq_timedreceive_args *uap) |
no test coverage detected