<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/kern/kern_timeout.c, branch release/6.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>MFC: Use the new thread no sleeping facility to replace the g_xup, g_xdown,</title>
<updated>2005-09-26T19:49:12+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2005-09-26T19:49:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b9f05e541cbf4fb9fd2c3a04f3e06e2ab0f9ff1a'/>
<id>b9f05e541cbf4fb9fd2c3a04f3e06e2ab0f9ff1a</id>
<content type='text'>
and dont_sleep_in_callout mutexes.  Also, disallow sleeping in hardware
interrupt handlers.

Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and dont_sleep_in_callout mutexes.  Also, disallow sleeping in hardware
interrupt handlers.

Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC:</title>
<updated>2005-09-12T13:43:34+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2005-09-12T13:43:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fa7329a6e3b246c0646d6848fee9ece12cc0c16b'/>
<id>fa7329a6e3b246c0646d6848fee9ece12cc0c16b</id>
<content type='text'>
  Make callout_reset() return a non-zero value if a pending callout
  was rescheduled. If there was no pending callout, then return 0.

  Reviewed by:    iedowse, cperciva

Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Make callout_reset() return a non-zero value if a pending callout
  was rescheduled. If there was no pending callout, then return 0.

  Reviewed by:    iedowse, cperciva

Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>When processing a timeout() callout and returning it to the free</title>
<updated>2005-02-11T00:14:00+00:00</updated>
<author>
<name>Ian Dowse</name>
<email>iedowse@FreeBSD.org</email>
</author>
<published>2005-02-11T00:14:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=57c037be1c2a9f59cdfd3c237dbe7ddc29540f2c'/>
<id>57c037be1c2a9f59cdfd3c237dbe7ddc29540f2c</id>
<content type='text'>
list, set `curr_callout' to NULL. This ensures that we won't attempt
to cancel the current callout if the original callout structure
gets recycled while we wait to acquire Giant.

This is reported to fix an intermittent syscons problem that was
introduced by revision 1.96.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
list, set `curr_callout' to NULL. This ensures that we won't attempt
to cancel the current callout if the original callout structure
gets recycled while we wait to acquire Giant.

This is reported to fix an intermittent syscons problem that was
introduced by revision 1.96.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a mechanism for associating a mutex with a callout when the</title>
<updated>2005-02-07T02:47:33+00:00</updated>
<author>
<name>Ian Dowse</name>
<email>iedowse@FreeBSD.org</email>
</author>
<published>2005-02-07T02:47:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=98c926b20fcc0953abe69be05b43e9cfc95b2c47'/>
<id>98c926b20fcc0953abe69be05b43e9cfc95b2c47</id>
<content type='text'>
callout is first initialised, using a new function callout_init_mtx().
The callout system will acquire this mutex before calling the callout
function and release it on return.

In addition, the callout system uses the mutex to avoid most of the
complications and race conditions inherent in asynchronous timer
facilities, so mutex-protected callouts have much simpler semantics.
As long as the mutex is held when invoking callout_stop() or
callout_reset(), then these functions will guarantee that the callout
will be stopped, even if softclock() had already begun to process
the callout.

Existing Giant-locked callouts will automatically pick up the new
race-free semantics. This should close a number of race conditions
in the USB code and probably other areas of the kernel too.

There should be no change in behaviour for "MP-safe" callouts; these
still need to use the techniques mentioned in timeout(9) to avoid
race conditions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
callout is first initialised, using a new function callout_init_mtx().
The callout system will acquire this mutex before calling the callout
function and release it on return.

In addition, the callout system uses the mutex to avoid most of the
complications and race conditions inherent in asynchronous timer
facilities, so mutex-protected callouts have much simpler semantics.
As long as the mutex is held when invoking callout_stop() or
callout_reset(), then these functions will guarantee that the callout
will be stopped, even if softclock() had already begun to process
the callout.

Existing Giant-locked callouts will automatically pick up the new
race-free semantics. This should close a number of race conditions
in the USB code and probably other areas of the kernel too.

There should be no change in behaviour for "MP-safe" callouts; these
still need to use the techniques mentioned in timeout(9) to avoid
race conditions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make "c-&gt;c_func = NULL" conditional on CALLOUT_LOCAL_ALLOC in both</title>
<updated>2005-01-19T21:15:58+00:00</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2005-01-19T21:15:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7834081c88009811574366394f970a8a7ede6cd7'/>
<id>7834081c88009811574366394f970a8a7ede6cd7</id>
<content type='text'>
places where it occurs, not just one. :-)

Pointed out by:	glebius
Pointy had to:	cperciva
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
places where it occurs, not just one. :-)

Pointed out by:	glebius
Pointy had to:	cperciva
</pre>
</div>
</content>
</entry>
<entry>
<title>Make "c-&gt;c_func = NULL" conditional on the CALLOUT_LOCAL_ALLOC flag,</title>
<updated>2005-01-19T20:34:46+00:00</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2005-01-19T20:34:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0ceba3d69cec9eb27484c5c1c10e67c895f9a052'/>
<id>0ceba3d69cec9eb27484c5c1c10e67c895f9a052</id>
<content type='text'>
i.e., only clear c-&gt;c_func if the callout c is being used via the old
timeout(9) interface.

Requested by:	glebius
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
i.e., only clear c-&gt;c_func if the callout c is being used via the old
timeout(9) interface.

Requested by:	glebius
</pre>
</div>
</content>
</entry>
<entry>
<title>Clarify the description of the callout_active() macro: It is cleared by</title>
<updated>2005-01-19T19:46:35+00:00</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2005-01-19T19:46:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=86fd19de7be995cef26fe6e5779b7d1417fd1b40'/>
<id>86fd19de7be995cef26fe6e5779b7d1417fd1b40</id>
<content type='text'>
callout_stop, callout_drain, and callout_deactivate, but is not
automatically cleared when a callout returns.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
callout_stop, callout_drain, and callout_deactivate, but is not
automatically cleared when a callout returns.
</pre>
</div>
</content>
</entry>
<entry>
<title>Adjust two of my comments to the new world order: Indent protection in</title>
<updated>2005-01-07T03:25:45+00:00</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2005-01-07T03:25:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e9dec2c41b0c4c2466be65d8042bf99ad8b4baef'/>
<id>e9dec2c41b0c4c2466be65d8042bf99ad8b4baef</id>
<content type='text'>
the first column is performed using /**, not /*-.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the first column is performed using /**, not /*-.
</pre>
</div>
</content>
</entry>
<entry>
<title>Cut a KTR record whenever a callout is invoked.  Mark whether it runs</title>
<updated>2004-08-06T21:49:00+00:00</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2004-08-06T21:49:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ff7ec58af8053e0778288eb615f1b4abf428361b'/>
<id>ff7ec58af8053e0778288eb615f1b4abf428361b</id>
<content type='text'>
with Giant or not, and include the function point so it can be looked
up against the kernel symbol table during trace analysis.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
with Giant or not, and include the function point so it can be looked
up against the kernel symbol table during trace analysis.
</pre>
</div>
</content>
</entry>
<entry>
<title>When reseting a pending callout, perform the deregistration in</title>
<updated>2004-08-06T02:44:58+00:00</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2004-08-06T02:44:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0413bacd091577bed3dfe23da5647b0280f5b1b2'/>
<id>0413bacd091577bed3dfe23da5647b0280f5b1b2</id>
<content type='text'>
callout_reset rather than calling callout_stop.  This results in a few
lines of code duplication, but it provides a significant performance
improvement because it avoids recursing on callout_lock.

Requested by:	rwatson
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
callout_reset rather than calling callout_stop.  This results in a few
lines of code duplication, but it provides a significant performance
improvement because it avoids recursing on callout_lock.

Requested by:	rwatson
</pre>
</div>
</content>
</entry>
</feed>
