summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthread.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-07-01 22:33:47 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-07-01 22:33:47 +0000
commit3c46587833f88c89314050674a81d8e9ed6e6f80 (patch)
treef0926bbad67f5213ecbe1d67d20226c2cb6f525e /cpukit/posix/src/pthread.c
parent2002-07-01 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-3c46587833f88c89314050674a81d8e9ed6e6f80.tar.bz2
2002-07-01 Joel Sherrill <joel@OARcorp.com>
* Mega patch merge to change the format of the object IDs to loosen the dependency between the SCORE and the various APIs. There was considerable work to simplify the object name management and it appears that the name_table field is no longer needed. This patch also includes the addition of the internal mutex which is currently only used to protect some types of allocation and deallocation. This significantly can reduce context switch latency under certain circumstances. In particular, some heap/region operations were O(n) and had dispatching disabled. This should help enormously. With this merge, the patch is not as clean as it should be. In particular, the documentation has not been modified to reflect the new object ID layout, the IDs in the test screens are not updated, and _Objects_Get_information needs to be a real routine not inlined. As part of this patch a lot of MP code for thread/proxy blocking was made conditional and cleaned up. * include/rtems/posix/key.h, src/cond.c, src/condinit.c, src/intr.c, src/key.c, src/keycreate.c, src/keydelete.c, src/killinfo.c, src/mqueue.c, src/mqueuecreatesupp.c, src/mutex.c, src/mutexinit.c, src/psignal.c, src/pthread.c, src/semaphore.c, src/semaphorecreatesupp.c: Modified as part of above.
Diffstat (limited to 'cpukit/posix/src/pthread.c')
-rw-r--r--cpukit/posix/src/pthread.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 9281b5fe11..e1bade3baf 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -167,20 +167,17 @@ boolean _POSIX_Threads_Create_extension(
/* XXX use signal constants */
api->signals_pending = 0;
- if ( _Objects_Get_class( created->Object.id ) == OBJECTS_POSIX_THREADS ) {
+ if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API &&
+ _Objects_Get_class( created->Object.id ) == 1 ) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = api->signals_blocked;
} else
api->signals_blocked = 0xffffffff;
-/* XXX set signal parameters -- block all signals for non-posix threads */
-
_Thread_queue_Initialize(
&api->Join_List,
- OBJECTS_NO_CLASS, /* only used for proxy operations */
THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_JOIN_AT_EXIT,
- NULL, /* no extract proxy handler */
0
);
@@ -356,14 +353,19 @@ void _POSIX_Threads_Manager_initialization(
#endif
_Objects_Initialize_information(
- &_POSIX_Threads_Information,
- OBJECTS_POSIX_THREADS,
- FALSE, /* does not support global */
- maximum_pthreads,
+ &_POSIX_Threads_Information, /* object information table */
+ OBJECTS_POSIX_API, /* object API */
+ OBJECTS_POSIX_THREADS, /* object class */
+ maximum_pthreads, /* maximum objects of this class */
sizeof( Thread_Control ),
- FALSE,
- 0, /* length is arbitrary for now */
- TRUE /* this class is threads */
+ /* size of this object's control block */
+ FALSE, /* TRUE if names for this object are strings */
+ 0 /* maximum length of each object's name */
+#if defined(RTEMS_MULTIPROCESSING)
+ ,
+ FALSE, /* TRUE if this is a global object class */
+ NULL /* Proxy extraction support callout */
+#endif
);
/*