159b9b48bSIngo Weinhold /* 259b9b48bSIngo Weinhold * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net. All rights reserved. 359b9b48bSIngo Weinhold * Distributed under the terms of the MIT License. 459b9b48bSIngo Weinhold */ 559b9b48bSIngo Weinhold 659b9b48bSIngo Weinhold // kernel - userland interface definitions 759b9b48bSIngo Weinhold 859b9b48bSIngo Weinhold #ifndef MESSAGING_SERVICE_DEFS_H 959b9b48bSIngo Weinhold #define MESSAGING_SERVICE_DEFS_H 1059b9b48bSIngo Weinhold 1159b9b48bSIngo Weinhold #include <OS.h> 1259b9b48bSIngo Weinhold 1359b9b48bSIngo Weinhold #include <messaging.h> 1459b9b48bSIngo Weinhold 1559b9b48bSIngo Weinhold enum { 1659b9b48bSIngo Weinhold MESSAGING_COMMAND_SEND_MESSAGE = 0, 1759b9b48bSIngo Weinhold }; 1859b9b48bSIngo Weinhold 1959b9b48bSIngo Weinhold struct messaging_area_header { 20*73ad2473SPawel Dziepak int32 lock_counter; 2159b9b48bSIngo Weinhold int32 size; // set to 0, when area is discarded 2259b9b48bSIngo Weinhold area_id kernel_area; 2359b9b48bSIngo Weinhold area_id next_kernel_area; 2459b9b48bSIngo Weinhold int32 command_count; 2559b9b48bSIngo Weinhold int32 first_command; 2659b9b48bSIngo Weinhold int32 last_command; 2759b9b48bSIngo Weinhold }; 2859b9b48bSIngo Weinhold 2959b9b48bSIngo Weinhold struct messaging_command { 3059b9b48bSIngo Weinhold int32 next_command; 3159b9b48bSIngo Weinhold uint32 command; 32647bed8fSIngo Weinhold int32 size; // == sizeof(messaging_command) + dataSize 3359b9b48bSIngo Weinhold char data[0]; 3459b9b48bSIngo Weinhold }; 3559b9b48bSIngo Weinhold 3659b9b48bSIngo Weinhold struct messaging_command_send_message { 3759b9b48bSIngo Weinhold int32 message_size; 3859b9b48bSIngo Weinhold int32 target_count; 3959b9b48bSIngo Weinhold messaging_target targets[0]; // [target_count] 4059b9b48bSIngo Weinhold // char message[message_size]; 4159b9b48bSIngo Weinhold }; 4259b9b48bSIngo Weinhold 4359b9b48bSIngo Weinhold #endif // MESSAGING_SERVICE_DEFS_H 44