Added a service that will be responsible for sending messages from kernel

to userland applications. A userland server (probably the registrar) will
register as the server responsible for delivering the messages. The
messages are passed to it via shared memory.

The advantage over sending the messages directly will be, that they won't
need to be dropped, if the receiver port is temporarily full.

Currently only the kernel side is implemented. Completely untested yet.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10983 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2005-01-23 19:54:19 +00:00
parent e81d2d2645
commit 59b9b48bb3
6 changed files with 687 additions and 1 deletions
+48
View File
@@ -0,0 +1,48 @@
/*
* Copyright 2005, Ingo Weinhold, [email protected]. All rights reserved.
* Distributed under the terms of the MIT License.
*/
// kernel-internal interface for the messaging service
#ifndef MESSAGING_H
#define MESSAGING_H
#include <OS.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct messaging_target {
port_id port;
int32 token;
} messaging_target;
status_t init_messaging_service();
status_t send_message(const void *message, int32 messageSize,
const messaging_target *targets, int32 targetCount);
area_id _user_register_messaging_service(sem_id lockingSem, sem_id counterSem);
#ifdef __cplusplus
}
#endif
// C++ only
#ifdef __cplusplus
namespace BPrivate {
class KMessage;
}
status_t send_message(const KMessage *message,
const messaging_target *targets,
int32 targetCount);
#endif // __cplusplus
#endif // MESSAGING_H