Changeset 10931


Ignore:
Timestamp:
Oct 1, 2008, 12:10:56 AM (11 years ago)
Author:
gb
Message:

Add an "allocated" field to the x8632 TCR. Windows doesn't offer
a good way to align allocated memory, so we do it manually (and
use tcr.allocated to keep track of the pointer returned by
malloc/calloc.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-constants32.h

    r10731 r10931  
    397397
    398398typedef struct tcr {
    399     struct tcr *next;
    400     struct tcr *prev;
    401     natural node_regs_mask; /* bit set means correspnding reg contains node */
    402     struct tcr *linear;
     399  struct tcr *next;
     400  struct tcr *prev;
     401  natural node_regs_mask; /* bit set means correspnding reg contains node */
     402  struct tcr *linear;
    403403  /* this spill area must be 16-byte aligned */
    404     LispObj save0;              /* spill area for node registers */
    405     LispObj save1;
    406     LispObj save2;
    407     LispObj save3;
    408     LispObj *save_ebp;          /* EBP when in foreign code */
    409     u32_t lisp_mxcsr;
    410     u32_t foreign_mxcsr;
    411     special_binding *db_link;     /* special binding chain head */
    412     LispObj catch_top;            /* top catch frame */
    413     LispObj *save_vsp;            /* VSP when in foreign code */
    414     LispObj *save_tsp;            /* TSP when in foreign code */
    415     LispObj *foreign_sp;
    416     struct area *cs_area;               /* cstack area pointer */
    417     struct area *vs_area;               /* vstack area pointer */
    418     struct area *ts_area;               /* tstack area pointer */
    419     LispObj cs_limit;                   /* stack overflow limit */
    420     natural bytes_allocated;
    421     natural bytes_consed_high;
    422     natural log2_allocation_quantum;      /* for per-thread consing */
    423     signed_natural interrupt_pending;     /* pending interrupt flag */
    424     xframe_list *xframe;          /* exception-frame linked list */
    425     int *errno_loc;               /* per-thread (?) errno location */
    426     LispObj ffi_exception;        /* fpscr bits from ff-call */
    427     LispObj osid;                 /* OS thread id */
    428     signed_natural valence;       /* odd when in foreign code */
    429     signed_natural foreign_exception_status; /* non-zero -> call lisp_exit_hook */
    430     void *native_thread_info;                /* platform-dependent */
    431     void *native_thread_id;     /* mach_thread_t, pid_t, etc. */
    432     void *last_allocptr;
    433     void *save_allocptr;
    434     void *save_allocbase;
    435     void *reset_completion;
    436     void *activate;
    437     signed_natural suspend_count;
    438     ExceptionInformation *suspend_context;
    439     ExceptionInformation *pending_exception_context;
    440     void *suspend;                /* suspension semaphore */
    441     void *resume;                 /* resumption semaphore */
    442     natural flags;
    443     ExceptionInformation *gc_context;
    444     void *termination_semaphore;
    445     signed_natural unwinding;
    446     natural tlb_limit;
    447     LispObj *tlb_pointer;
    448     natural shutdown_count;
    449     LispObj *next_tsp;
    450     void *safe_ref_address;
    451     sel_t ldt_selector;
    452     natural scratch_mxcsr;
    453     natural unboxed0;
    454     natural unboxed1;
    455     LispObj next_method_context; /* used in lieu of register */
    456     natural save_eflags;
     404  LispObj save0;                /* spill area for node registers */
     405  LispObj save1;
     406  LispObj save2;
     407  LispObj save3;
     408  LispObj *save_ebp;            /* EBP when in foreign code */
     409  u32_t lisp_mxcsr;
     410  u32_t foreign_mxcsr;
     411  special_binding *db_link;     /* special binding chain head */
     412  LispObj catch_top;            /* top catch frame */
     413  LispObj *save_vsp;              /* VSP when in foreign code */
     414  LispObj *save_tsp;              /* TSP when in foreign code */
     415  LispObj *foreign_sp;
     416  struct area *cs_area;         /* cstack area pointer */
     417  struct area *vs_area;         /* vstack area pointer */
     418  struct area *ts_area;         /* tstack area pointer */
     419  LispObj cs_limit;                     /* stack overflow limit */
     420  natural bytes_allocated;
     421  natural bytes_consed_high;
     422  natural log2_allocation_quantum;      /* for per-thread consing */
     423  signed_natural interrupt_pending;     /* pending interrupt flag */
     424  xframe_list *xframe;    /* exception-frame linked list */
     425  int *errno_loc;               /* per-thread (?) errno location */
     426  LispObj ffi_exception;        /* fpscr bits from ff-call */
     427  LispObj osid;                 /* OS thread id */
     428  signed_natural valence;         /* odd when in foreign code */
     429  signed_natural foreign_exception_status; /* non-zero -> call lisp_exit_hook */
     430  void *native_thread_info;                  /* platform-dependent */
     431  void *native_thread_id;       /* mach_thread_t, pid_t, etc. */
     432  void *last_allocptr;
     433  void *save_allocptr;
     434  void *save_allocbase;
     435  void *reset_completion;
     436  void *activate;
     437  signed_natural suspend_count;
     438  ExceptionInformation *suspend_context;
     439  ExceptionInformation *pending_exception_context;
     440  void *suspend;                /* suspension semaphore */
     441  void *resume;                 /* resumption semaphore */
     442  natural flags;
     443  ExceptionInformation *gc_context;
     444  void *termination_semaphore;
     445  signed_natural unwinding;
     446  natural tlb_limit;
     447  LispObj *tlb_pointer;
     448  natural shutdown_count;
     449  LispObj *next_tsp;
     450  void *safe_ref_address;
     451  sel_t ldt_selector;
     452  natural scratch_mxcsr;
     453  natural unboxed0;
     454  natural unboxed1;
     455  LispObj next_method_context; /* used in lieu of register */
     456  natural save_eflags;
     457  void *allocated;
    457458} TCR;
    458459
Note: See TracChangeset for help on using the changeset viewer.