Typedefs | |
| typedef apr_thread_t | switch_thread_t |
| typedef apr_threadattr_t | switch_threadattr_t |
| typedef void *SWITCH_THREAD_FUNC * | switch_thread_start_t (switch_thread_t *, void *) |
Functions | |
| switch_status_t | switch_threadattr_stacksize_set (switch_threadattr_t *attr, switch_size_t stacksize) |
| switch_status_t | switch_threadattr_priority_increase (switch_threadattr_t *attr) |
| switch_status_t | switch_threadattr_create (switch_threadattr_t **new_attr, switch_memory_pool_t *pool) |
| switch_status_t | switch_threadattr_detach_set (switch_threadattr_t *attr, int32_t on) |
| switch_status_t | switch_thread_create (switch_thread_t **new_thread, switch_threadattr_t *attr, switch_thread_start_t func, void *data, switch_memory_pool_t *cont) |
|
|
The prototype for any APR thread worker functions. typedef void *(SWITCH_THREAD_FUNC *switch_thread_start_t)(switch_thread_t*, void*); |
|
|
Opaque Thread structure. |
|
|
Opaque Thread attributes structure. |
|
||||||||||||||||||||||||
|
Create a new thread of execution
00545 {
00546 return apr_thread_create(new_thread, attr, func, data, cont);
00547 }
|
|
||||||||||||
|
Create and initialize a new threadattr variable
00503 {
00504 return apr_threadattr_create(new_attr, pool);
00505 }
|
|
||||||||||||
|
Set if newly created threads should be created in detached state.
00508 {
00509 return apr_threadattr_detach_set(attr, on);
00510 }
|
|
|
00525 {
00526 int stat = 0;
00527 #ifndef WIN32
00528 struct sched_param param;
00529 struct apr_threadattr_t *myattr = attr;
00530
00531 pthread_attr_getschedparam(&myattr->attr, ¶m);
00532 param.sched_priority = 50;
00533 stat = pthread_attr_setschedparam(&myattr->attr, ¶m);
00534
00535 if (stat == 0) {
00536 return SWITCH_STATUS_SUCCESS;
00537 }
00538 #endif
00539 return stat;
00540 }
|
|
||||||||||||
|
00513 {
00514 return apr_threadattr_stacksize_set(attr, stacksize);
00515 }
|
1.3.9.1