Changeset 11750


Ignore:
Timestamp:
Feb 18, 2009, 3:35:46 AM (10 years ago)
Author:
gb
Message:

In lisp_thread_entry() and cooperative_thread_startup(), ensure
that tcr->save_vsp is always pointing one word above the bottom
of the vstack. (It always is on the first call, but may not
be after the thread is reset.)

In suspend_current_cooperative_thread(), add a prototype for xFindSymbol().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/thread_manager.c

    r11742 r11750  
    16561656#ifndef WINDOWS
    16571657  sigset_t mask, old_mask;
     1658  LispObj *start_vsp;
    16581659
    16591660  sigemptyset(&mask);
     
    16681669  tcr->vs_area->active -= node_size;
    16691670  *(--tcr->save_vsp) = lisp_nil;
     1671  start_vsp = tcr->save_vsp;
    16701672  enable_fp_exceptions();
    16711673  SET_TCR_FLAG(tcr,TCR_FLAG_BIT_AWAITING_PRESET);
     
    16771679    /* Now go run some lisp code */
    16781680    start_lisp(TCR_TO_TSD(tcr),0);
     1681    tcr->save_vsp = start_vsp;
    16791682  } while (tcr->flags & (1<<TCR_FLAG_BIT_AWAITING_PRESET));
    16801683#ifndef WINDOWS
     
    16981701{
    16991702  static suspendf cooperative_suspend = NULL;
     1703  void *xFindSymbol(void*,char*);
    17001704
    17011705  if (cooperative_suspend == NULL) {
     
    17141718
    17151719  TCR *tcr = get_tcr(0);
     1720  LispObj *start_vsp;
     1721
    17161722  if (!tcr) {
    17171723    return NULL;
     
    17211727#endif
    17221728  SET_TCR_FLAG(tcr,TCR_FLAG_BIT_AWAITING_PRESET);
     1729  start_vsp = tcr->save_vsp;
    17231730  do {
    17241731    SEM_RAISE(tcr->reset_completion);
     
    17261733     
    17271734    start_lisp(tcr, 0);
     1735    tcr->save_vsp = start_vsp;
    17281736  } while (tcr->flags & (1<<TCR_FLAG_BIT_AWAITING_PRESET));
    17291737#ifndef WINDOWS
Note: See TracChangeset for help on using the changeset viewer.