0x10cAtlas / AtlasOS

An operating system for DCPU-16.
106 stars 16 forks source link

Add support for a message queue for each application #19

Open noxer opened 12 years ago

noxer commented 12 years ago

To enable inter-process-communication and notifications there should be a message queue for the applications.

-> each process has a buffer that any other proccess can write to, which is read by the buffer owning process

rustyoz commented 12 years ago

can you expand on this? i might have a crack at it. do you mean:

noxer commented 12 years ago

The first. Except the kernel writes to the buffers. A process can call msg_send_to to send a message to a specific process but has no direct access to the buffers of other processes.

rustyoz commented 12 years ago

there is already chessmaster's message routines, is that what you had in mind noxer? is seems like it is more the second model with the common buffer.

noxer commented 12 years ago

These routines are the first part of my implementation (chessmaster moved them into the file so its shown as his commit) but they are missing a possibility for sending a message to a specific process. With msg_queue_reg you register a part of the memory as a message queue so the OS can deliver the messages. A global message queue would make it impossible to determine if a message has been read by all running processes. But I think we need to make the queue longer (eg. 32 or 64 words).