Changeset 10465


Ignore:
Timestamp:
Aug 13, 2008, 10:53:58 PM (11 years ago)
Author:
gb
Message:

propagate r10464 (semaphore, pthread_attr memory leaks) from trunk
to working-0711.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lisp-kernel/thread_manager.c

    r10389 r10465  
    439439  }
    440440#endif
    441 #ifdef DARWIN
    442   DarwinSigReturn(context);
    443 #endif
    444 #ifdef FREEBSD
    445   freebsd_sigreturn(context);
    446 #endif
     441  SIGRETURN(context);
    447442}
    448443
     
    473468  pthread_getattr_np(p,&attr);
    474469  pthread_attr_getstack(&attr, base, size);
     470  pthread_attr_destroy(&attr);
    475471  *(natural *)base += *size;
    476472#endif
     
    487483  *base = (void *)((natural)temp_base + temp_size);
    488484  *size = temp_size;
     485  pthread_attr_destroy(&attr);
    489486#endif
    490487#ifdef SOLARIS
     
    554551#ifdef USE_POSIX_SEMAPHORES
    555552    sem_destroy((sem_t *)*s);
     553    free(*s);
    556554#endif
    557555#ifdef USE_MACH_SEMAPHORES
     
    864862    destroy_semaphore(&tcr->reset_completion);
    865863    destroy_semaphore(&tcr->activate);
     864    tcr->tlb_limit = 0;
    866865    free(tcr->tlb_pointer);
    867866    tcr->tlb_pointer = NULL;
    868     tcr->tlb_limit = 0;
    869867    tcr->osid = 0;
    870868    tcr->interrupt_pending = 0;
     
    12431241  */
    12441242  pthread_create(&returned_thread, &attr, start_routine, param);
     1243  pthread_attr_destroy(&attr);
    12451244  return (LispObj) ptr_to_lispobj(returned_thread);
    12461245}
Note: See TracChangeset for help on using the changeset viewer.