Changeset 9852 for release/1.2


Ignore:
Timestamp:
Jun 30, 2008, 3:08:20 PM (11 years ago)
Author:
gb
Message:

From trunk: treat stack sizes as "natural" integers.

Location:
release/1.2/source/lisp-kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/1.2/source/lisp-kernel/Threads.h

    r8547 r9852  
    216216extern int thread_suspend_signal, thread_resume_signal;
    217217
     218void *
     219allocate_stack(natural);
     220
    218221void
    219222suspend_resume_handler(int, siginfo_t *, ExceptionInformation *);
  • release/1.2/source/lisp-kernel/pmcl-kernel.c

    r9056 r9852  
    188188
    189189BytePtr
    190 allocate_lisp_stack(unsigned useable,
     190allocate_lisp_stack(natural useable,
    191191                    unsigned softsize,
    192192                    unsigned hardsize,
     
    198198                    protected_area_ptr *hardp)
    199199{
    200   void *allocate_stack(unsigned);
     200  void *allocate_stack(natural);
    201201  void free_stack(void *);
    202202  natural size = useable+softsize+hardsize;
     
    248248area *
    249249allocate_lisp_stack_area(area_code stack_type,
    250                          unsigned useable,
     250                         natural usable,
    251251                         unsigned softsize,
    252252                         unsigned hardsize,
     
    260260  protected_area_ptr soft_area=NULL, hard_area=NULL;
    261261
    262   bottom = allocate_lisp_stack(useable,
     262  bottom = allocate_lisp_stack(usable,
    263263                               softsize,
    264264                               hardsize,
     
    301301
    302302area*
    303 allocate_vstack_holding_area_lock(unsigned usable)
     303allocate_vstack_holding_area_lock(natural usable)
    304304{
    305305  return allocate_lisp_stack_area(AREA_VSTACK,
     
    313313
    314314area *
    315 allocate_tstack_holding_area_lock(unsigned usable)
     315allocate_tstack_holding_area_lock(natural usable)
    316316{
    317317  return allocate_lisp_stack_area(AREA_TSTACK,
  • release/1.2/source/lisp-kernel/thread_manager.c

    r8547 r9852  
    734734{
    735735  extern area
    736     *allocate_vstack_holding_area_lock(unsigned),
    737     *allocate_tstack_holding_area_lock(unsigned);
     736    *allocate_vstack_holding_area_lock(natural),
     737    *allocate_tstack_holding_area_lock(natural);
    738738  area *a;
    739739  int i;
     
    972972#else
    973973Ptr
    974 create_stack(int size)
     974create_stack(natural size)
    975975{
    976976  Ptr p;
    977977  size=align_to_power_of_2(size, log2_page_size);
    978978  p = (Ptr) mmap(NULL,
    979                      (size_t)size,
    980                      PROT_READ | PROT_WRITE | PROT_EXEC,
    981                      MAP_PRIVATE | MAP_ANON | MAP_GROWSDOWN,
    982                      -1,        /* Darwin insists on this when not mmap()ing
    983                                 a real fd */
    984                      0);
     979                 (size_t)size,
     980                 PROT_READ | PROT_WRITE | PROT_EXEC,
     981                 MAP_PRIVATE | MAP_ANON | MAP_GROWSDOWN,
     982                 -1,    /* Darwin insists on this when not mmap()ing
     983                          a real fd */
     984                 0);
    985985  if (p != (Ptr)(-1)) {
    986986    *((size_t *)p) = size;
     
    993993
    994994void *
    995 allocate_stack(unsigned size)
     995allocate_stack(natural size)
    996996{
    997997  return create_stack(size);
     
    10751075{
    10761076  thread_activation *activation = (thread_activation *)param;
    1077   TCR *tcr = new_tcr(activation->vsize, activation->vsize);
     1077  TCR *tcr = new_tcr(activation->vsize, activation->tsize);
    10781078  sigset_t mask, old_mask;
    10791079
     
    16951695    LOCK_SPINLOCK(rw->spin,tcr);
    16961696    rw->blocked_writers--;
    1697     if (err = EINTR) {
     1697    if (err == EINTR) {
    16981698      err = 0;
    16991699    }
Note: See TracChangeset for help on using the changeset viewer.