---
name: "mq_getsetattr"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mq_getsetattr"
---

# mq\_getsetattr(2)

get/set message queue attributes

## NAME

mq\_getsetattr - get/set message queue attributes

## SYNOPSIS

```
#include <mqueue.h>           /* Definition of struct mq_attr */
#include <sys/syscall.h>      /* Definition of SYS_* constants */
#include <unistd.h>
```

**int syscall(SYS\_mq\_getsetattr, mqd\_t** *mqdes***,**             **const struct mq\_attr \****newattr***, struct mq\_attr \****oldattr***);**

## DESCRIPTION

Do not use this system call.

This is the low-level system call used to implement [**mq\_getattr**(3)](/mq_getattr/3.md) and [**mq\_setattr**(3)](/mq_setattr/3.md). For an explanation of how this system call operates, see the description of [**mq\_setattr**(3)](/mq_setattr/3.md).

## STANDARDS

None.

## NOTES

Never call it unless you are writing a C library!

## SEE ALSO

[**mq\_getattr**(3)](/mq_getattr/3.md), [**mq\_overview**(7)](/mq_overview/7.md)
