mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
mem: add LOCKED flag to mlock the mapped memory
This commit is contained in:
parent
7e5441fbb3
commit
778bc45558
2 changed files with 4 additions and 0 deletions
|
|
@ -296,6 +296,9 @@ static struct mapping * memblock_map(struct memblock *b,
|
|||
else
|
||||
fl |= MAP_SHARED;
|
||||
|
||||
if (flags & PW_MEMMAP_FLAG_LOCKED)
|
||||
fl |= MAP_LOCKED;
|
||||
|
||||
if (flags & PW_MEMMAP_FLAG_TWICE) {
|
||||
pw_log_error(NAME" %p: implement me PW_MEMMAP_FLAG_TWICE", p);
|
||||
errno = ENOTSUP;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ enum pw_memmap_flags {
|
|||
PW_MEMMAP_FLAG_TWICE = (1 << 2), /**< map the same area twice after each other,
|
||||
* creating a circular ringbuffer */
|
||||
PW_MEMMAP_FLAG_PRIVATE = (1 << 3), /**< writes will be private */
|
||||
PW_MEMMAP_FLAG_LOCKED = (1 << 4), /**< lock the memory into RAM */
|
||||
PW_MEMMAP_FLAG_READWRITE = PW_MEMMAP_FLAG_READ | PW_MEMMAP_FLAG_WRITE,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue