[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v3 12/12] lib/uksched: Add private field for user
Reviewed-by: Florian Schmidt <florian.schmidt@xxxxxxxxx> On 3/10/19 9:10 PM, Costin Lupu wrote: The private field may be used by the user for holding its private information in scheduling frameworks which would wrap the Unikraft scheduling functionality. One such example might be the pthread library which would set the private field as a back pointer to its pthread_t data. This is especially useful when implementing pthread_self() by calling uk_thread_current(). Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- lib/uksched/include/uk/thread.h | 1 + lib/uksched/thread.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/uksched/include/uk/thread.h b/lib/uksched/include/uk/thread.h index f8bdbb5e..71e39225 100644 --- a/lib/uksched/include/uk/thread.h +++ b/lib/uksched/include/uk/thread.h @@ -57,6 +57,7 @@ struct uk_thread { bool detached; struct uk_waitq waiting_threads; struct uk_sched *sched; + void *prv; #ifdef CONFIG_LIBNEWLIBC struct _reent reent; #endif diff --git a/lib/uksched/thread.c b/lib/uksched/thread.c index 64fe6a2b..f85a652e 100644 --- a/lib/uksched/thread.c +++ b/lib/uksched/thread.c @@ -114,6 +114,7 @@ int uk_thread_init(struct uk_thread *thread, thread->detached = false; uk_waitq_init(&thread->waiting_threads); thread->sched = NULL; + thread->prv = NULL;#ifdef CONFIG_LIBNEWLIBCreent_init(&thread->reent); -- Dr. Florian Schmidt フローリアン・シュミット Research Scientist, Systems and Machine Learning Group NEC Laboratories Europe Kurfürsten-Anlage 36, D-69115 Heidelberg Tel. +49 (0)6221 4342-265 Fax: +49 (0)6221 4342-155 e-mail: florian.schmidt@xxxxxxxxx ============================================================ Registered at Amtsgericht Mannheim, Germany, HRB728558 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |