|
@@ -101,17 +101,6 @@ pthread_create (pthread_t * tid,
|
|
|
pthread_t self;
|
|
|
pte_osResult osResult;
|
|
|
|
|
|
- /*
|
|
|
- * Before doing anything, check that tid can be stored through
|
|
|
- * without invoking a memory protection error (segfault).
|
|
|
- * Make sure that the assignment below can't be optimised out by the compiler.
|
|
|
- * This is assured by conditionally assigning *tid again at the end.
|
|
|
- */
|
|
|
- if (tid != NULL)
|
|
|
- {
|
|
|
- tid->x = 0;
|
|
|
- }
|
|
|
-
|
|
|
if (attr != NULL)
|
|
|
{
|
|
|
a = *attr;
|
|
@@ -121,12 +110,12 @@ pthread_create (pthread_t * tid,
|
|
|
a = NULL;
|
|
|
}
|
|
|
|
|
|
- if ((thread = pte_new ()).p == NULL)
|
|
|
+ if ((thread = pte_new ()) == NULL)
|
|
|
{
|
|
|
goto FAIL0;
|
|
|
}
|
|
|
|
|
|
- tp = (pte_thread_t *) thread.p;
|
|
|
+ tp = (pte_thread_t *) thread;
|
|
|
|
|
|
priority = tp->sched_priority;
|
|
|
|
|
@@ -167,7 +156,7 @@ pthread_create (pthread_t * tid,
|
|
|
* system adjustment. This is not the case for POSIX threads.
|
|
|
*/
|
|
|
self = pthread_self ();
|
|
|
- priority = ((pte_thread_t *) self.p)->sched_priority;
|
|
|
+ priority = ((pte_thread_t *) self)->sched_priority;
|
|
|
}
|
|
|
|
|
|
|