svn commit: r367541 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Tue Nov 10 01:13:58 UTC 2020


Author: mjg
Date: Tue Nov 10 01:13:58 2020
New Revision: 367541
URL: https://svnweb.freebsd.org/changeset/base/367541

Log:
  thread: adds newer bits for r367537
  
  The committed patch was an older version.

Modified:
  head/sys/kern/kern_thread.c

Modified: head/sys/kern/kern_thread.c
==============================================================================
--- head/sys/kern/kern_thread.c	Mon Nov  9 23:38:39 2020	(r367540)
+++ head/sys/kern/kern_thread.c	Tue Nov 10 01:13:58 2020	(r367541)
@@ -138,8 +138,8 @@ static int thread_unsuspend_one(struct thread *td, str
 
 #define TID_BUFFER_SIZE	1024
 
-struct mtx tid_lock;
-bitstr_t *tid_bitmap;
+static struct mtx tid_lock;
+static bitstr_t *tid_bitmap;
 
 static MALLOC_DEFINE(M_TIDHASH, "tidhash", "thread hash");
 
@@ -195,7 +195,7 @@ tid_alloc(void)
 		KASSERT(tid != -1, ("unexpectedly ran out of IDs"));
 	}
 	bit_set(tid_bitmap, tid);
-	trytid++;
+	trytid = tid + 1;
 	mtx_unlock(&tid_lock);
 	return (tid + NO_PID);
 }


More information about the svn-src-all mailing list