Ignore:
Timestamp:
Apr 20, 2007, 12:50:14 AM (18 years ago)
Author:
bdash
Message:

2007-04-20 Mark Rowe <[email protected]>

Reviewed by Anders.

Improve FreeBSD compatibility, as suggested by Alexander Botero-Lowry.

  • kjs/collector.cpp: (KJS::currentThreadStackBase): FreeBSD requires that pthread_attr_t's are initialized via pthread_attr_init before being used in any context.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/collector.cpp

    r20836 r20970  
    241241    if (stackBase == 0 || thread != stackThread) {
    242242        pthread_attr_t sattr;
     243        pthread_attr_init(&sattr);
    243244#if HAVE(PTHREAD_NP_H)
    244245        // e.g. on FreeBSD 5.4, [email protected]
     
    252253        (void)rc; // FIXME: deal with error code somehow?  seems fatal...
    253254        ASSERT(stackBase);
     255        pthread_attr_destroy(&sattr);
    254256        return (void*)(size_t(stackBase) + stackSize);
    255257        stackThread = thread;
Note: See TracChangeset for help on using the changeset viewer.