NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO
#include <ipc/chIpc.h>int ipcSave(int portli);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
IPC
The ipcSave call saves the current thread's current message to a system buffer, and returns an identifier for the saved message. The portli argument reserved for future use. The caller should use the K_NONEPORT value for this parameter.
Messages used to be saved when a thread receives several messages and has to reply in a different order ( ipcReply (2K) is always applied to the current message; receiving a message supplants the current message). After ipcSave, there is no current message, and ipcReply (2K), ipcGetData (2K) or ipcSysInfo (2K) cannot be used unless a message is received (ipcReceive (2K)) or restored (ipcRestore (2K)).
The ipcRestore call restores a saved message as the current message. If the call is successful, the previous current message is replaced by the current message .
The number of messages that an actor may save is limited to K_CMSGSAVEDMAX.
Upon successful completion, ipcRestore returns 0 and ipcSave returns a positive identifier for the saved message. Otherwise, a negative error code is returned. In case of failure, the current message is not erased.
ipcSave : K_CMSGSAVEDMAX messages have already been saved by the calling actor.
ipcSave : no current message; ipcRestore : invalid identifier.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO