[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH v4 12/12] lib/uksched: Add private field for user
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> Reviewed-by: Florian Schmidt <florian.schmidt@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 72adfc68..7400baee 100644 --- a/lib/uksched/thread.c +++ b/lib/uksched/thread.c @@ -115,6 +115,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_LIBNEWLIBC reent_init(&thread->reent); -- 2.11.0 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |