MAILBOX_CREATE
Purpose
mailbox_create creates a new mailbox.
Synopsis
#include <types.h>
#include <stub.h>
int mailbox_create(Word mbox,
Capability *mailbox);
Parameters
-
mbox: the requested local id for
the mailbox;
-
mailbox: a owner capability for
the created mailbox.
Description
mailbox_create creates a new mailbox.
The created mailbox is associated to a new capability that is returned
through mailbox.
Some servers listen to well known mailboxes,
i. e., mailboxes which are known by all clients regardless the name server.
At least the kernel mailboxes and one name server mailbox are well know.
The parameter mbox can be used to create a new mailbox with a pre-defined
id: if mbox is 0, then the mailbox is created and its capability
is determined by the kernel; if mbox is different from 0, the kernel
tries to create a new mailbox and assign to it a capability whose mailbox
is mbox. If the requested mailbox already exists, then maibox_create
fails.
Return Values
On success, mailbox_create returns
0 and mailbox contains a valid owner capability for the created
mailbox.
On fail, mailbox_create returns a negative
value indicating one of the following errors:
See Also
mailbox_destroy,
mailbox_status, act,
send, receive