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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.