[−][src]Enum ipc_rs::raw::ControlCommands
Commands for use with msgctl()
Variants
DeleteQueue
Instantly deletes queue, sending a signal to all waiting processes.
In this case, msqid_ds
is completely ignored
and you can theoretically even pass a null pointer
without having to worry
SetOptions
Write the values of some
members of msqid_ds
to
the kernel data structure
Parameters written:
msg_qbytes
- the maximum amount of bytes allowed in the queuue.msgsnd()
calls over the memory limit will block unlessIpcFlags::NoWait
is also specifiedmsg_perm.uid
- UID of the owner of the queue (not the same as ID of the creator, which is saved inmsg_perm.cuid
and can't be changed)msg_perm.gid
- group ID of the owner of the queue (not the same as GID of the creator, which is saved inmsg_perm.cgid
and can't be modified)- the 9 least significant bits of
msg_perm.mode
- these are the same mode bits you would encouter when working with files in Unix. Execute bits are ignored
GetOptions
Copies information from the kernel data structure
into the msqid_ds
struct. The caller mus have read
permission on the message queue in the structure
ReturnInfo
Returns systen-wide information about message queue
limits and parameters. In this case, msgctl()
expects
a msginfo
struct as a parameter. Therefore, a cast
is required
This command is Linux specific.
msginfo
has the following members with the following
meanings:
int msgpool
- Size in Kibibites of buffer pool used to hold message data; unused within kernelint msgmap
- maximum number of entries in message map, also unusedint msgmax
- maximum numberr of bytes that can be written in a single message`int msgmnb
- maximum number of bytes that can be written to a queue; used to initialize msg_qbytesint msgmni
- maximum number of message queuesint msgssz
- message segment size; unused within the Linux kernelint msgtql
- maximum number of messages on all queues in system; unusedunsigned short int msgseg
- maximum number of segments; also unusued
The msgmni
, msgmax
and msgmnb
settings can be changed
through /proc
files of the same name. These are
usually located in /proc/sys/kernel
For bigger payloads it is recommended to raise msgmax
MessageStat
Returns a same msgid_ds
struct as ControlCommands::GetOptions
does with the exception that the msqid
argument is not a queue
identifier but instead an index into the kernel's internal array
This command is Linux specific and rarely used outside of kernel.
MessageInfo
Returns msginfo
struct just like ControlCommands::ReturnInfo
would do, but instead reports information about system resources
consumed by message queues.
This command is Linux specific.
The changed struct members are:
msgpool
- now returns the number of message queues that currently exist on the systemmsgmap
- now returns the total number of messages in all queues across the systemmsgtql
- now returns the total number of bytes used by messages accross the system
Auto Trait Implementations
impl Send for ControlCommands
impl Unpin for ControlCommands
impl Sync for ControlCommands
impl UnwindSafe for ControlCommands
impl RefUnwindSafe for ControlCommands
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,