aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/proc.h
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-11-11 08:48:43 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-11-11 08:48:43 +0000
commitcf31cadeb6b96b86cc8619a0a849f8e61b479a9a (patch)
tree8ebdd99de477d3567144c77a1dae023858526d10 /sys/sys/proc.h
parent26676c47dc98b725dff800d752e5ad04bab13fa4 (diff)
downloadsrc-cf31cadeb6b96b86cc8619a0a849f8e61b479a9a.tar.gz
src-cf31cadeb6b96b86cc8619a0a849f8e61b479a9a.zip
thread: fix thread0 tid allocation
Startup code hardcodes the value instead of allocating it. The first spawned thread would then be a duplicate. Pointy hat: mjg
Notes
Notes: svn path=/head/; revision=367583
Diffstat (limited to 'sys/sys/proc.h')
-rw-r--r--sys/sys/proc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 20e37599466a..47669d4af23a 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -855,6 +855,7 @@ MALLOC_DECLARE(M_SUBPROC);
*/
#define PID_MAX 99999
#define NO_PID 100000
+#define THREAD0_TID NO_PID
extern pid_t pid_max;
#define SESS_LEADER(p) ((p)->p_session->s_leader == (p))