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 $
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
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 */
476#define THR_STACK_INITIAL 0x100000
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,
1037 NULL, NULL, THR_STACK_DEFAULT, /* 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;
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 ---
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 $
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
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 */
476#define THR_STACK_INITIAL 0x100000
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,
1037 NULL, NULL, THR_STACK_DEFAULT, /* 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;
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 ---