Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2003 20:05:20 -0400 (EDT)
From:      "Andrew R. Reiter" <arr@watson.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        FreeBSD current users <current@freebsd.org>
Subject:   Re: some small patches
Message-ID:  <20030417200446.N54973@fledge.watson.org>
In-Reply-To: <Pine.BSF.4.21.0304171618370.55166-100000@InterJet.elischer.org>
References:  <Pine.BSF.4.21.0304171618370.55166-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 17 Apr 2003, Julian Elischer wrote:

:
:Here are two small patches they are pretty non-controversial in my
:opinion.
:
:they are part of a bigger patch, but I'd like to get them in separatly
:to simplify the bigger one.
:the first patch:
:http://www.freebsd.org/~julian/IDLETD.diff
:moves the flag that identifies a thread as being one of the idle threads
:from the KSE to the thread. The code that wants to know already
:has a thread pointer, but not the KSE pointer so this makes more sense.

Is this correct?

Index: sys/proc.h
===================================================================
RCS file: /repos/projects/mirrored/freebsd/src/sys/sys/proc.h,v
retrieving revision 1.313
diff -u -r1.313 proc.h
--- sys/proc.h	2003/04/13 21:29:11	1.313
+++ sys/proc.h	2003/04/17 22:52:07
@@ -349,6 +323,7 @@
 #define	TDF_CAN_UNBIND	0x000004 /* Only temporarily bound. */
 #define	TDF_SINTR	0x000008 /* Sleep is interruptible. */
 #define	TDF_TIMEOUT	0x000010 /* Timing out during sleep. */
+#define	TDF_IDLETD	0x000040 /* This is an idle thread */
 #define	TDF_SELECT	0x000040 /* Selecting; wakeup/waiting
danger. */
 #define	TDF_CVWAITQ	0x000080 /* Thread is on a cv_waitq (not
slpq). */
 #define	TDF_UPCALLING	0x000100 /* This thread is doing an
upcall. */


Both TDF_IDLETD and TD_SELECT have the same value.

Just curious.

Cheers,
Andrew


:
:
:The second patch:
:http://www.freebsd.org/~julian/sched_clock.diff
:makes the sched_ API entrypoint sched_clock()
:take a thread argument instead of a KSE.
:Once again, the callers have the thread pointer and not the KSE pointer,
:and in fact they probably should not have the KSE pointer.
:
:
:anyone object to these patches?
:
:
:_______________________________________________
:freebsd-current@freebsd.org mailing list
:http://lists.freebsd.org/mailman/listinfo/freebsd-current
:To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
:

--
Andrew R. Reiter
arr@watson.org
arr@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030417200446.N54973>