Annotation of researchv9/sys.vax/h/inline.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Definitions of inlines, and macro replacements
                      3:  * for them if UNFAST (latter only scantily tested).
                      4:  */
                      5: 
                      6: #ifndef UNFAST
                      7: 
                      8: #define        plock(ip) \
                      9: { \
                     10:        while ((ip)->i_flag & ILOCK) { \
                     11:                (ip)->i_flag |= IWANT; \
                     12:                sleep((caddr_t)(ip), PINOD); \
                     13:        } \
                     14:        (ip)->i_flag |= ILOCK; \
                     15: }
                     16: 
                     17: #define        prele(ip) \
                     18: { \
                     19:        (ip)->i_flag &= ~ILOCK; \
                     20:        if ((ip)->i_flag&IWANT) { \
                     21:                (ip)->i_flag &= ~IWANT; \
                     22:                wakeup((caddr_t)(ip)); \
                     23:        } \
                     24: }
                     25: 
                     26: #define        GETF(fp, fd) { \
                     27:        if ((unsigned)(fd) >= NOFILE || ((fp) = u.u_ofile[fd]) == NULL) { \
                     28:                u.u_error = EBADF; \
                     29:                return; \
                     30:        } \
                     31: }
                     32: 
                     33: #define        IUPDAT(ip, t1, t2, waitfor) { \
                     34:        if (ip->i_flag&(IUPD|IACC|ICHG)) \
                     35:                iupdat(ip, t1, t2, waitfor); \
                     36: }
                     37: #define        ISSIG(p)        ((p)->p_sig && \
                     38:        ((p)->p_flag&STRC || ((p)->p_sig &~ (p)->p_ignsig)) && issig())
                     39: #else
                     40: 
                     41: #define        GETF(fp, fd) { \
                     42:        (fp) = getf(fd); \
                     43:        if ((fp) == NULL) \
                     44:                return; \
                     45: }
                     46: 
                     47: #define        IUPDAT(ip, t1, t2, waitfor)     iupdat(ip, t1, t2, waitfor)
                     48: 
                     49: #define        ISSIG(p)        issig(p)
                     50: #endif

unix.superglobalmegacorp.com

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