custom message type for VM_BRK
[minix3.git] / include / minix / ipc.h
blobc1fcc78e8db7a6fadf66f2c29a82b05c7d6eb232
1 #ifndef _IPC_H
2 #define _IPC_H
4 #include <minix/ipcconst.h>
5 #include <minix/type.h>
6 #include <minix/const.h>
7 #include <sys/signal.h>
8 #include <sys/types.h>
10 /*==========================================================================*
11 * Types relating to messages. *
12 *==========================================================================*/
14 #define M1 1
15 #define M3 3
16 #define M4 4
17 #define M_PATH_STRING_MAX 40
19 typedef struct {
20 uint8_t data[56];
21 } mess_u8;
22 _ASSERT_MSG_SIZE(mess_u8);
24 typedef struct {
25 uint16_t data[28];
26 } mess_u16;
27 _ASSERT_MSG_SIZE(mess_u16);
29 typedef struct {
30 uint32_t data[14];
31 } mess_u32;
32 _ASSERT_MSG_SIZE(mess_u32);
34 typedef struct {
35 uint64_t data[7];
36 } mess_u64;
37 _ASSERT_MSG_SIZE(mess_u64);
39 typedef struct {
40 uint64_t m1ull1;
41 int m1i1, m1i2, m1i3;
42 char *m1p1, *m1p2, *m1p3, *m1p4;
43 uint8_t padding[20];
44 } mess_1;
45 _ASSERT_MSG_SIZE(mess_1);
47 typedef struct {
48 int64_t m2ll1;
49 int m2i1, m2i2, m2i3;
50 long m2l1, m2l2;
51 char *m2p1;
52 sigset_t sigset;
53 short m2s1;
54 uint8_t padding[6];
55 } mess_2;
56 _ASSERT_MSG_SIZE(mess_2);
58 typedef struct {
59 int m3i1, m3i2;
60 char *m3p1;
61 char m3ca1[44];
62 } mess_3;
63 _ASSERT_MSG_SIZE(mess_3);
65 typedef struct {
66 int64_t m4ll1;
67 long m4l1, m4l2, m4l3, m4l4, m4l5;
68 uint8_t padding[28];
69 } mess_4;
70 _ASSERT_MSG_SIZE(mess_4);
72 typedef struct {
73 short m5s1, m5s2;
74 int m5i1, m5i2;
75 long m5l1, m5l2, m5l3;
76 uint8_t padding[32];
77 } mess_5;
78 _ASSERT_MSG_SIZE(mess_5);
80 typedef struct {
81 int m7i1, m7i2, m7i3, m7i4, m7i5;
82 char *m7p1, *m7p2;
83 uint8_t padding[28];
84 } mess_7;
85 _ASSERT_MSG_SIZE(mess_7);
87 typedef struct {
88 int m8i1, m8i2;
89 char *m8p1, *m8p2, *m8p3, *m8p4;
90 uint8_t padding[32];
91 } mess_8;
92 _ASSERT_MSG_SIZE(mess_8);
94 typedef struct {
95 uint64_t m9ull1, m9ull2;
96 long m9l1, m9l2, m9l3, m9l4, m9l5;
97 short m9s1, m9s2, m9s3, m9s4;
98 uint8_t padding[12];
99 } mess_9;
100 _ASSERT_MSG_SIZE(mess_9);
102 typedef struct {
103 u64_t m10ull1;
104 int m10i1, m10i2, m10i3, m10i4;
105 long m10l1, m10l2, m10l3;
106 uint8_t padding[20];
107 } mess_10;
108 _ASSERT_MSG_SIZE(mess_10);
110 typedef struct {
111 int m11i1;
112 short m11s1, m11s2, m11s3, m11s4;
113 char *m11p1, *m11p2, *m11p3, *m11p4;
114 uint8_t padding[28];
115 } mess_11;
116 _ASSERT_MSG_SIZE(mess_11);
118 typedef struct {
119 off_t offset;
120 void *addr;
121 size_t len;
122 int prot;
123 int flags;
124 int fd;
125 endpoint_t forwhom;
126 void *retaddr;
127 u32_t padding[5];
128 } mess_mmap;
129 _ASSERT_MSG_SIZE(mess_mmap);
131 typedef struct {
132 u64_t timestamp; /* valid for every notify msg */
133 u64_t interrupts; /* raised interrupts; valid if from HARDWARE */
134 sigset_t sigset; /* raised signals; valid if from SYSTEM */
135 uint8_t padding[24];
136 } mess_notify;
137 _ASSERT_MSG_SIZE(mess_notify);
139 /* For SYS_GETKSIG, _ENDKSIG, _KILL, _SIGSEND, _SIGRETURN. */
140 typedef struct {
141 sigset_t map; /* used to pass signal bit map */
142 endpoint_t endpt; /* process number for inform */
143 int sig; /* signal number to send */
144 void *sigctx; /* pointer to signal context */
145 uint8_t padding[28];
146 } mess_sigcalls;
147 _ASSERT_MSG_SIZE(mess_sigcalls);
149 typedef struct {
150 int id;
151 int page;
152 int code;
153 int value;
154 int flags;
156 uint8_t padding[36];
157 } mess_input_tty_event;
158 _ASSERT_MSG_SIZE(mess_input_tty_event);
160 typedef struct {
161 time_t acnt_queue;
163 unsigned long acnt_deqs;
164 unsigned long acnt_ipc_sync;
165 unsigned long acnt_ipc_async;
166 unsigned long acnt_preempt;
167 uint32_t acnt_cpu;
168 uint32_t acnt_cpu_load;
170 uint8_t padding[24];
171 } mess_krn_lsys_schedule;
172 _ASSERT_MSG_SIZE(mess_krn_lsys_schedule);
174 typedef struct {
175 endpoint_t endpoint;
176 int quantum;
177 int priority;
178 int cpu;
180 uint8_t padding[40];
181 } mess_lsys_krn_schedule;
182 _ASSERT_MSG_SIZE(mess_lsys_krn_schedule);
184 typedef struct {
185 vir_bytes name;
186 size_t namelen;
187 vir_bytes frame;
188 size_t framelen;
189 vir_bytes ps_str;
191 uint8_t padding[36];
192 } mess_lc_pm_exec;
193 _ASSERT_MSG_SIZE(mess_lc_pm_exec);
195 typedef struct {
196 int status;
198 uint8_t padding[52];
199 } mess_lc_pm_exit;
200 _ASSERT_MSG_SIZE(mess_lc_pm_exit);
202 typedef struct {
203 pid_t pid;
205 uint8_t padding[52];
206 } mess_lc_pm_getsid;
207 _ASSERT_MSG_SIZE(mess_lc_pm_getsid);
209 typedef struct {
210 int num;
211 vir_bytes ptr; /* gid_t * */
213 uint8_t padding[48];
214 } mess_lc_pm_groups;
215 _ASSERT_MSG_SIZE(mess_lc_pm_groups);
217 typedef struct {
218 int which;
219 vir_bytes value; /* const struct itimerval * */
220 vir_bytes ovalue; /* struct itimerval * */
222 uint8_t padding[44];
223 } mess_lc_pm_itimer;
224 _ASSERT_MSG_SIZE(mess_lc_pm_itimer);
226 typedef struct {
227 vir_bytes ctx; /* mcontext_t * */
229 uint8_t padding[52];
230 } mess_lc_pm_mcontext;
231 _ASSERT_MSG_SIZE(mess_lc_pm_mcontext);
233 typedef struct {
234 int which;
235 int who;
236 int prio;
238 uint8_t padding[44];
239 } mess_lc_pm_priority;
240 _ASSERT_MSG_SIZE(mess_lc_pm_priority);
242 typedef struct {
243 pid_t pid;
244 int req;
245 vir_bytes addr;
246 long data;
248 uint8_t padding[40];
249 } mess_lc_pm_ptrace;
250 _ASSERT_MSG_SIZE(mess_lc_pm_ptrace);
252 typedef struct {
253 long data;
255 uint8_t padding[52];
256 } mess_pm_lc_ptrace;
257 _ASSERT_MSG_SIZE(mess_pm_lc_ptrace);
259 typedef struct {
260 int how;
262 uint8_t padding[52];
263 } mess_lc_pm_reboot;
264 _ASSERT_MSG_SIZE(mess_lc_pm_reboot);
266 typedef struct {
267 endpoint_t who;
268 vir_bytes addr;
270 uint8_t padding[48];
271 } mess_lc_pm_rusage;
272 _ASSERT_MSG_SIZE(mess_lc_pm_rusage);
274 typedef struct {
275 gid_t gid;
277 uint8_t padding[52];
278 } mess_lc_pm_setgid;
279 _ASSERT_MSG_SIZE(mess_lc_pm_setgid);
281 typedef struct {
282 uid_t uid;
284 uint8_t padding[52];
285 } mess_lc_pm_setuid;
286 _ASSERT_MSG_SIZE(mess_lc_pm_setuid);
288 typedef struct {
289 int req;
290 int field;
291 size_t len;
292 vir_bytes value;
294 uint8_t padding[40];
295 } mess_lc_pm_sysuname;
296 _ASSERT_MSG_SIZE(mess_lc_pm_sysuname);
298 typedef struct {
299 pid_t pid;
300 int nr;
301 vir_bytes act; /* const struct sigaction * */
302 vir_bytes oact; /* struct sigaction * */
303 vir_bytes ret; /* int (*)(void) */
305 uint8_t padding[36];
306 } mess_lc_pm_sig;
307 _ASSERT_MSG_SIZE(mess_lc_pm_sig);
309 typedef struct {
310 int how;
311 vir_bytes ctx;
312 sigset_t set;
314 uint8_t padding[32];
315 } mess_lc_pm_sigset;
316 _ASSERT_MSG_SIZE(mess_lc_pm_sigset);
318 typedef struct {
319 sigset_t set;
321 uint8_t padding[40];
322 } mess_pm_lc_sigset;
323 _ASSERT_MSG_SIZE(mess_pm_lc_sigset);
325 typedef struct {
326 time_t sec;
328 clockid_t clk_id;
329 int now;
330 long nsec;
332 uint8_t padding[36];
333 } mess_lc_pm_time;
334 _ASSERT_MSG_SIZE(mess_lc_pm_time);
336 typedef struct {
337 cp_grant_id_t grant;
338 vir_bytes tm; /* struct tm * */
339 int flags;
341 uint8_t padding[44];
342 } mess_lc_readclock_rtcdev;
343 _ASSERT_MSG_SIZE(mess_lc_readclock_rtcdev);
345 typedef struct {
346 int status;
348 uint8_t padding[52];
349 } mess_readclock_lc_rtcdev;
350 _ASSERT_MSG_SIZE(mess_readclock_lc_rtcdev);
352 typedef struct {
353 time_t sec;
355 long nsec;
357 uint8_t padding[44];
358 } mess_pm_lc_time;
359 _ASSERT_MSG_SIZE(mess_pm_lc_time);
361 typedef struct {
362 pid_t pid;
363 int options;
365 uint8_t padding[48];
366 } mess_lc_pm_waitpid;
367 _ASSERT_MSG_SIZE(mess_lc_pm_waitpid);
369 typedef struct {
370 int status;
372 uint8_t padding[52];
373 } mess_pm_lc_waitpid;
374 _ASSERT_MSG_SIZE(mess_pm_lc_waitpid);
376 typedef struct {
377 vir_bytes name;
378 size_t len;
379 int fd;
380 uid_t owner;
381 gid_t group;
383 uint8_t padding[36];
384 } mess_lc_vfs_chown;
385 _ASSERT_MSG_SIZE(mess_lc_vfs_chown);
387 typedef struct {
388 int fd;
390 uint8_t padding[52];
391 } mess_lc_vfs_close;
392 _ASSERT_MSG_SIZE(mess_lc_vfs_close);
394 typedef struct {
395 vir_bytes name;
396 size_t len;
397 int flags;
398 mode_t mode;
400 uint8_t padding[40];
401 } mess_lc_vfs_creat;
402 _ASSERT_MSG_SIZE(mess_lc_vfs_creat);
404 typedef struct {
405 int fd;
407 uint8_t padding[52];
408 } mess_lc_vfs_fchdir;
409 _ASSERT_MSG_SIZE(mess_lc_vfs_fchdir);
411 typedef struct {
412 int fd;
413 mode_t mode;
415 uint8_t padding[48];
416 } mess_lc_vfs_fchmod;
417 _ASSERT_MSG_SIZE(mess_lc_vfs_fchmod);
419 typedef struct {
420 int fd;
421 int cmd;
422 int arg_int;
423 vir_bytes arg_ptr; /* struct flock * */
425 uint8_t padding[40];
426 } mess_lc_vfs_fcntl;
427 _ASSERT_MSG_SIZE(mess_lc_vfs_fcntl);
429 typedef struct {
430 int fd;
431 vir_bytes buf; /* struct stat * */
433 uint8_t padding[48];
434 } mess_lc_vfs_fstat;
435 _ASSERT_MSG_SIZE(mess_lc_vfs_fstat);
437 typedef struct {
438 int fd;
440 uint8_t padding[52];
441 } mess_lc_vfs_fsync;
442 _ASSERT_MSG_SIZE(mess_lc_vfs_fsync);
444 typedef struct {
445 int32_t flags;
446 size_t len;
447 vir_bytes buf; /* struct statvfs */
449 uint8_t padding[44];
450 } mess_lc_vfs_getvfsstat;
451 _ASSERT_MSG_SIZE(mess_lc_vfs_getvfsstat);
453 typedef struct {
454 int fd;
455 unsigned long req;
456 vir_bytes arg;
458 uint8_t padding[44];
459 } mess_lc_vfs_ioctl;
460 _ASSERT_MSG_SIZE(mess_lc_vfs_ioctl);
462 typedef struct {
463 vir_bytes name1;
464 vir_bytes name2;
465 size_t len1;
466 size_t len2;
468 uint8_t padding[40];
469 } mess_lc_vfs_link;
470 _ASSERT_MSG_SIZE(mess_lc_vfs_link);
472 typedef struct {
473 off_t offset;
475 int fd;
476 int whence;
478 uint8_t padding[40];
479 } mess_lc_vfs_lseek;
480 _ASSERT_MSG_SIZE(mess_lc_vfs_lseek);
482 typedef struct {
483 off_t offset;
485 uint8_t padding[48];
486 } mess_vfs_lc_lseek;
487 _ASSERT_MSG_SIZE(mess_vfs_lc_lseek);
489 typedef struct {
490 dev_t device;
492 vir_bytes name;
493 size_t len;
494 mode_t mode;
496 uint8_t padding[36];
497 } mess_lc_vfs_mknod;
498 _ASSERT_MSG_SIZE(mess_lc_vfs_mknod);
500 typedef struct {
501 int flags;
502 size_t devlen;
503 size_t pathlen;
504 size_t typelen;
505 size_t labellen;
506 vir_bytes dev;
507 vir_bytes path;
508 vir_bytes type;
509 vir_bytes label;
511 uint8_t padding[20];
512 } mess_lc_vfs_mount;
513 _ASSERT_MSG_SIZE(mess_lc_vfs_mount);
515 typedef struct {
516 vir_bytes name;
517 size_t len;
518 int flags;
519 mode_t mode;
520 char buf[M_PATH_STRING_MAX];
521 } mess_lc_vfs_path;
522 _ASSERT_MSG_SIZE(mess_lc_vfs_path);
524 typedef struct {
525 int fd0;
526 int fd1;
527 int flags;
529 uint8_t padding[44];
530 } mess_lc_vfs_pipe2;
531 _ASSERT_MSG_SIZE(mess_lc_vfs_pipe2);
533 typedef struct {
534 vir_bytes name; /* const char * */
535 size_t namelen;
536 vir_bytes buf;
537 size_t bufsize;
539 uint8_t padding[40];
540 } mess_lc_vfs_readlink;
541 _ASSERT_MSG_SIZE(mess_lc_vfs_readlink);
543 typedef struct {
544 int fd;
545 vir_bytes buf;
546 size_t len;
548 uint8_t padding[44];
549 } mess_lc_vfs_readwrite;
550 _ASSERT_MSG_SIZE(mess_lc_vfs_readwrite);
552 typedef struct {
553 vir_bytes addr;
555 uint8_t padding[52];
556 } mess_lc_vfs_rusage;
557 _ASSERT_MSG_SIZE(mess_lc_vfs_rusage);
559 typedef struct {
560 uint32_t nfds;
561 fd_set *readfds;
562 fd_set *writefds;
563 fd_set *errorfds;
564 vir_bytes timeout; /* user-provided 'struct timeval *' */
566 uint8_t padding[36];
567 } mess_lc_vfs_select;
568 _ASSERT_MSG_SIZE(mess_lc_vfs_select);
570 typedef struct {
571 size_t len;
572 vir_bytes name; /* const char * */
573 vir_bytes buf; /* struct stat * */
575 uint8_t padding[44];
576 } mess_lc_vfs_stat;
577 _ASSERT_MSG_SIZE(mess_lc_vfs_stat);
579 typedef struct {
580 int fd;
581 int flags;
582 size_t len;
583 vir_bytes name;
584 vir_bytes buf;
586 uint8_t padding[36];
587 } mess_lc_vfs_statvfs1;
588 _ASSERT_MSG_SIZE(mess_lc_vfs_statvfs1);
590 typedef struct {
591 off_t offset;
593 int fd;
594 vir_bytes name;
595 size_t len;
597 uint8_t padding[36];
598 } mess_lc_vfs_truncate;
599 _ASSERT_MSG_SIZE(mess_lc_vfs_truncate);
601 typedef struct {
602 mode_t mask;
604 uint8_t padding[52];
605 } mess_lc_vfs_umask;
606 _ASSERT_MSG_SIZE(mess_lc_vfs_umask);
608 typedef struct {
609 vir_bytes name;
610 size_t namelen;
611 vir_bytes label;
612 size_t labellen;
614 uint8_t padding[40];
615 } mess_lc_vfs_umount;
616 _ASSERT_MSG_SIZE(mess_lc_vfs_umount);
618 typedef struct {
619 vir_bytes addr;
621 uint8_t padding[52];
622 } mess_lc_vm_rusage;
623 _ASSERT_MSG_SIZE(mess_lc_vm_rusage);
625 typedef struct {
626 endpoint_t endpt;
627 vir_bytes ptr; /* struct exec_info * */
629 uint8_t padding[48];
630 } mess_lexec_pm_exec_new;
631 _ASSERT_MSG_SIZE(mess_lexec_pm_exec_new);
633 typedef struct {
634 int suid;
636 uint8_t padding[52];
637 } mess_pm_lexec_exec_new;
638 _ASSERT_MSG_SIZE(mess_pm_lexec_exec_new);
640 typedef struct {
641 cp_grant_id_t grant;
643 uint8_t padding[52];
644 } mess_li2cdriver_i2c_busc_i2c_exec;
645 _ASSERT_MSG_SIZE(mess_li2cdriver_i2c_busc_i2c_exec);
647 typedef struct {
648 uint8_t padding[56];
649 } mess_i2c_li2cdriver_busc_i2c_exec;
650 _ASSERT_MSG_SIZE(mess_i2c_li2cdriver_busc_i2c_exec);
652 typedef struct {
653 uint16_t addr; /* FIXME: strictly speaking this is an i2c_addr_t, but
654 to get it I would need to include
655 sys/dev/i2c/i2c_io.h, which I am not sure is a good
656 idea to have everywhere. */
658 uint8_t padding[54];
659 } mess_li2cdriver_i2c_busc_i2c_reserve;
660 _ASSERT_MSG_SIZE(mess_li2cdriver_i2c_busc_i2c_reserve);
662 typedef struct {
663 uint8_t padding[56];
664 } mess_i2c_li2cdriver_busc_i2c_reserve;
665 _ASSERT_MSG_SIZE(mess_i2c_li2cdriver_busc_i2c_reserve);
667 typedef struct {
668 int kbd_id;
669 int mouse_id;
670 int rsvd1_id;
671 int rsvd2_id;
673 uint8_t padding[40];
674 } mess_input_linputdriver_input_conf;
675 _ASSERT_MSG_SIZE(mess_input_linputdriver_input_conf);
677 typedef struct {
678 uint32_t led_mask;
680 uint8_t padding[52];
681 } mess_input_linputdriver_setleds;
682 _ASSERT_MSG_SIZE(mess_input_linputdriver_setleds);
684 typedef struct {
685 int id;
686 int page;
687 int code;
688 int value;
689 int flags;
691 uint8_t padding[36];
692 } mess_linputdriver_input_event;
693 _ASSERT_MSG_SIZE(mess_linputdriver_input_event);
695 typedef struct {
696 cp_grant_id_t gid;
697 size_t size;
699 uint8_t padding[48];
700 } mess_lsys_fi_ctl;
701 _ASSERT_MSG_SIZE(mess_lsys_fi_ctl);
703 typedef struct {
704 int status;
706 uint8_t padding[52];
707 } mess_lsys_fi_reply;
708 _ASSERT_MSG_SIZE(mess_lsys_fi_reply);
710 typedef struct {
711 int what;
712 vir_bytes where;
713 size_t size;
715 uint8_t padding[44];
716 } mess_lsys_getsysinfo;
717 _ASSERT_MSG_SIZE(mess_lsys_getsysinfo);
719 typedef struct {
720 uint32_t flags;
721 endpoint_t endpoint;
722 int priority;
723 int quantum;
724 int cpu;
726 uint8_t padding[36];
727 } mess_lsys_krn_schedctl;
728 _ASSERT_MSG_SIZE(mess_lsys_krn_schedctl);
730 typedef struct {
731 int how;
733 uint8_t padding[52];
734 } mess_lsys_krn_sys_abort;
735 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_abort);
737 typedef struct {
738 endpoint_t endpt;
740 uint8_t padding[52];
741 } mess_lsys_krn_sys_clear;
742 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_clear);
744 typedef struct {
745 endpoint_t src_endpt;
746 vir_bytes src_addr;
747 endpoint_t dst_endpt;
748 vir_bytes dst_addr;
749 phys_bytes nr_bytes;
750 int flags;
752 uint8_t padding[32];
753 } mess_lsys_krn_sys_copy;
754 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_copy);
756 typedef struct {
757 endpoint_t endpt;
758 vir_bytes ip;
759 vir_bytes stack;
760 vir_bytes name;
761 vir_bytes ps_str;
763 uint8_t padding[36];
764 } mess_lsys_krn_sys_exec;
765 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_exec);
767 typedef struct {
768 endpoint_t endpt;
769 endpoint_t slot;
770 uint32_t flags;
772 uint8_t padding[44];
773 } mess_lsys_krn_sys_fork;
774 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_fork);
776 typedef struct {
777 endpoint_t endpt;
778 vir_bytes msgaddr;
780 uint8_t padding[48];
781 } mess_krn_lsys_sys_fork;
782 _ASSERT_MSG_SIZE(mess_krn_lsys_sys_fork);
784 typedef struct {
785 int request;
786 endpoint_t endpt;
787 vir_bytes val_ptr;
788 int val_len;
789 vir_bytes val_ptr2;
790 int val_len2_e;
792 uint8_t padding[32];
793 } mess_lsys_krn_sys_getinfo;
794 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_getinfo);
796 typedef struct {
797 endpoint_t endpt;
798 vir_bytes ctx_ptr;
800 uint8_t padding[48];
801 } mess_lsys_krn_sys_getmcontext;
802 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_getmcontext);
804 typedef struct {
805 endpoint_t endpt;
806 int privflags;
807 char name[48];
809 } mess_krn_lsys_sys_getwhoami;
810 _ASSERT_MSG_SIZE(mess_krn_lsys_sys_getwhoami);
812 typedef struct {
813 endpoint_t endpt;
815 uint8_t padding[52];
816 } mess_lsys_krn_sys_iopenable;
817 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_iopenable);
819 typedef struct {
820 int request;
821 int vector;
822 int policy;
823 int hook_id;
825 uint8_t padding[40];
826 } mess_lsys_krn_sys_irqctl;
827 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_irqctl);
829 typedef struct {
830 int hook_id;
832 uint8_t padding[52];
833 } mess_krn_lsys_sys_irqctl;
834 _ASSERT_MSG_SIZE(mess_krn_lsys_sys_irqctl);
836 typedef struct {
837 int request;
838 endpoint_t endpt;
839 vir_bytes arg_ptr;
840 phys_bytes phys_start;
841 phys_bytes phys_len;
843 uint8_t padding[36];
844 } mess_lsys_krn_sys_privctl;
845 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_privctl);
847 typedef struct {
848 int request;
849 int port;
850 uint32_t value;
852 uint8_t padding[44];
853 } mess_lsys_krn_sys_devio;
854 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_devio);
856 typedef struct {
857 uint32_t value;
859 uint8_t padding[52];
860 } mess_krn_lsys_sys_devio;
861 _ASSERT_MSG_SIZE(mess_krn_lsys_sys_devio);
863 typedef struct {
864 int request;
865 long int port;
866 endpoint_t vec_endpt;
867 phys_bytes vec_addr;
868 vir_bytes vec_size;
869 vir_bytes offset;
871 uint8_t padding[32];
872 } mess_lsys_krn_sys_sdevio;
873 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_sdevio);
875 typedef struct {
876 clock_t exp_time;
877 clock_t time_left;
878 int abs_time;
880 uint8_t padding[44];
881 } mess_lsys_krn_sys_setalarm;
882 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_setalarm);
884 typedef struct {
885 vir_bytes addr; /* cp_grant_t * */
886 int size;
888 uint8_t padding[48];
889 } mess_lsys_krn_sys_setgrant;
890 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_setgrant);
892 typedef struct {
893 endpoint_t endpt;
894 vir_bytes ctx_ptr;
896 uint8_t padding[48];
897 } mess_lsys_krn_sys_setmcontext;
898 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_setmcontext);
900 typedef struct {
901 int request;
903 uint8_t padding[52];
904 } mess_lsys_krn_sys_statectl;
905 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_statectl);
907 typedef struct {
908 time_t boot_time;
910 uint8_t padding[48];
911 } mess_lsys_krn_sys_stime;
912 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_stime);
914 typedef struct {
915 time_t sec; /* time in seconds since 1970 */
916 long int nsec;
917 int now; /* non-zero for immediate, 0 for adjtime */
918 clockid_t clock_id;
920 uint8_t padding[36];
921 } mess_lsys_krn_sys_settime;
922 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_settime);
924 typedef struct {
925 endpoint_t endpt;
927 uint8_t padding[52];
928 } mess_lsys_krn_sys_times;
929 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_times);
931 typedef struct {
932 clock_t real_ticks;
933 clock_t boot_ticks;
934 clock_t boot_time;
935 clock_t user_time;
936 clock_t system_time;
938 uint8_t padding[36];
939 } mess_krn_lsys_sys_times;
940 _ASSERT_MSG_SIZE(mess_krn_lsys_sys_times);
942 typedef struct {
943 int request;
944 endpoint_t endpt;
945 vir_bytes address;
946 long int data;
948 uint8_t padding[40];
949 } mess_lsys_krn_sys_trace;
950 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_trace);
952 typedef struct {
953 long int data;
955 uint8_t padding[52];
956 } mess_krn_lsys_sys_trace;
957 _ASSERT_MSG_SIZE(mess_krn_lsys_sys_trace);
959 typedef struct {
960 endpoint_t src_endpt;
961 int segment;
962 vir_bytes src_addr;
963 endpoint_t dst_endpt;
964 int nr_bytes;
966 uint8_t padding[36];
967 } mess_lsys_krn_sys_umap;
968 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_umap);
970 typedef struct {
971 phys_bytes dst_addr;
973 uint8_t padding[52];
974 } mess_krn_lsys_sys_umap;
975 _ASSERT_MSG_SIZE(mess_krn_lsys_sys_umap);
977 typedef struct {
978 int request;
979 int vec_size;
980 vir_bytes vec_addr; /* pv{b,w,l}_pair_t * */
982 uint8_t padding[44];
983 } mess_lsys_krn_sys_vdevio;
984 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_vdevio);
986 typedef struct {
987 endpoint_t endpt;
988 vir_bytes vaddr; /* struct vumap_vir * */
989 int vcount;
990 vir_bytes paddr; /* struct vumap_phys * */
991 int pmax;
992 int access;
993 size_t offset;
995 uint8_t padding[28];
996 } mess_lsys_krn_sys_vumap;
997 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_vumap);
999 typedef struct {
1000 int pcount;
1002 uint8_t padding[52];
1003 } mess_krn_lsys_sys_vumap;
1004 _ASSERT_MSG_SIZE(mess_krn_lsys_sys_vumap);
1006 typedef struct {
1007 phys_bytes base;
1008 phys_bytes count;
1009 unsigned long pattern;
1010 endpoint_t process;
1012 uint8_t padding[40];
1013 } mess_lsys_krn_sys_memset;
1014 _ASSERT_MSG_SIZE(mess_lsys_krn_sys_memset);
1016 typedef struct {
1017 int devind;
1018 int port;
1020 uint8_t padding[48];
1021 } mess_lsys_pci_busc_get_bar;
1022 _ASSERT_MSG_SIZE(mess_lsys_pci_busc_get_bar);
1024 typedef struct {
1025 int base;
1026 size_t size;
1027 uint32_t flags;
1029 uint8_t padding[44];
1030 } mess_pci_lsys_busc_get_bar;
1031 _ASSERT_MSG_SIZE(mess_pci_lsys_busc_get_bar);
1033 typedef struct {
1034 endpoint_t endpt;
1036 uint8_t padding[52];
1037 } mess_lsys_pm_getepinfo;
1038 _ASSERT_MSG_SIZE(mess_lsys_pm_getepinfo);
1040 typedef struct {
1041 uid_t uid;
1042 gid_t gid;
1044 uint8_t padding[48];
1045 } mess_pm_lsys_getepinfo;
1046 _ASSERT_MSG_SIZE(mess_pm_lsys_getepinfo);
1048 typedef struct {
1049 pid_t pid;
1051 uint8_t padding[52];
1052 } mess_lsys_pm_getprocnr;
1053 _ASSERT_MSG_SIZE(mess_lsys_pm_getprocnr);
1055 typedef struct {
1056 endpoint_t endpt;
1058 uint8_t padding[52];
1059 } mess_pm_lsys_getprocnr;
1060 _ASSERT_MSG_SIZE(mess_pm_lsys_getprocnr);
1062 typedef struct {
1063 uid_t uid;
1064 gid_t gid;
1066 uint8_t padding[48];
1067 } mess_lsys_pm_srv_fork;
1068 _ASSERT_MSG_SIZE(mess_lsys_pm_srv_fork);
1070 typedef struct {
1071 endpoint_t endpoint;
1072 endpoint_t parent;
1073 int maxprio;
1074 int quantum;
1076 uint8_t padding[40];
1077 } mess_lsys_sched_scheduling_start;
1078 _ASSERT_MSG_SIZE(mess_lsys_sched_scheduling_start);
1080 typedef struct {
1081 endpoint_t scheduler;
1083 uint8_t padding[52];
1084 } mess_sched_lsys_scheduling_start;
1085 _ASSERT_MSG_SIZE(mess_sched_lsys_scheduling_start);
1087 typedef struct {
1088 endpoint_t endpoint;
1090 uint8_t padding[52];
1091 } mess_lsys_sched_scheduling_stop;
1092 _ASSERT_MSG_SIZE(mess_lsys_sched_scheduling_stop);
1094 typedef struct {
1095 int request;
1096 vir_bytes arg;
1098 uint8_t padding[48];
1099 } mess_lsys_svrctl;
1100 _ASSERT_MSG_SIZE(mess_lsys_svrctl);
1102 typedef struct {
1103 int request;
1104 int fkeys;
1105 int sfkeys;
1107 uint8_t padding[44];
1108 } mess_lsys_tty_fkey_ctl;
1109 _ASSERT_MSG_SIZE(mess_lsys_tty_fkey_ctl);
1111 typedef struct {
1112 int fkeys;
1113 int sfkeys;
1115 uint8_t padding[48];
1116 } mess_tty_lsys_fkey_ctl;
1117 _ASSERT_MSG_SIZE(mess_tty_lsys_fkey_ctl);
1119 typedef struct {
1120 endpoint_t endpt;
1121 cp_grant_id_t grant;
1122 size_t count;
1124 uint8_t padding[44];
1125 } mess_lsys_vfs_checkperms;
1126 _ASSERT_MSG_SIZE(mess_lsys_vfs_checkperms);
1128 typedef struct {
1129 endpoint_t endpt;
1130 int fd;
1131 int what;
1133 uint8_t padding[44];
1134 } mess_lsys_vfs_copyfd;
1135 _ASSERT_MSG_SIZE(mess_lsys_vfs_copyfd);
1137 typedef struct {
1138 devmajor_t major;
1139 size_t labellen;
1140 vir_bytes label;
1142 uint8_t padding[44];
1143 } mess_lsys_vfs_mapdriver;
1144 _ASSERT_MSG_SIZE(mess_lsys_vfs_mapdriver);
1146 typedef struct {
1147 int mode;
1149 uint8_t padding[52];
1150 } mess_net_netdrv_dl_conf;
1151 _ASSERT_MSG_SIZE(mess_net_netdrv_dl_conf);
1153 typedef struct {
1154 int stat;
1155 uint8_t hw_addr[6];
1157 uint8_t padding[46];
1158 } mess_netdrv_net_dl_conf;
1159 _ASSERT_MSG_SIZE(mess_netdrv_net_dl_conf);
1161 typedef struct {
1162 cp_grant_id_t grant;
1164 uint8_t padding[52];
1165 } mess_net_netdrv_dl_getstat_s;
1166 _ASSERT_MSG_SIZE(mess_net_netdrv_dl_getstat_s);
1168 typedef struct {
1169 cp_grant_id_t grant;
1170 int count;
1172 uint8_t padding[48];
1173 } mess_net_netdrv_dl_readv_s;
1174 _ASSERT_MSG_SIZE(mess_net_netdrv_dl_readv_s);
1176 typedef struct {
1177 cp_grant_id_t grant;
1178 int count;
1180 uint8_t padding[48];
1181 } mess_net_netdrv_dl_writev_s;
1182 _ASSERT_MSG_SIZE(mess_net_netdrv_dl_writev_s);
1184 typedef struct {
1185 int count;
1186 uint32_t flags;
1188 uint8_t padding[48];
1189 } mess_netdrv_net_dl_task;
1190 _ASSERT_MSG_SIZE(mess_netdrv_net_dl_task);
1192 typedef struct {
1193 uid_t egid;
1195 uint8_t padding[52];
1196 } mess_pm_lc_getgid;
1197 _ASSERT_MSG_SIZE(mess_pm_lc_getgid);
1199 typedef struct {
1200 pid_t parent_pid;
1202 uint8_t padding[52];
1203 } mess_pm_lc_getpid;
1204 _ASSERT_MSG_SIZE(mess_pm_lc_getpid);
1206 typedef struct {
1207 uid_t euid;
1209 uint8_t padding[52];
1210 } mess_pm_lc_getuid;
1211 _ASSERT_MSG_SIZE(mess_pm_lc_getuid);
1213 typedef struct {
1214 endpoint_t endpoint;
1215 uint32_t maxprio;
1217 uint8_t padding[48];
1218 } mess_pm_sched_scheduling_set_nice;
1219 _ASSERT_MSG_SIZE(mess_pm_sched_scheduling_set_nice);
1221 typedef struct {
1222 endpoint_t endpt;
1223 int result;
1224 vir_bytes pc;
1225 vir_bytes ps_str;
1227 uint8_t padding[40];
1228 } mess_rs_pm_exec_restart;
1229 _ASSERT_MSG_SIZE(mess_rs_pm_exec_restart);
1231 typedef struct {
1232 pid_t pid;
1233 int nr;
1235 uint8_t padding[48];
1236 } mess_rs_pm_srv_kill;
1237 _ASSERT_MSG_SIZE(mess_rs_pm_srv_kill);
1239 typedef struct {
1240 dev_t device;
1241 off_t seek_pos;
1243 cp_grant_id_t grant;
1244 size_t nbytes;
1246 uint8_t data[32];
1247 } mess_vfs_fs_breadwrite;
1248 _ASSERT_MSG_SIZE(mess_vfs_fs_breadwrite);
1250 typedef struct {
1251 off_t seek_pos;
1253 size_t nbytes;
1255 uint8_t data[44];
1256 } mess_fs_vfs_breadwrite;
1257 _ASSERT_MSG_SIZE(mess_fs_vfs_breadwrite);
1259 typedef struct {
1260 ino_t inode;
1262 mode_t mode;
1264 uint8_t data[44];
1265 } mess_vfs_fs_chmod;
1266 _ASSERT_MSG_SIZE(mess_vfs_fs_chmod);
1268 typedef struct {
1269 mode_t mode;
1271 uint8_t data[52];
1272 } mess_fs_vfs_chmod;
1273 _ASSERT_MSG_SIZE(mess_fs_vfs_chmod);
1275 typedef struct {
1276 ino_t inode;
1278 uid_t uid;
1279 gid_t gid;
1281 uint8_t data[40];
1282 } mess_vfs_fs_chown;
1283 _ASSERT_MSG_SIZE(mess_vfs_fs_chown);
1285 typedef struct {
1286 mode_t mode;
1288 uint8_t data[52];
1289 } mess_fs_vfs_chown;
1290 _ASSERT_MSG_SIZE(mess_fs_vfs_chown);
1292 typedef struct {
1293 ino_t inode;
1295 mode_t mode;
1296 uid_t uid;
1297 gid_t gid;
1298 cp_grant_id_t grant;
1299 size_t path_len;
1301 uint8_t data[28];
1302 } mess_vfs_fs_create;
1303 _ASSERT_MSG_SIZE(mess_vfs_fs_create);
1305 typedef struct {
1306 off_t file_size;
1307 ino_t inode;
1309 mode_t mode;
1310 uid_t uid;
1311 gid_t gid;
1313 uint8_t data[28];
1314 } mess_fs_vfs_create;
1315 _ASSERT_MSG_SIZE(mess_fs_vfs_create);
1317 typedef struct {
1318 dev_t device;
1320 uint8_t data[48];
1321 } mess_vfs_fs_flush;
1322 _ASSERT_MSG_SIZE(mess_vfs_fs_flush);
1324 typedef struct {
1325 ino_t inode;
1326 off_t trc_start;
1327 off_t trc_end;
1329 uint8_t data[32];
1330 } mess_vfs_fs_ftrunc;
1331 _ASSERT_MSG_SIZE(mess_vfs_fs_ftrunc);
1333 typedef struct {
1334 ino_t inode;
1335 off_t seek_pos;
1337 cp_grant_id_t grant;
1338 size_t mem_size;
1340 uint8_t data[32];
1341 } mess_vfs_fs_getdents;
1342 _ASSERT_MSG_SIZE(mess_vfs_fs_getdents);
1344 typedef struct {
1345 off_t seek_pos;
1347 size_t nbytes;
1349 uint8_t data[44];
1350 } mess_fs_vfs_getdents;
1351 _ASSERT_MSG_SIZE(mess_fs_vfs_getdents);
1353 typedef struct {
1354 ino_t inode;
1356 uint8_t data[48];
1357 } mess_vfs_fs_inhibread;
1358 _ASSERT_MSG_SIZE(mess_vfs_fs_inhibread);
1360 typedef struct {
1361 ino_t inode;
1362 ino_t dir_ino;
1364 cp_grant_id_t grant;
1365 size_t path_len;
1367 uint8_t data[32];
1368 } mess_vfs_fs_link;
1369 _ASSERT_MSG_SIZE(mess_vfs_fs_link);
1371 typedef struct {
1372 ino_t dir_ino;
1373 ino_t root_ino;
1375 uint32_t flags;
1376 size_t path_len;
1377 size_t path_size;
1378 size_t ucred_size;
1379 cp_grant_id_t grant_path;
1380 cp_grant_id_t grant_ucred;
1381 uid_t uid;
1382 gid_t gid;
1384 uint8_t data[8];
1385 } mess_vfs_fs_lookup;
1386 _ASSERT_MSG_SIZE(mess_vfs_fs_lookup);
1388 typedef struct {
1389 off_t offset;
1390 off_t file_size;
1391 dev_t device;
1392 ino_t inode;
1394 mode_t mode;
1395 uid_t uid;
1396 gid_t gid;
1398 uint16_t symloop;
1400 uint8_t data[10];
1401 } mess_fs_vfs_lookup;
1402 _ASSERT_MSG_SIZE(mess_fs_vfs_lookup);
1404 typedef struct {
1405 ino_t inode;
1407 mode_t mode;
1408 uid_t uid;
1409 gid_t gid;
1410 cp_grant_id_t grant;
1411 size_t path_len;
1413 uint8_t data[28];
1414 } mess_vfs_fs_mkdir;
1415 _ASSERT_MSG_SIZE(mess_vfs_fs_mkdir);
1417 typedef struct {
1418 dev_t device;
1419 ino_t inode;
1421 mode_t mode;
1422 uid_t uid;
1423 gid_t gid;
1424 cp_grant_id_t grant;
1425 size_t path_len;
1427 uint8_t data[20];
1428 } mess_vfs_fs_mknod;
1429 _ASSERT_MSG_SIZE(mess_vfs_fs_mknod);
1431 typedef struct {
1432 ino_t inode;
1434 uint8_t data[48];
1435 } mess_vfs_fs_mountpoint;
1436 _ASSERT_MSG_SIZE(mess_vfs_fs_mountpoint);
1438 typedef struct {
1439 dev_t device;
1441 cp_grant_id_t grant;
1442 size_t path_len;
1444 uint8_t data[40];
1445 } mess_vfs_fs_new_driver;
1446 _ASSERT_MSG_SIZE(mess_vfs_fs_new_driver);
1448 typedef struct {
1449 dev_t device;
1451 mode_t mode;
1452 uid_t uid;
1453 gid_t gid;
1455 uint8_t data[36];
1456 } mess_vfs_fs_newnode;
1457 _ASSERT_MSG_SIZE(mess_vfs_fs_newnode);
1459 typedef struct {
1460 off_t file_size;
1461 dev_t device;
1462 ino_t inode;
1464 mode_t mode;
1465 uid_t uid;
1466 gid_t gid;
1468 uint8_t data[20];
1469 } mess_fs_vfs_newnode;
1470 _ASSERT_MSG_SIZE(mess_fs_vfs_newnode);
1472 typedef struct {
1473 uint64_t count;
1474 ino_t inode;
1476 uint8_t data[40];
1477 } mess_vfs_fs_putnode;
1478 _ASSERT_MSG_SIZE(mess_vfs_fs_putnode);
1480 typedef struct {
1481 ino_t inode;
1483 cp_grant_id_t grant;
1484 size_t mem_size;
1486 uint8_t data[40];
1487 } mess_vfs_fs_rdlink;
1488 _ASSERT_MSG_SIZE(mess_vfs_fs_rdlink);
1490 typedef struct {
1491 size_t nbytes;
1493 uint8_t data[52];
1494 } mess_fs_vfs_rdlink;
1495 _ASSERT_MSG_SIZE(mess_fs_vfs_rdlink);
1497 typedef struct {
1498 dev_t device;
1500 uint32_t flags;
1501 size_t path_len;
1502 cp_grant_id_t grant;
1504 uint8_t data[36];
1505 } mess_vfs_fs_readsuper;
1506 _ASSERT_MSG_SIZE(mess_vfs_fs_readsuper);
1508 typedef struct {
1509 off_t file_size;
1510 dev_t device;
1511 ino_t inode;
1513 uint32_t flags;
1514 mode_t mode;
1515 uid_t uid;
1516 gid_t gid;
1518 uint16_t con_reqs;
1520 uint8_t data[14];
1521 } mess_fs_vfs_readsuper;
1522 _ASSERT_MSG_SIZE(mess_fs_vfs_readsuper);
1524 typedef struct {
1525 ino_t inode;
1526 off_t seek_pos;
1528 cp_grant_id_t grant;
1529 size_t nbytes;
1531 uint8_t data[32];
1532 } mess_vfs_fs_readwrite;
1533 _ASSERT_MSG_SIZE(mess_vfs_fs_readwrite);
1535 typedef struct {
1536 off_t seek_pos;
1538 size_t nbytes;
1540 uint8_t data[44];
1541 } mess_fs_vfs_readwrite;
1542 _ASSERT_MSG_SIZE(mess_fs_vfs_readwrite);
1544 typedef struct {
1545 ino_t dir_old;
1546 ino_t dir_new;
1548 size_t len_old;
1549 size_t len_new;
1550 cp_grant_id_t grant_old;
1551 cp_grant_id_t grant_new;
1553 uint8_t data[24];
1554 } mess_vfs_fs_rename;
1555 _ASSERT_MSG_SIZE(mess_vfs_fs_rename);
1557 typedef struct {
1558 ino_t inode;
1560 size_t path_len;
1561 size_t mem_size;
1562 cp_grant_id_t grant_path;
1563 cp_grant_id_t grant_target;
1564 uid_t uid;
1565 gid_t gid;
1567 uint8_t data[24];
1568 } mess_vfs_fs_slink;
1569 _ASSERT_MSG_SIZE(mess_vfs_fs_slink);
1571 typedef struct {
1572 ino_t inode;
1574 cp_grant_id_t grant;
1576 uint8_t data[44];
1577 } mess_vfs_fs_stat;
1578 _ASSERT_MSG_SIZE(mess_vfs_fs_stat);
1580 typedef struct {
1581 cp_grant_id_t grant;
1583 uint8_t data[52];
1584 } mess_vfs_fs_statvfs;
1585 _ASSERT_MSG_SIZE(mess_vfs_fs_statvfs);
1587 typedef struct {
1588 ino_t inode;
1590 cp_grant_id_t grant;
1591 size_t path_len;
1593 uint8_t data[40];
1594 } mess_vfs_fs_unlink;
1595 _ASSERT_MSG_SIZE(mess_vfs_fs_unlink);
1597 typedef struct {
1598 ino_t inode;
1599 time_t actime;
1600 time_t modtime;
1602 uint32_t acnsec;
1603 uint32_t modnsec;
1605 uint8_t data[24];
1606 } mess_vfs_fs_utime;
1607 _ASSERT_MSG_SIZE(mess_vfs_fs_utime);
1609 typedef struct {
1610 endpoint_t id;
1611 devminor_t minor;
1613 uint8_t padding[48];
1614 } mess_vfs_lchardriver_cancel;
1615 _ASSERT_MSG_SIZE(mess_vfs_lchardriver_cancel);
1617 typedef struct {
1618 endpoint_t id;
1619 endpoint_t user;
1620 devminor_t minor;
1621 int access;
1623 uint8_t padding[40];
1624 } mess_vfs_lchardriver_openclose;
1625 _ASSERT_MSG_SIZE(mess_vfs_lchardriver_openclose);
1627 typedef struct {
1628 off_t pos;
1629 cp_grant_id_t grant;
1630 size_t count;
1631 int request;
1632 int flags;
1633 endpoint_t id;
1634 endpoint_t user;
1635 devminor_t minor;
1637 uint8_t padding[20];
1638 } mess_vfs_lchardriver_readwrite;
1639 _ASSERT_MSG_SIZE(mess_vfs_lchardriver_readwrite);
1641 typedef struct {
1642 devminor_t minor;
1643 int ops;
1645 uint8_t padding[48];
1646 } mess_vfs_lchardriver_select;
1647 _ASSERT_MSG_SIZE(mess_vfs_lchardriver_select);
1649 typedef struct {
1650 int status;
1651 uint32_t id; /* should be cdev_id_t */
1653 uint8_t padding[48];
1654 } mess_lchardriver_vfs_reply;
1655 _ASSERT_MSG_SIZE(mess_lchardriver_vfs_reply);
1657 typedef struct {
1658 int status;
1659 int32_t minor;
1661 uint8_t padding[48];
1662 } mess_lchardriver_vfs_sel1;
1663 _ASSERT_MSG_SIZE(mess_lchardriver_vfs_sel1);
1665 typedef struct {
1666 int status;
1667 int32_t minor;
1669 uint8_t padding[48];
1670 } mess_lchardriver_vfs_sel2;
1671 _ASSERT_MSG_SIZE(mess_lchardriver_vfs_sel2);
1673 typedef struct {
1674 time_t atime;
1675 time_t mtime;
1676 long ansec;
1677 long mnsec;
1678 size_t len;
1679 char *name;
1680 int fd;
1681 int flags;
1682 uint8_t padding[16];
1683 } mess_vfs_utimens;
1684 _ASSERT_MSG_SIZE(mess_vfs_utimens);
1686 typedef struct {
1687 off_t offset;
1688 dev_t dev;
1689 ino_t ino;
1690 endpoint_t who;
1691 u32_t vaddr;
1692 u32_t len;
1693 u32_t flags;
1694 u32_t fd;
1695 u16_t clearend;
1696 uint8_t padding[8];
1697 } mess_vm_vfs_mmap;
1698 _ASSERT_MSG_SIZE(mess_vm_vfs_mmap);
1700 typedef struct {
1701 dev_t dev; /* 64bits long. */
1702 off_t dev_offset;
1703 off_t ino_offset;
1704 ino_t ino;
1705 void *block;
1706 u32_t *flags_ptr;
1707 u8_t pages;
1708 u8_t flags;
1709 uint8_t padding[12];
1710 } mess_vmmcp;
1711 _ASSERT_MSG_SIZE(mess_vmmcp);
1713 typedef struct {
1714 void *addr;
1715 u8_t flags;
1716 uint8_t padding[51];
1717 } mess_vmmcp_reply;
1718 _ASSERT_MSG_SIZE(mess_vmmcp_reply);
1720 typedef struct {
1721 endpoint_t destination;
1722 endpoint_t source;
1723 void *dest_addr;
1724 void *src_addr;
1725 size_t size;
1726 void *ret_addr;
1727 uint8_t padding[32];
1728 } mess_lsys_vm_vmremap;
1729 _ASSERT_MSG_SIZE(mess_lsys_vm_vmremap);
1731 typedef struct {
1732 endpoint_t forwhom;
1733 void *addr;
1734 uint8_t padding[48];
1735 } mess_lc_vm_shm_unmap;
1736 _ASSERT_MSG_SIZE(mess_lc_vm_shm_unmap);
1738 typedef struct {
1739 void *addr;
1740 uint8_t padding[52];
1741 } mess_lc_vm_brk;
1742 _ASSERT_MSG_SIZE(mess_lc_vm_brk);
1744 typedef struct {
1745 endpoint_t endpt;
1746 void *addr;
1747 void *ret_addr;
1748 uint8_t padding[44];
1749 } mess_lc_vm_getphys;
1750 _ASSERT_MSG_SIZE(mess_lc_vm_getphys);
1752 typedef struct {
1753 endpoint_t endpt;
1754 void *addr;
1755 int retc;
1756 uint8_t padding[44];
1757 } mess_lsys_vm_getref;
1758 _ASSERT_MSG_SIZE(mess_lsys_vm_getref);
1760 typedef struct {
1761 endpoint_t ret_pt;
1762 int is_more;
1763 uint8_t padding[48];
1764 } mess_lsys_vm_query_exit;
1765 _ASSERT_MSG_SIZE(mess_lsys_vm_query_exit);
1767 typedef struct {
1768 int what;
1769 endpoint_t ep;
1770 int count;
1771 void *ptr;
1772 vir_bytes next;
1773 uint8_t padding[36];
1774 } mess_lsys_vm_info;
1775 _ASSERT_MSG_SIZE(mess_lsys_vm_info);
1777 typedef struct {
1778 endpoint_t src;
1779 endpoint_t dst;
1780 uint8_t padding[48];
1781 } mess_lsys_vm_update;
1782 _ASSERT_MSG_SIZE(mess_lsys_vm_update);
1784 typedef struct {
1785 endpoint_t ep;
1786 uint8_t padding[52];
1787 } mess_lsys_vm_watch_exit;
1788 _ASSERT_MSG_SIZE(mess_lsys_vm_watch_exit);
1790 typedef struct {
1791 key_t key;
1792 size_t size;
1793 int flag;
1794 int retid;
1795 uint8_t padding[40];
1796 } mess_lc_ipc_shmget;
1797 _ASSERT_MSG_SIZE(mess_lc_ipc_shmget);
1799 typedef struct {
1800 int id;
1801 const void *addr;
1802 int flag;
1803 void *retaddr;
1804 uint8_t padding[40];
1805 } mess_lc_ipc_shmat;
1806 _ASSERT_MSG_SIZE(mess_lc_ipc_shmat);
1808 typedef struct {
1809 const void *addr;
1810 uint8_t padding[52];
1811 } mess_lc_ipc_shmdt;
1812 _ASSERT_MSG_SIZE(mess_lc_ipc_shmdt);
1814 typedef struct {
1815 int id;
1816 int cmd;
1817 void *buf;
1818 int ret;
1819 uint8_t padding[40];
1820 } mess_lc_ipc_shmctl;
1821 _ASSERT_MSG_SIZE(mess_lc_ipc_shmctl);
1823 typedef struct {
1824 key_t key;
1825 int nr;
1826 int flag;
1827 int retid;
1828 uint8_t padding[40];
1829 } mess_lc_ipc_semget;
1830 _ASSERT_MSG_SIZE(mess_lc_ipc_semget);
1832 typedef struct {
1833 int id;
1834 int num;
1835 int cmd;
1836 int opt;
1837 int ret;
1838 uint8_t padding[36];
1839 } mess_lc_ipc_semctl;
1840 _ASSERT_MSG_SIZE(mess_lc_ipc_semctl);
1842 typedef struct {
1843 int id;
1844 void *ops;
1845 unsigned int size;
1846 uint8_t padding[42];
1847 } mess_lc_ipc_semop;
1848 _ASSERT_MSG_SIZE(mess_lc_ipc_semop);
1850 typedef struct {
1851 endpoint_t m_source; /* who sent the message */
1852 int m_type; /* what kind of message is it */
1853 union {
1854 mess_u8 m_u8;
1855 mess_u16 m_u16;
1856 mess_u32 m_u32;
1857 mess_u64 m_u64;
1859 mess_1 m_m1;
1860 mess_2 m_m2;
1861 mess_3 m_m3;
1862 mess_4 m_m4;
1863 mess_5 m_m5;
1864 mess_7 m_m7;
1865 mess_8 m_m8;
1866 mess_9 m_m9;
1867 mess_10 m_m10;
1868 mess_11 m_m11;
1869 mess_mmap m_mmap;
1870 mess_notify m_notify;
1871 mess_sigcalls m_sigcalls;
1873 mess_input_tty_event m_input_tty_event;
1875 mess_krn_lsys_schedule m_krn_lsys_schedule;
1876 mess_krn_lsys_sys_fork m_krn_lsys_sys_fork;
1877 mess_krn_lsys_sys_getwhoami m_krn_lsys_sys_getwhoami;
1878 mess_krn_lsys_sys_irqctl m_krn_lsys_sys_irqctl;
1879 mess_krn_lsys_sys_times m_krn_lsys_sys_times;
1880 mess_krn_lsys_sys_trace m_krn_lsys_sys_trace;
1881 mess_krn_lsys_sys_umap m_krn_lsys_sys_umap;
1882 mess_krn_lsys_sys_vumap m_krn_lsys_sys_vumap;
1883 mess_krn_lsys_sys_devio m_krn_lsys_sys_devio;
1885 mess_fs_vfs_breadwrite m_fs_vfs_breadwrite;
1886 mess_fs_vfs_chmod m_fs_vfs_chmod;
1887 mess_fs_vfs_chown m_fs_vfs_chown;
1888 mess_fs_vfs_create m_fs_vfs_create;
1889 mess_fs_vfs_getdents m_fs_vfs_getdents;
1890 mess_fs_vfs_lookup m_fs_vfs_lookup;
1891 mess_fs_vfs_newnode m_fs_vfs_newnode;
1892 mess_fs_vfs_rdlink m_fs_vfs_rdlink;
1893 mess_fs_vfs_readsuper m_fs_vfs_readsuper;
1894 mess_fs_vfs_readwrite m_fs_vfs_readwrite;
1896 mess_i2c_li2cdriver_busc_i2c_exec m_i2c_li2cdriver_busc_i2c_exec;
1897 mess_i2c_li2cdriver_busc_i2c_reserve m_i2c_li2cdriver_busc_i2c_reserve;
1899 mess_input_linputdriver_input_conf m_input_linputdriver_input_conf;
1900 mess_input_linputdriver_setleds m_input_linputdriver_setleds;
1902 mess_lc_pm_exec m_lc_pm_exec;
1903 mess_lc_pm_exit m_lc_pm_exit;
1904 mess_lc_pm_getsid m_lc_pm_getsid;
1905 mess_lc_pm_groups m_lc_pm_groups;
1906 mess_lc_pm_itimer m_lc_pm_itimer;
1907 mess_lc_pm_mcontext m_lc_pm_mcontext;
1908 mess_lc_pm_priority m_lc_pm_priority;
1909 mess_lc_pm_ptrace m_lc_pm_ptrace;
1910 mess_lc_pm_reboot m_lc_pm_reboot;
1911 mess_lc_pm_rusage m_lc_pm_rusage;
1912 mess_lc_pm_setgid m_lc_pm_setgid;
1913 mess_lc_pm_setuid m_lc_pm_setuid;
1914 mess_lc_pm_sig m_lc_pm_sig;
1915 mess_lc_pm_sigset m_lc_pm_sigset;
1916 mess_lc_pm_sysuname m_lc_pm_sysuname;
1917 mess_lc_pm_time m_lc_pm_time;
1918 mess_lc_pm_waitpid m_lc_pm_waitpid;
1919 mess_lc_readclock_rtcdev m_lc_readclock_rtcdev;
1921 mess_lc_vfs_chown m_lc_vfs_chown;
1922 mess_lc_vfs_close m_lc_vfs_close;
1923 mess_lc_vfs_creat m_lc_vfs_creat;
1924 mess_lc_vfs_fchdir m_lc_vfs_fchdir;
1925 mess_lc_vfs_fchmod m_lc_vfs_fchmod;
1926 mess_lc_vfs_fcntl m_lc_vfs_fcntl;
1927 mess_lc_vfs_fstat m_lc_vfs_fstat;
1928 mess_lc_vfs_fsync m_lc_vfs_fsync;
1929 mess_lc_vfs_getvfsstat m_lc_vfs_getvfsstat;
1930 mess_lc_vfs_ioctl m_lc_vfs_ioctl;
1931 mess_lc_vfs_link m_lc_vfs_link;
1932 mess_lc_vfs_lseek m_lc_vfs_lseek;
1933 mess_lc_vfs_mknod m_lc_vfs_mknod;
1934 mess_lc_vfs_mount m_lc_vfs_mount;
1935 mess_lc_vfs_path m_lc_vfs_path;
1936 mess_lc_vfs_pipe2 m_lc_vfs_pipe2;
1937 mess_lc_vfs_readlink m_lc_vfs_readlink;
1938 mess_lc_vfs_readwrite m_lc_vfs_readwrite;
1939 mess_lc_vfs_rusage m_lc_vfs_rusage;
1940 mess_lc_vfs_select m_lc_vfs_select;
1941 mess_lc_vfs_stat m_lc_vfs_stat;
1942 mess_lc_vfs_statvfs1 m_lc_vfs_statvfs1;
1943 mess_lc_vfs_truncate m_lc_vfs_truncate;
1944 mess_lc_vfs_umask m_lc_vfs_umask;
1945 mess_lc_vfs_umount m_lc_vfs_umount;
1947 mess_lc_vm_rusage m_lc_vm_rusage;
1949 mess_lchardriver_vfs_reply m_lchardriver_vfs_reply;
1950 mess_lchardriver_vfs_sel1 m_lchardriver_vfs_sel1;
1951 mess_lchardriver_vfs_sel2 m_lchardriver_vfs_sel2;
1953 mess_lexec_pm_exec_new m_lexec_pm_exec_new;
1955 mess_li2cdriver_i2c_busc_i2c_exec m_li2cdriver_i2c_busc_i2c_exec;
1956 mess_li2cdriver_i2c_busc_i2c_reserve m_li2cdriver_i2c_busc_i2c_reserve;
1958 mess_linputdriver_input_event m_linputdriver_input_event;
1960 mess_lsys_getsysinfo m_lsys_getsysinfo;
1961 mess_lsys_fi_ctl m_lsys_fi_ctl;
1962 mess_lsys_fi_reply m_lsys_fi_reply;
1964 mess_lsys_krn_sys_devio m_lsys_krn_sys_devio;
1965 mess_lsys_krn_schedctl m_lsys_krn_schedctl;
1966 mess_lsys_krn_schedule m_lsys_krn_schedule;
1967 mess_lsys_krn_sys_abort m_lsys_krn_sys_abort;
1968 mess_lsys_krn_sys_clear m_lsys_krn_sys_clear;
1969 mess_lsys_krn_sys_copy m_lsys_krn_sys_copy;
1970 mess_lsys_krn_sys_exec m_lsys_krn_sys_exec;
1971 mess_lsys_krn_sys_fork m_lsys_krn_sys_fork;
1972 mess_lsys_krn_sys_getinfo m_lsys_krn_sys_getinfo;
1973 mess_lsys_krn_sys_getmcontext m_lsys_krn_sys_getmcontext;
1974 mess_lsys_krn_sys_iopenable m_lsys_krn_sys_iopenable;
1975 mess_lsys_krn_sys_irqctl m_lsys_krn_sys_irqctl;
1976 mess_lsys_krn_sys_memset m_lsys_krn_sys_memset;
1977 mess_lsys_krn_sys_privctl m_lsys_krn_sys_privctl;
1978 mess_lsys_krn_sys_sdevio m_lsys_krn_sys_sdevio;
1979 mess_lsys_krn_sys_setalarm m_lsys_krn_sys_setalarm;
1980 mess_lsys_krn_sys_setgrant m_lsys_krn_sys_setgrant;
1981 mess_lsys_krn_sys_setmcontext m_lsys_krn_sys_setmcontext;
1982 mess_lsys_krn_sys_statectl m_lsys_krn_sys_statectl;
1983 mess_lsys_krn_sys_stime m_lsys_krn_sys_stime;
1984 mess_lsys_krn_sys_settime m_lsys_krn_sys_settime;
1985 mess_lsys_krn_sys_times m_lsys_krn_sys_times;
1986 mess_lsys_krn_sys_trace m_lsys_krn_sys_trace;
1987 mess_lsys_krn_sys_umap m_lsys_krn_sys_umap;
1988 mess_lsys_krn_sys_vdevio m_lsys_krn_sys_vdevio;
1989 mess_lsys_krn_sys_vumap m_lsys_krn_sys_vumap;
1991 mess_lsys_pci_busc_get_bar m_lsys_pci_busc_get_bar;
1993 mess_lsys_pm_getepinfo m_lsys_pm_getepinfo;
1994 mess_lsys_pm_getprocnr m_lsys_pm_getprocnr;
1995 mess_lsys_pm_srv_fork m_lsys_pm_srv_fork;
1997 mess_lsys_sched_scheduling_start m_lsys_sched_scheduling_start;
1998 mess_lsys_sched_scheduling_stop m_lsys_sched_scheduling_stop;
2000 mess_lsys_svrctl m_lsys_svrctl;
2002 mess_lsys_tty_fkey_ctl m_lsys_tty_fkey_ctl;
2004 mess_lsys_vfs_checkperms m_lsys_vfs_checkperms;
2005 mess_lsys_vfs_copyfd m_lsys_vfs_copyfd;
2006 mess_lsys_vfs_mapdriver m_lsys_vfs_mapdriver;
2008 mess_net_netdrv_dl_conf m_net_netdrv_dl_conf;
2009 mess_net_netdrv_dl_getstat_s m_net_netdrv_dl_getstat_s;
2010 mess_net_netdrv_dl_readv_s m_net_netdrv_dl_readv_s;
2011 mess_net_netdrv_dl_writev_s m_net_netdrv_dl_writev_s;
2013 mess_netdrv_net_dl_conf m_netdrv_net_dl_conf;
2014 mess_netdrv_net_dl_task m_netdrv_net_dl_task;
2016 mess_pci_lsys_busc_get_bar m_pci_lsys_busc_get_bar;
2018 mess_pm_lexec_exec_new m_pm_lexec_exec_new;
2020 mess_pm_lc_getgid m_pm_lc_getgid;
2021 mess_pm_lc_getpid m_pm_lc_getpid;
2022 mess_pm_lc_getuid m_pm_lc_getuid;
2023 mess_pm_lc_ptrace m_pm_lc_ptrace;
2024 mess_pm_lc_sigset m_pm_lc_sigset;
2025 mess_pm_lc_time m_pm_lc_time;
2026 mess_pm_lc_waitpid m_pm_lc_waitpid;
2028 mess_pm_lsys_getepinfo m_pm_lsys_getepinfo;
2029 mess_pm_lsys_getprocnr m_pm_lsys_getprocnr;
2031 mess_pm_sched_scheduling_set_nice m_pm_sched_scheduling_set_nice;
2033 mess_readclock_lc_rtcdev m_readclock_lc_rtcdev;
2035 mess_rs_pm_exec_restart m_rs_pm_exec_restart;
2036 mess_rs_pm_srv_kill m_rs_pm_srv_kill;
2038 mess_sched_lsys_scheduling_start m_sched_lsys_scheduling_start;
2040 mess_tty_lsys_fkey_ctl m_tty_lsys_fkey_ctl;
2042 mess_vfs_fs_breadwrite m_vfs_fs_breadwrite;
2043 mess_vfs_fs_chmod m_vfs_fs_chmod;
2044 mess_vfs_fs_chown m_vfs_fs_chown;
2045 mess_vfs_fs_create m_vfs_fs_create;
2046 mess_vfs_fs_flush m_vfs_fs_flush;
2047 mess_vfs_fs_ftrunc m_vfs_fs_ftrunc;
2048 mess_vfs_fs_getdents m_vfs_fs_getdents;
2049 mess_vfs_fs_inhibread m_vfs_fs_inhibread;
2050 mess_vfs_fs_link m_vfs_fs_link;
2051 mess_vfs_fs_lookup m_vfs_fs_lookup;
2052 mess_vfs_fs_mkdir m_vfs_fs_mkdir;
2053 mess_vfs_fs_mknod m_vfs_fs_mknod;
2054 mess_vfs_fs_mountpoint m_vfs_fs_mountpoint;
2055 mess_vfs_fs_newnode m_vfs_fs_newnode;
2056 mess_vfs_fs_new_driver m_vfs_fs_new_driver;
2057 mess_vfs_fs_putnode m_vfs_fs_putnode;
2058 mess_vfs_fs_rdlink m_vfs_fs_rdlink;
2059 mess_vfs_fs_readsuper m_vfs_fs_readsuper;
2060 mess_vfs_fs_rename m_vfs_fs_rename;
2061 mess_vfs_fs_readwrite m_vfs_fs_readwrite;
2062 mess_vfs_fs_slink m_vfs_fs_slink;
2063 mess_vfs_fs_stat m_vfs_fs_stat;
2064 mess_vfs_fs_statvfs m_vfs_fs_statvfs;
2065 mess_vfs_fs_unlink m_vfs_fs_unlink;
2066 mess_vfs_fs_utime m_vfs_fs_utime;
2068 mess_vfs_lc_lseek m_vfs_lc_lseek;
2070 mess_lsys_vm_vmremap m_lsys_vm_vmremap;
2071 mess_lsys_vm_getref m_lsys_vm_getref;
2072 mess_lc_vm_getphys m_lc_vm_getphys;
2073 mess_lc_vm_shm_unmap m_lc_vm_shm_unmap;
2074 mess_lsys_vm_query_exit m_lsys_vm_query_exit;
2075 mess_lsys_vm_info m_lsys_vm_info;
2076 mess_lsys_vm_update m_lsys_vm_update;
2077 mess_lsys_vm_watch_exit m_lsys_vm_watch_exit;
2078 mess_lc_ipc_shmget m_lc_ipc_shmget;
2079 mess_lc_ipc_shmat m_lc_ipc_shmat;
2080 mess_lc_ipc_shmdt m_lc_ipc_shmdt;
2081 mess_lc_ipc_shmctl m_lc_ipc_shmctl;
2082 mess_lc_ipc_semget m_lc_ipc_semget;
2083 mess_lc_ipc_semctl m_lc_ipc_semctl;
2084 mess_lc_ipc_semop m_lc_ipc_semop;
2085 mess_lc_vm_brk m_lc_vm_brk;
2087 mess_vfs_lchardriver_cancel m_vfs_lchardriver_cancel;
2088 mess_vfs_lchardriver_openclose m_vfs_lchardriver_openclose;
2089 mess_vfs_lchardriver_readwrite m_vfs_lchardriver_readwrite;
2090 mess_vfs_lchardriver_select m_vfs_lchardriver_select;
2092 mess_vfs_utimens m_vfs_utimens;
2093 mess_vm_vfs_mmap m_vm_vfs_mmap;
2094 mess_vmmcp m_vmmcp;
2095 mess_vmmcp_reply m_vmmcp_reply;
2097 u8_t size[56]; /* message payload may have 56 bytes at most */
2099 } message __aligned(16);
2101 /* Ensure the complete union respects the IPC assumptions. */
2102 typedef int _ASSERT_message[/* CONSTCOND */sizeof(message) == 64 ? 1 : -1];
2104 /* The following defines provide names for useful members. */
2105 #define m1_i1 m_m1.m1i1
2106 #define m1_i2 m_m1.m1i2
2107 #define m1_i3 m_m1.m1i3
2108 #define m1_p1 m_m1.m1p1
2109 #define m1_p2 m_m1.m1p2
2110 #define m1_p3 m_m1.m1p3
2111 #define m1_p4 m_m1.m1p4
2112 #define m1_ull1 m_m1.m1ull1
2114 #define m2_ll1 m_m2.m2ll1
2115 #define m2_i1 m_m2.m2i1
2116 #define m2_i2 m_m2.m2i2
2117 #define m2_i3 m_m2.m2i3
2118 #define m2_l1 m_m2.m2l1
2119 #define m2_l2 m_m2.m2l2
2120 #define m2_p1 m_m2.m2p1
2121 #define m2_sigset m_m2.sigset
2123 #define m2_s1 m_m2.m2s1
2125 #define m3_i1 m_m3.m3i1
2126 #define m3_i2 m_m3.m3i2
2127 #define m3_p1 m_m3.m3p1
2128 #define m3_ca1 m_m3.m3ca1
2130 #define m4_ll1 m_m4.m4ll1
2131 #define m4_l1 m_m4.m4l1
2132 #define m4_l2 m_m4.m4l2
2133 #define m4_l3 m_m4.m4l3
2134 #define m4_l4 m_m4.m4l4
2135 #define m4_l5 m_m4.m4l5
2137 #define m5_s1 m_m5.m5s1
2138 #define m5_s2 m_m5.m5s2
2139 #define m5_i1 m_m5.m5i1
2140 #define m5_i2 m_m5.m5i2
2141 #define m5_l1 m_m5.m5l1
2142 #define m5_l2 m_m5.m5l2
2143 #define m5_l3 m_m5.m5l3
2145 #define m7_i1 m_m7.m7i1
2146 #define m7_i2 m_m7.m7i2
2147 #define m7_i3 m_m7.m7i3
2148 #define m7_i4 m_m7.m7i4
2149 #define m7_i5 m_m7.m7i5
2150 #define m7_p1 m_m7.m7p1
2151 #define m7_p2 m_m7.m7p2
2153 #define m8_i1 m_m8.m8i1
2154 #define m8_i2 m_m8.m8i2
2155 #define m8_p1 m_m8.m8p1
2156 #define m8_p2 m_m8.m8p2
2157 #define m8_p3 m_m8.m8p3
2158 #define m8_p4 m_m8.m8p4
2160 #define m9_l1 m_m9.m9l1
2161 #define m9_l2 m_m9.m9l2
2162 #define m9_l3 m_m9.m9l3
2163 #define m9_l4 m_m9.m9l4
2164 #define m9_l5 m_m9.m9l5
2165 #define m9_s1 m_m9.m9s1
2166 #define m9_s2 m_m9.m9s2
2167 #define m9_s3 m_m9.m9s3
2168 #define m9_s4 m_m9.m9s4
2169 #define m9_ull1 m_m9.m9ull1
2170 #define m9_ull2 m_m9.m9ull2
2172 #define m10_i1 m_m10.m10i1
2173 #define m10_i2 m_m10.m10i2
2174 #define m10_i3 m_m10.m10i3
2175 #define m10_i4 m_m10.m10i4
2176 #define m10_l1 m_m10.m10l1
2177 #define m10_l2 m_m10.m10l2
2178 #define m10_l3 m_m10.m10l3
2179 #define m10_ull1 m_m10.m10ull1
2181 #define m11_i1 m_m11.m11i1
2182 #define m11_s1 m_m11.m11s1
2183 #define m11_s2 m_m11.m11s2
2184 #define m11_s3 m_m11.m11s3
2185 #define m11_s4 m_m11.m11s4
2186 #define m11_p1 m_m11.m11p1
2187 #define m11_p2 m_m11.m11p2
2188 #define m11_p3 m_m11.m11p3
2189 #define m11_p4 m_m11.m11p4
2191 /*==========================================================================*
2192 * Minix run-time system (IPC). *
2193 *==========================================================================*/
2195 /* Datastructure for asynchronous sends */
2196 typedef struct asynmsg
2198 unsigned flags;
2199 endpoint_t dst;
2200 int result;
2201 message msg;
2202 } asynmsg_t;
2204 /* Defines for flags field */
2205 #define AMF_EMPTY 000 /* slot is not inuse */
2206 #define AMF_VALID 001 /* slot contains message */
2207 #define AMF_DONE 002 /* Kernel has processed the message. The
2208 * result is stored in 'result'
2210 #define AMF_NOTIFY 004 /* Send a notification when AMF_DONE is set */
2211 #define AMF_NOREPLY 010 /* Not a reply message for a SENDREC */
2212 #define AMF_NOTIFY_ERR 020 /* Send a notification when AMF_DONE is set and
2213 * delivery of the message failed */
2215 int _ipc_send_intr(endpoint_t dest, message *m_ptr);
2216 int _ipc_receive_intr(endpoint_t src, message *m_ptr, int *status_ptr);
2217 int _ipc_sendrec_intr(endpoint_t src_dest, message *m_ptr);
2218 int _ipc_sendnb_intr(endpoint_t dest, message *m_ptr);
2219 int _ipc_notify_intr(endpoint_t dest);
2220 int _ipc_senda_intr(asynmsg_t *table, size_t count);
2222 int _do_kernel_call_intr(message *m_ptr);
2224 int get_minix_kerninfo(struct minix_kerninfo **);
2226 /* Hide names to avoid name space pollution. */
2227 #define ipc_notify _ipc_notify
2228 #define ipc_sendrec _ipc_sendrec
2229 #define ipc_receive _ipc_receive
2230 #define ipc_receivenb _ipc_receivenb
2231 #define ipc_send _ipc_send
2232 #define ipc_sendnb _ipc_sendnb
2233 #define ipc_senda _ipc_senda
2235 #define do_kernel_call _do_kernel_call
2237 struct minix_ipcvecs {
2238 int (*send)(endpoint_t dest, message *m_ptr);
2239 int (*receive)(endpoint_t src, message *m_ptr, int *st);
2240 int (*sendrec)(endpoint_t src_dest, message *m_ptr);
2241 int (*sendnb)(endpoint_t dest, message *m_ptr);
2242 int (*notify)(endpoint_t dest);
2243 int (*do_kernel_call)(message *m_ptr);
2244 int (*senda)(asynmsg_t *table, size_t count);
2247 /* kernel-set IPC vectors retrieved by a constructor in libc/sys-minix/init.c */
2248 extern struct minix_ipcvecs _minix_ipcvecs;
2250 static inline int _ipc_send(endpoint_t dest, message *m_ptr)
2252 return _minix_ipcvecs.send(dest, m_ptr);
2255 static inline int _ipc_receive(endpoint_t src, message *m_ptr, int *st)
2257 return _minix_ipcvecs.receive(src, m_ptr, st);
2260 static inline int _ipc_sendrec(endpoint_t src_dest, message *m_ptr)
2262 return _minix_ipcvecs.sendrec(src_dest, m_ptr);
2265 static inline int _ipc_sendnb(endpoint_t dest, message *m_ptr)
2267 return _minix_ipcvecs.sendnb(dest, m_ptr);
2270 static inline int _ipc_notify(endpoint_t dest)
2272 return _minix_ipcvecs.notify(dest);
2275 static inline int _do_kernel_call(message *m_ptr)
2277 return _minix_ipcvecs.do_kernel_call(m_ptr);
2280 static inline int _ipc_senda(asynmsg_t *table, size_t count)
2282 return _minix_ipcvecs.senda(table, count);
2285 #endif /* _IPC_H */