Page MenuHomeFreeBSD

D29004.diff
No OneTemporary

D29004.diff

diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c
+++ b/sys/kern/subr_autoconf.c
@@ -56,8 +56,8 @@
/*
* "Interrupt driven config" functions.
*/
-static TAILQ_HEAD(, intr_config_hook) intr_config_hook_list =
- TAILQ_HEAD_INITIALIZER(intr_config_hook_list);
+static STAILQ_HEAD(, intr_config_hook) intr_config_hook_list =
+ STAILQ_HEAD_INITIALIZER(intr_config_hook_list);
static struct intr_config_hook *next_to_notify;
static struct mtx intr_config_hook_lock;
MTX_SYSINIT(intr_config_hook, &intr_config_hook_lock, "intr config", MTX_DEF);
@@ -101,7 +101,7 @@
if (warned < 6) {
printf("run_interrupt_driven_hooks: still waiting after %d "
"seconds for", warned * WARNING_INTERVAL_SECS);
- TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links) {
+ STAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links) {
if (linker_search_symbol_name(
(caddr_t)hook_entry->ich_func, namebuf,
sizeof(namebuf), &offset) == 0)
@@ -137,7 +137,7 @@
while (next_to_notify != NULL) {
hook_entry = next_to_notify;
- next_to_notify = TAILQ_NEXT(hook_entry, ich_links);
+ next_to_notify = STAILQ_NEXT(hook_entry, ich_links);
mtx_unlock(&intr_config_hook_lock);
(*hook_entry->ich_func)(hook_entry->ich_arg);
mtx_lock(&intr_config_hook_lock);
@@ -158,7 +158,7 @@
TSWAIT("config hooks");
mtx_lock(&intr_config_hook_lock);
warned = 0;
- while (!TAILQ_EMPTY(&intr_config_hook_list)) {
+ while (!STAILQ_EMPTY(&intr_config_hook_list)) {
if (msleep(&intr_config_hook_list, &intr_config_hook_lock,
0, "conifhk", WARNING_INTERVAL_SECS * hz) ==
EWOULDBLOCK) {
@@ -187,7 +187,7 @@
TSHOLD("config hooks");
mtx_lock(&intr_config_hook_lock);
- TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links)
+ STAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links)
if (hook_entry == hook)
break;
if (hook_entry != NULL) {
@@ -196,7 +196,7 @@
"already established hook.\n");
return (1);
}
- TAILQ_INSERT_TAIL(&intr_config_hook_list, hook, ich_links);
+ STAILQ_INSERT_TAIL(&intr_config_hook_list, hook, ich_links);
if (next_to_notify == NULL)
next_to_notify = hook;
mtx_unlock(&intr_config_hook_lock);
@@ -232,7 +232,7 @@
struct intr_config_hook *hook_entry;
mtx_lock(&intr_config_hook_lock);
- TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links)
+ STAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links)
if (hook_entry == hook)
break;
if (hook_entry == NULL)
@@ -240,8 +240,8 @@
"unestablished hook");
if (next_to_notify == hook)
- next_to_notify = TAILQ_NEXT(hook, ich_links);
- TAILQ_REMOVE(&intr_config_hook_list, hook, ich_links);
+ next_to_notify = STAILQ_NEXT(hook, ich_links);
+ STAILQ_REMOVE(&intr_config_hook_list, hook, intr_config_hook, ich_links);
TSRELEASE("config hooks");
/* Wakeup anyone watching the list */
@@ -258,7 +258,7 @@
char namebuf[64];
long offset;
- TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links) {
+ STAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links) {
if (linker_ddb_search_symbol_name(
(caddr_t)hook_entry->ich_func, namebuf, sizeof(namebuf),
&offset) == 0) {
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h
--- a/sys/sys/kernel.h
+++ b/sys/sys/kernel.h
@@ -466,7 +466,8 @@
typedef void (*ich_func_t)(void *_arg);
struct intr_config_hook {
- TAILQ_ENTRY(intr_config_hook) ich_links;
+ STAILQ_ENTRY(intr_config_hook) ich_links;
+ uintptr_t ich_padding;
ich_func_t ich_func;
void *ich_arg;
};

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 27, 11:51 PM (9 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16224178
Default Alt Text
D29004.diff (3 KB)

Event Timeline