thr_private.h (139023) | thr_private.h (141822) |
---|---|
1/* 2 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * Private thread definitions for the uthread kernel. 33 * | 1/* 2 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * Private thread definitions for the uthread kernel. 33 * |
34 * $FreeBSD: head/lib/libkse/thread/thr_private.h 139023 2004-12-18 18:07:37Z deischen $ | 34 * $FreeBSD: head/lib/libkse/thread/thr_private.h 141822 2005-02-13 18:38:06Z deischen $ |
35 */ 36 37#ifndef _THR_PRIVATE_H 38#define _THR_PRIVATE_H 39 40/* 41 * Include files. 42 */ --- 418 unchanged lines hidden (view full) --- 461 * Thread creation state attributes. 462 */ 463#define THR_CREATE_RUNNING 0 464#define THR_CREATE_SUSPENDED 1 465 466/* 467 * Miscellaneous definitions. 468 */ | 35 */ 36 37#ifndef _THR_PRIVATE_H 38#define _THR_PRIVATE_H 39 40/* 41 * Include files. 42 */ --- 418 unchanged lines hidden (view full) --- 461 * Thread creation state attributes. 462 */ 463#define THR_CREATE_RUNNING 0 464#define THR_CREATE_SUSPENDED 1 465 466/* 467 * Miscellaneous definitions. 468 */ |
469#define THR_STACK_DEFAULT 65536 | 469#define THR_STACK32_DEFAULT (1 * 1024 * 1024) 470#define THR_STACK64_DEFAULT (2 * 1024 * 1024) |
470 471/* 472 * Maximum size of initial thread's stack. This perhaps deserves to be larger 473 * than the stacks of other threads, since many applications are likely to run 474 * almost entirely on this stack. 475 */ | 471 472/* 473 * Maximum size of initial thread's stack. This perhaps deserves to be larger 474 * than the stacks of other threads, since many applications are likely to run 475 * almost entirely on this stack. 476 */ |
476#define THR_STACK_INITIAL 0x100000 | 477#define THR_STACK32_INITIAL (2 * 1024 * 1024) 478#define THR_STACK64_INITIAL (4 * 1024 * 1024) |
477 478/* 479 * Define the different priority ranges. All applications have thread 480 * priorities constrained within 0-31. The threads library raises the 481 * priority when delivering signals in order to ensure that signal 482 * delivery happens (from the POSIX spec) "as soon as possible". 483 * In the future, the threads library will also be able to map specific 484 * threads into real-time (cooperating) processes or kernel threads. --- 544 unchanged lines hidden (view full) --- 1029SCLASS TAILQ_HEAD(atfork_head, pthread_atfork) _thr_atfork_list; 1030SCLASS pthread_mutex_t _thr_atfork_mutex; 1031 1032/* Default thread attributes: */ 1033SCLASS struct pthread_attr _pthread_attr_default 1034 SCLASS_PRESET({ 1035 SCHED_RR, 0, TIMESLICE_USEC, THR_DEFAULT_PRIORITY, 1036 THR_CREATE_RUNNING, PTHREAD_CREATE_JOINABLE, NULL, | 479 480/* 481 * Define the different priority ranges. All applications have thread 482 * priorities constrained within 0-31. The threads library raises the 483 * priority when delivering signals in order to ensure that signal 484 * delivery happens (from the POSIX spec) "as soon as possible". 485 * In the future, the threads library will also be able to map specific 486 * threads into real-time (cooperating) processes or kernel threads. --- 544 unchanged lines hidden (view full) --- 1031SCLASS TAILQ_HEAD(atfork_head, pthread_atfork) _thr_atfork_list; 1032SCLASS pthread_mutex_t _thr_atfork_mutex; 1033 1034/* Default thread attributes: */ 1035SCLASS struct pthread_attr _pthread_attr_default 1036 SCLASS_PRESET({ 1037 SCHED_RR, 0, TIMESLICE_USEC, THR_DEFAULT_PRIORITY, 1038 THR_CREATE_RUNNING, PTHREAD_CREATE_JOINABLE, NULL, |
1037 NULL, NULL, THR_STACK_DEFAULT, /* guardsize */0 | 1039 NULL, NULL, /* stacksize */0, /* guardsize */0 |
1038 }); 1039 1040/* Default mutex attributes: */ 1041SCLASS struct pthread_mutex_attr _pthread_mutexattr_default 1042 SCLASS_PRESET({PTHREAD_MUTEX_DEFAULT, PTHREAD_PRIO_NONE, 0, 0 }); 1043 1044/* Default condition variable attributes: */ 1045SCLASS struct pthread_cond_attr _pthread_condattr_default --- 22 unchanged lines hidden (view full) --- 1068SCLASS int _gc_check SCLASS_PRESET(0); 1069SCLASS int _gc_count SCLASS_PRESET(0); 1070 1071SCLASS struct lock _mutex_static_lock; 1072SCLASS struct lock _rwlock_static_lock; 1073SCLASS struct lock _keytable_lock; 1074SCLASS struct lock _thread_list_lock; 1075SCLASS int _thr_guard_default; | 1040 }); 1041 1042/* Default mutex attributes: */ 1043SCLASS struct pthread_mutex_attr _pthread_mutexattr_default 1044 SCLASS_PRESET({PTHREAD_MUTEX_DEFAULT, PTHREAD_PRIO_NONE, 0, 0 }); 1045 1046/* Default condition variable attributes: */ 1047SCLASS struct pthread_cond_attr _pthread_condattr_default --- 22 unchanged lines hidden (view full) --- 1070SCLASS int _gc_check SCLASS_PRESET(0); 1071SCLASS int _gc_count SCLASS_PRESET(0); 1072 1073SCLASS struct lock _mutex_static_lock; 1074SCLASS struct lock _rwlock_static_lock; 1075SCLASS struct lock _keytable_lock; 1076SCLASS struct lock _thread_list_lock; 1077SCLASS int _thr_guard_default; |
1078SCLASS int _thr_stack_default; 1079SCLASS int _thr_stack_initial; |
|
1076SCLASS int _thr_page_size; 1077SCLASS pthread_t _thr_sig_daemon; 1078SCLASS int _thr_debug_flags SCLASS_PRESET(0); 1079 1080/* Undefine the storage class and preset specifiers: */ 1081#undef SCLASS 1082#undef SCLASS_PRESET 1083 --- 194 unchanged lines hidden --- | 1080SCLASS int _thr_page_size; 1081SCLASS pthread_t _thr_sig_daemon; 1082SCLASS int _thr_debug_flags SCLASS_PRESET(0); 1083 1084/* Undefine the storage class and preset specifiers: */ 1085#undef SCLASS 1086#undef SCLASS_PRESET 1087 --- 194 unchanged lines hidden --- |