mirror of
https://github.com/drasko/codezero.git
synced 2026-01-13 11:23:16 +01:00
Extended IPC Support added.
Benefits & Facts: - Messages up to 2 kilobytes may be sent. - Both parties may use non-disjoint user buffers. E.g. any userspace address. - Userspace buffers can page fault. - Page faults punish timeslice of only the faulting thread. - Any number of extended ipcs can take place at any one time, since only ktcbs of ipc parties are engaged. No global buffer is used. - This also provides smp-safety benefit. Disadvantages: - There is triple copying penalty. This has to be done: - Sender buffer to sender ktcb - Sender ktcb to receiver ktcb - Receiver ktcb to receiver buffer. This is due to the fact that buffers can be on non-disjoint userspace addresses. If you want to avoid disadvantages and lose some of the benefits, (e.g. address freedom, shorter copy size) use FULL IPC.
This commit is contained in:
@@ -113,9 +113,12 @@ struct ktcb {
|
||||
struct waitqueue_head *waiting_on;
|
||||
struct waitqueue *wq;
|
||||
|
||||
/* Extended ipc buffer, points to the space after ktcb */
|
||||
char *extended_ipc_buffer;
|
||||
/*
|
||||
* Extended ipc size and buffer that
|
||||
* points to the space after ktcb
|
||||
*/
|
||||
unsigned long extended_ipc_size;
|
||||
char extended_ipc_buffer[];
|
||||
};
|
||||
|
||||
/* Per thread kernel stack unified on a single page. */
|
||||
|
||||
Reference in New Issue
Block a user