git: 27cd9722efb1 - stable/13 - Update comments referencing create_thread()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 15 Feb 2023 16:43:00 UTC
The branch stable/13 has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=27cd9722efb10f03e9d7d79ecb737be6ec82b5e2
commit 27cd9722efb10f03e9d7d79ecb737be6ec82b5e2
Author: Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2023-02-09 15:34:38 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2023-02-15 16:41:11 +0000
Update comments referencing create_thread()
The equivalent function is now named thread_create(). Mention
kthread_add() where it is also relevant.
Reviewed by: kib, markj
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38180
(cherry picked from commit a7a452fedc42d9e260224b7e2cd833df7287319f)
---
sys/kern/kern_kthread.c | 2 +-
sys/sys/proc.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c
index 2eef7798f3d6..782370b1ba77 100644
--- a/sys/kern/kern_kthread.c
+++ b/sys/kern/kern_kthread.c
@@ -296,7 +296,7 @@ kthread_add(void (*func)(void *), void *arg, struct proc *p,
thread_cow_get_proc(newtd, p);
- /* this code almost the same as create_thread() in kern_thr.c */
+ /* This code is similar to thread_create() in kern_thr.c. */
p->p_flag |= P_HADTHREADS;
thread_link(newtd, p);
thread_lock(oldtd);
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 23b8fcfe9bd7..452ffe413327 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -251,7 +251,7 @@ struct thread {
u_char td_lend_user_pri; /* (t) Lend user pri. */
u_char td_allocdomain; /* (b) NUMA domain backing this struct thread. */
-/* Cleared during fork1() */
+/* Cleared during fork1(), thread_create(), or kthread_add(). */
#define td_startzero td_flags
int td_flags; /* (t) TDF_* flags. */
int td_inhibitors; /* (t) Why can not run. */
@@ -316,7 +316,7 @@ struct thread {
u_int td_ucredref; /* (k) references on td_realucred */
#define td_endzero td_sigmask
-/* Copied during fork1() or create_thread(). */
+/* Copied during fork1(), thread_create(), or kthread_add(). */
#define td_startcopy td_endzero
sigset_t td_sigmask; /* (c) Current signal mask. */
u_char td_rqindex; /* (t) Run queue index. */
@@ -337,7 +337,7 @@ struct thread {
#define td_endcopy td_pcb
/*
- * Fields that must be manually set in fork1() or create_thread()
+ * Fields that must be manually set in fork1(), thread_create(), kthread_add(),
* or already have been set in the allocator, constructor, etc.
*/
struct pcb *td_pcb; /* (k) Kernel VA of pcb and kstack. */