(empth_create): LWP yields, and it's the reference implementation.

Document and fix the others.
This commit is contained in:
Markus Armbruster 2006-03-25 07:49:37 +00:00
parent 8054aafb9a
commit ba11aaaa36
3 changed files with 3 additions and 0 deletions

View file

@ -131,6 +131,7 @@ int empth_init(void **ctx, int flags);
* UD is the value to pass to ENTRY. It is also assigned to the
* context variable defined with empth_init() whenever the thread gets
* scheduled.
* Yield the processor.
* Return the thread, or NULL on error.
*/
empth_t *empth_create(int prio, void (*entry)(void *),

View file

@ -463,6 +463,7 @@ empth_create(int prio, void (*entry)(void *), int size, int flags,
}
loc_debug("new thread id is %ld", pThread->ulThreadID);
empth_yield();
return pThread;
bad:

View file

@ -236,6 +236,7 @@ empth_create(int prio, void (*entry)(void *), int size, int flags,
goto bad;
}
empth_status("new thread id is %ld", (long)t);
empth_yield();
return ctx;
bad: