Back to index

plt-scheme  4.2.1
Defines
gc_inl.h File Reference
#include "private/gc_priv.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define GC_MALLOC_WORDS(result, n)
#define GC_MALLOC_ATOMIC_WORDS(result, n)
#define GC_CONS(result, first, second)

Define Documentation

#define GC_CONS (   result,
  first,
  second 
)
Value:
{      \
    register ptr_t op;      \
    register ptr_t *opp;    \
    DCL_LOCK_STATE;  \
       \
    opp = &(GC_objfreelist[2]);    \
    FASTLOCK();      \
    if( !FASTLOCK_SUCCEEDED() || (op = *opp) == 0 ) {   \
        FASTUNLOCK();       \
        op = GC_generic_malloc_words_small(2, NORMAL);  \
    } else {  \
        *opp = obj_link(op);       \
        GC_words_allocd += 2;      \
        FASTUNLOCK();       \
    } \
    ((word *)op)[0] = (word)(first);      \
    ((word *)op)[1] = (word)(second);     \
    (result) = (GC_PTR) op; \
}

Definition at line 88 of file gc_inl.h.

#define GC_MALLOC_ATOMIC_WORDS (   result,
 
)
Value:
{      \
    register ptr_t op;      \
    register ptr_t *opp;    \
    DCL_LOCK_STATE;  \
       \
    opp = &(GC_aobjfreelist[n]);   \
    FASTLOCK();      \
    if( !FASTLOCK_SUCCEEDED() || (op = *opp) == 0 ) {   \
        FASTUNLOCK();       \
        (result) = GC_generic_malloc_words_small((n), PTRFREE);       \
    } else {  \
        *opp = obj_link(op);       \
        obj_link(op) = 0;   \
        GC_words_allocd += (n);    \
        FASTUNLOCK();       \
        (result) = (GC_PTR) op;    \
    }  \
}

Definition at line 67 of file gc_inl.h.

#define GC_MALLOC_WORDS (   result,
 
)
Value:
{      \
    register ptr_t op;      \
    register ptr_t *opp;    \
    DCL_LOCK_STATE;  \
       \
    opp = &(GC_objfreelist[n]);    \
    FASTLOCK();      \
    if( !FASTLOCK_SUCCEEDED() || (op = *opp) == 0 ) {   \
        FASTUNLOCK();       \
        (result) = GC_generic_malloc_words_small((n), NORMAL); \
    } else {  \
        *opp = obj_link(op);       \
        obj_link(op) = 0;   \
        GC_words_allocd += (n);    \
        FASTUNLOCK();       \
        (result) = (GC_PTR) op;    \
    }  \
}

Definition at line 45 of file gc_inl.h.