Annotation of 41BSD/libc/gen/mpx.c, revision 1.1.1.1

1.1       root        1: #include <sys/param.h>
                      2: #include <sys/tty.h>
                      3: #include <sys/mx.h>
                      4: 
                      5: static struct mx_args vec;
                      6: int    mpxcall();
                      7: 
                      8: 
                      9: mpx(name,mode)
                     10: char *name;
                     11: {
                     12:        if (name && *name) {
                     13:                vec.m_name = name;
                     14:                vec.m_arg[1] = mode;
                     15:                return(mpxcall(MPX, &vec));
                     16:        } else
                     17:                return(mpxcall(MPXN, 0));
                     18: }
                     19: 
                     20: chan(gr)
                     21: {
                     22:        vec.m_arg[1] = gr;
                     23:        return(mpxcall(CHAN, &vec));
                     24: }
                     25: 
                     26: join(fd,ch)
                     27: {
                     28:        vec.m_arg[0] = fd;
                     29:        vec.m_arg[1] = ch;
                     30:        return(mpxcall(JOIN, &vec));
                     31: }
                     32: 
                     33: connect(fd,ch,side)
                     34: {
                     35:        vec.m_arg[0] = fd;
                     36:        vec.m_arg[1] = ch;
                     37:        vec.m_arg[2] = side;
                     38:        return(mpxcall(CONNECT, &vec));
                     39: }
                     40: 
                     41: attach(sub,gp)
                     42: {
                     43:        vec.m_arg[0] = sub;
                     44:        vec.m_arg[1] = gp;
                     45:        return(mpxcall(ATTACH, &vec));
                     46: }
                     47: 
                     48: detach(sub,gp)
                     49: {
                     50:        vec.m_arg[0] = sub;
                     51:        vec.m_arg[1] = gp;
                     52:        return(mpxcall(DETACH, &vec));
                     53: }
                     54: 
                     55: extract(sub,ch,side)
                     56: {
                     57:        vec.m_arg[0] = sub;
                     58:        vec.m_arg[1] = ch;
                     59:        vec.m_arg[2] = 1 /* side */;    /* 0 seems to be useless */
                     60:        return(mpxcall(EXTR, &vec));
                     61: }
                     62: 
                     63: debug(var,val)
                     64: {
                     65:        vec.m_arg[0] = var;
                     66:        vec.m_arg[1] = val;
                     67:        return(mpxcall(DEBUG, &vec));
                     68: }
                     69: 
                     70: npgrp(ch, gfd, pid)
                     71: {
                     72:        vec.m_arg[0] = ch;
                     73:        vec.m_arg[1] = gfd;
                     74:        vec.m_arg[2] = pid;
                     75:        return(mpxcall(NPGRP, &vec));
                     76: }
                     77: ckill(index,gp,sig)
                     78: {
                     79:        vec.m_arg[0] = index;
                     80:        vec.m_arg[1] = gp;
                     81:        vec.m_arg[2] = sig;
                     82:        return(mpxcall(CSIG, &vec));
                     83: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.