btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / kernel / messaging.h
blob1bbc00d194552b27a328e150f0c97eac384d6e12
1 /*
2 * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
6 // kernel-internal interface for the messaging service
8 #ifndef MESSAGING_H
9 #define MESSAGING_H
11 #include <OS.h>
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
17 typedef struct messaging_target {
18 port_id port;
19 int32 token;
20 } messaging_target;
22 status_t init_messaging_service();
24 status_t send_message(const void *message, int32 messageSize,
25 const messaging_target *targets, int32 targetCount);
27 // syscalls
28 area_id _user_register_messaging_service(sem_id lockingSem, sem_id counterSem);
29 status_t _user_unregister_messaging_service();
31 #ifdef __cplusplus
33 #endif
36 // C++ only
38 #ifdef __cplusplus
40 namespace BPrivate {
41 class KMessage;
44 status_t send_message(const BPrivate::KMessage *message,
45 const messaging_target *targets,
46 int32 targetCount);
48 #endif // __cplusplus
50 #endif // MESSAGING_H