Changeset 125 for trunk


Ignore:
Timestamp:
Sep 13, 2006, 1:06:01 PM (19 years ago)
Author:
dmik
Message:

Kernel: Increased the default stack size for a newly created QThread from 32768 B to 2 MB (thanks to froloff for reporting)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel/qthread_pm.cpp

    r8 r125  
    5858#define LocalStorage (*_threadstore())
    5959
    60 // since OS/2 doesn't support specifying a maximum time to wait for a thread
    61 // to end other than infininty we use a loop containing of wait intervals
    62 // until the thread has ended or the maximum time specified by the caller
    63 // has expired.
    64 static const ULONG THREAD_WAIT_INTERVAL = 1000;
     60enum
     61{
     62    // OS/2 doesn't support specifying a maximum time to wait for a thread
     63    // to end other than infininty, so we use a loop containing of wait
     64    // intervals until the thread has ended or the maximum time specified
     65    // by the caller has expired (in ms)
     66    THREAD_WAIT_INTERVAL = 1000,
     67    // default thread stack size (in bytes)
     68    THREAD_DEF_STACK_SIZE = 0x200000, // 2 MB
     69};
    6570
    6671/**************************************************************************
     
    244249      its 'parent' and runs at normal priority.
    245250    */
    246     int stacksize = d->stacksize ? d->stacksize : 32768;
     251    int stacksize = d->stacksize ? d->stacksize : THREAD_DEF_STACK_SIZE;
    247252    int tid = _beginthread( QThreadInstance::start, NULL, stacksize, d->args );
    248253    d->thread_id = tid != -1 ? (TID) tid : 0;
Note: See TracChangeset for help on using the changeset viewer.