dacs_mailbox_test

NAME

dacs_mailbox_test - Test if a mailbox access will succeed.

SYNOPSIS

DACS_ERR_T dacs_mailbox_test ( DACS_TEST_MAILBOX_T rw_flag, de_id_t de, dacs_process_id_t pid, int32_t *mbox_status)

Call parameters  
rw_flag Flag to indicate which mailbox to test:
  • DACS_TEST_MAILBOX_READ: test the read mailbox to see if a call to dacs_mailbox_read() will block, or
  • DACS_TEST_MAILBOX_WRITE: test the write mailbox to see if a call to dacs_mailbox_write() will block.
de The DE owning the mailbox to test.
pid The process owning the mailbox to test
Return parameter  
*mbox_status A pointer to the location where the mailbox status is returned. The contents are:
  • set to zero if the mailbox will block, or
  • set to non-zero if the mailbox will not block.

DESCRIPTION

The dacs_mailbox_test service allows the programmer to test if the mailbox will block before calling dacs_mailbox_read() or dacs_mailbox_write().

RETURN VALUE

The dacs_mailbox_test service returns an error indicator defined as:
  • DACS_SUCCESS: normal return.
  • DACS_ERR_INVALID_ADDR: the pointer is invalid.
  • DACS_ERR_INVALID_ATTR: the flag or enumerated constant is invalid.
  • DACS_ERR_INVALID_DE: the specified DE is either invalid or not reserved.
  • DACS_ERR_INVALID_PID: the specified PID does not refer to an active process.
  • DACS_ERR_INVALID_TARGET: this operation is not allowed for the target process.

SEE ALSO

dacs_mailbox_read(3), dacs_mailbox_write(3)