-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mailbox_receive: Improved debug message when attempting to read messa…
…ge that does not fit.
- Loading branch information
Showing
2 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
// Abstract: Mailbox structures | ||
// Author: Per Lundberg <per@chaosdev.io> | ||
|
||
// © Copyright 2000, 2013 chaos development. | ||
// | ||
// © Copyright 1999-2000 chaos development | ||
// © Copyright 2013-2017 chaos development | ||
|
||
#pragma once | ||
|
||
#include <storm/types.h> | ||
|
||
// Those parameters are passed to the mailbox system calls. | ||
// The message_parameter_type is a structure which gets passed in to mailbox_send and mailbox_receive. | ||
typedef struct | ||
{ | ||
unsigned int protocol; | ||
unsigned int message_class; | ||
|
||
// When receiving a message, the maximum size of a message that can be received. This is usually (but not necessarily) the | ||
// number of bytes allocated for the 'data' pointer. | ||
// | ||
// When sending a message, this is the length of the message. | ||
unsigned int length; | ||
|
||
bool block; | ||
|
||
// A pointer to the data buffer. Note that when receiving messages, this is presumed to be allocated by the caller already; | ||
// mailbox_receive will not allocate memory for you. | ||
void *data; | ||
} message_parameter_type; |