version 1.3, 2005/05/12 18:50:11
|
version 1.4, 2005/11/06 18:43:30
|
|
|
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
static sigset_t *block_signal_mask(sigset_t *sig) | static sigset_t *block_signal_mask(sigset_t *sig) |
|
|
sigaddset(sig, SIGALRM); | sigaddset(sig, SIGALRM); |
sigaddset(sig, SIGPIPE); | sigaddset(sig, SIGPIPE); |
| |
|
|
sigprocmask(SIG_BLOCK, sig, NULL); | sigprocmask(SIG_BLOCK, sig, NULL); |
return sig; | return sig; |
} | } |
| |
|
|
//////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////// |
| |
Thread::Thread( | Thread::Thread( |
|
|
_exit_code(0) | _exit_code(0) |
{ | { |
pthread_attr_init(&_handle.thatt); | pthread_attr_init(&_handle.thatt); |
|
size_t stacksize; |
|
|
|
// |
|
// Get the system default thread stack size |
|
// |
|
if (pthread_attr_getstacksize(&_handle.thatt, &stacksize) == 0) |
|
{ |
|
// |
|
// replace it with the Pegasus VMS default thread stack size. |
|
// |
|
int rc = pthread_attr_setstacksize(&_handle.thatt, stacksize * 2); |
|
// |
|
// Make sure it succeeded |
|
// |
|
PEGASUS_ASSERT(rc == 0); |
|
} |
| |
_handle.thid = 0; | _handle.thid = 0; |
} | } |