Annotation of coherent/a/usr/include/sys/alloc.h, revision 1.1.1.1

1.1       root        1: /* (-lgl
                      2:  *     COHERENT Version 3.0
                      3:  *     Copyright (c) 1982, 1990 by Mark Williams Company.
                      4:  *     All rights reserved. May not be copied without permission.
                      5:  -lgl) */
                      6: /*
                      7:  * Allocator.
                      8:  */
                      9: #ifndef         ALLOC_H
                     10: #define         ALLOC_H
                     11: 
                     12: /*
                     13:  * Structure for allocator.
                     14:  */
                     15: typedef struct all {
                     16:        union all_u {
                     17:                char    *au_link;
                     18:                char    au_free[2];
                     19:        }       a_union;
                     20:        char    a_data[];
                     21: } ALL;
                     22: 
                     23: /*
                     24:  * Macros to transparently access allocator union.
                     25:  */
                     26: #define        a_link  a_union.au_link
                     27: #define        a_free  a_union.au_free
                     28: 
                     29: #if 0
                     30: /*
                     31:  * Portable defines for the allocator.
                     32:  */
                     33: #define align(p)       ((ALL *)NULL + ((p) - (ALL *)NULL))
                     34: #define link(p)                (align((p)->a_link))
                     35: #define        tstfree(p)      ((p)->a_link == (char *) link(p))
                     36: #define setfree(p)     ((p)->a_link = (char *) link(p))
                     37: #define setused(p)     ((p)->a_link = (char *) link(p) + 1)
                     38: 
                     39: #endif
                     40: 
                     41: #ifdef KERNEL
                     42: /*
                     43:  * Functions and externals.
                     44:  */
                     45: extern char    *alloc();
                     46: extern ALL     *setarena();
                     47: 
                     48: #endif
                     49: 
                     50: #endif

unix.superglobalmegacorp.com

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