Added experimental public API get_port_message_info_etc(). It is similar

to port_buffer_size_etc(), but returns the info through a structure,
which also identifies the sender (uid, gid, team ID) of the message.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25003 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-04-17 17:46:02 +00:00
parent a94ce1c912
commit 7727e08e5f
5 changed files with 85 additions and 5 deletions
+19
View File
@@ -135,6 +135,25 @@ extern status_t _get_next_port_info(team_id team, int32 *cookie, port_info *port
_get_next_port_info((team), (cookie), (info), sizeof(*(info)))
// WARNING: The following is Haiku experimental API. It might be removed or
// changed in the future.
typedef struct port_message_info {
size_t size;
uid_t sender;
gid_t sender_group;
team_id sender_team;
} port_message_info;
// similar to port_buffer_size_etc(), but returns (more) info
extern status_t _get_port_message_info_etc(port_id port,
port_message_info *info, size_t infoSize, uint32 flags,
bigtime_t timeout);
#define get_port_message_info_etc(port, info, flags, timeout) \
_get_port_message_info_etc((port), (info), sizeof(*(info)), flags, \
timeout)
/*-------------------------------------------------------------*/
/* Semaphores */