BSD 4_1c_2 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Thu, 16 Dec 1982 11:34:34 +0000 (03:34 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Thu, 16 Dec 1982 11:34:34 +0000 (03:34 -0800)
Work on file a/sys/h/mu_msg.h
Work on file a/sys/h/types.h

Synthesized-from: CSRG/cd1/4.1c.2

a/sys/h/mu_msg.h [new file with mode: 0644]
a/sys/h/types.h [new file with mode: 0644]

diff --git a/a/sys/h/mu_msg.h b/a/sys/h/mu_msg.h
new file mode 100644 (file)
index 0000000..daab872
--- /dev/null
@@ -0,0 +1,62 @@
+/*     mu_msg.h        Melb 4.2        82/10/20        */
+
+/*
+ * Melb Uni trivial IPC mechanism
+ */
+
+#ifdef MUSH
+#ifndef        DATA_T          /* so people can make a union/struct if they want */
+#define        DATA_T  long
+#endif
+
+typedef        struct {
+#ifdef vax             /* this isn't important, just nice */
+       u_short msg_uid : 15;   /* effective sender uid (or code if pid==0) */
+       u_short msg_val : 1;    /* msg is valid, ie: really sent by someone */
+       u_short msg_pid : 15;   /* rcv: proc id of sender, snd: dest addr */
+       u_short msg_rply: 1;    /* rcv: reply required, snd: recv reply only */
+#else
+       u_short msg_rply: 1;
+       u_short msg_pid : 15;
+       u_short msg_val : 1;
+       u_short msg_uid : 15;
+#endif
+       DATA_T  msg_data;
+} mmsgbuf;
+
+/*
+ * The following relate to the mu_msg() sys call
+ */
+
+typedef enum {
+       MSG_ENAB,               /* enable input msgs to process */
+       MSG_DISB,               /* no more messages */
+       MSG_RECV,               /* get a message */
+       MSG_SEND,               /* send a message */
+       MSG_SNDW,               /* send a msg then get one */
+       MSG_RPLY,               /* send a reply */
+} msg_type;
+
+#define        MSG_W_RCV       0x0001  /* wait for message to be received */
+#define        MSG_W_POST      0x0002  /* wait till queued to receiver */
+#define        MSG_W_DLV       0x0004  /* wait till delivered (not impl) */
+#define        MSG_W_Q         0x0008  /* wait if process queues full (not impl) */
+#define        MSG_W_ENAB      0x0010  /* wait till rcvr enables messages (not impl) */
+
+#ifdef KERNEL
+       /*
+        * Some of this stuff belongs other places, but ...
+        */
+#define MSGENAB                0x0001  /* process has messages enabled */
+#define        MSGOK           0x0002  /* process is waiting for msg */
+#define        MSGWRPLY        0x0004  /* message process is waiting for is a reply */
+#define        MSGRPLY         0x0008  /* process must reply to last msg */
+#define        MSGWAIT         0x0010  /* some process is waiting on our msgbuf */
+
+#define        MSGPRI  (PZERO+4)       /* Interruptible */
+
+struct proc *mu_send();
+#endif
+
+#define        SIGMESG         28      /* sig sent to MSGENAB'd proc if msg arrives */
+#endif
diff --git a/a/sys/h/types.h b/a/sys/h/types.h
new file mode 100644 (file)
index 0000000..fbaf174
--- /dev/null
@@ -0,0 +1,43 @@
+/*     types.h 4.9     82/11/13        */
+
+/*
+ * Basic system types and major/minor device constructing/busting macros.
+ */
+
+/* major part of a device */
+#define        major(x)        ((int)(((unsigned)(x)>>8)&0377))
+
+/* minor part of a device */
+#define        minor(x)        ((int)((x)&0377))
+
+/* make a device number */
+#define        makedev(x,y)    ((dev_t)(((x)<<8) | (y)))
+
+typedef        unsigned char   u_char;
+typedef        unsigned short  u_short;
+typedef        unsigned int    u_int;
+typedef        unsigned long   u_long;
+
+#ifdef vax
+typedef        struct  _physadr { int r[1]; } *physadr;
+typedef        struct  label_t {
+       int     val[14];
+} label_t;
+#endif
+#ifdef sun
+typedef        struct  _physadr { short r[1]; } *physadr;
+typedef        struct  label_t {
+       int     val[13];
+} label_t;
+#endif
+typedef        struct  _quad { long val[2]; } quad;
+typedef        long    daddr_t;
+typedef        char *  caddr_t;
+typedef        u_long  ino_t;
+typedef        long    swblk_t;
+typedef        int     size_t;
+typedef        int     time_t;
+typedef        short   dev_t;
+typedef        int     off_t;
+
+typedef        struct  fd_set { int fds_bits[1]; } fd_set;