Changeset aedff4f in rtems-libbsd
- Timestamp:
- 07/25/19 08:20:19 (4 years ago)
- Branches:
- 5-freebsd-12, 6-freebsd-12
- Children:
- 017b09f
- Parents:
- bd6b20c
- git-author:
- Sebastian Huber <sebastian.huber@…> (07/25/19 08:20:19)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (09/23/19 08:26:34)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
freebsd/sys/kern/subr_autoconf.c
rbd6b20c raedff4f 64 64 static struct mtx intr_config_hook_lock; 65 65 MTX_SYSINIT(intr_config_hook, &intr_config_hook_lock, "intr config", MTX_DEF); 66 #ifdef __rtems__ 67 static bool intr_boot_done; 68 #endif /* __rtems__ */ 66 69 67 70 /* ARGSUSED */ … … 175 178 } 176 179 } 180 #ifdef __rtems__ 181 intr_boot_done = true; 182 #endif /* __rtems__ */ 177 183 mtx_unlock(&intr_config_hook_lock); 178 184 TSUNWAIT("config hooks"); … … 191 197 { 192 198 struct intr_config_hook *hook_entry; 199 #ifdef __rtems__ 200 bool run; 201 #endif /* __rtems__ */ 193 202 194 203 TSHOLD("config hooks"); … … 206 215 if (next_to_notify == NULL) 207 216 next_to_notify = hook; 217 #ifdef __rtems__ 218 run = intr_boot_done; 219 #endif /* __rtems__ */ 208 220 mtx_unlock(&intr_config_hook_lock); 209 221 #ifndef __rtems__ 210 222 if (cold == 0) 223 #else /* __rtems__ */ 224 if (run) 225 #endif /* __rtems__ */ 211 226 /* 212 227 * XXX Call from a task since not all drivers expect … … 215 230 /* XXX Sufficient for modules loaded after initial config??? */ 216 231 run_interrupt_driven_config_hooks(); 217 #endif /* __rtems__ */218 232 return (0); 219 233 } -
testsuite/swi01/swi_test.c
rbd6b20c raedff4f 1 1 /* 2 * Copyright (c) 2012 embedded brains GmbH. All rights reserved.2 * Copyright (c) 2012, 2019 embedded brains GmbH. All rights reserved. 3 3 * 4 4 * embedded brains GmbH 5 * Obere Lagerstr. 305 * Dornierstr. 4 6 6 * 82178 Puchheim 7 7 * Germany … … 38 38 39 39 #include <sys/types.h> 40 #include <sys/systm.h>41 42 40 #include <sys/param.h> 43 41 #include <sys/bus.h> 44 42 #include <sys/interrupt.h> 43 #include <sys/kernel.h> 44 #include <sys/systm.h> 45 45 46 46 #define SWI_TEST_THREAD_PRIO (0) … … 193 193 194 194 assert(argument == HANDLER_NOT_VISITED); 195 } 196 197 static void 198 ich_func(void *arg) 199 { 200 int *invocations; 201 202 invocations = arg; 203 ++(*invocations); 204 } 205 206 static void 207 test_config_intrhook_establish(void) 208 { 209 int invocations; 210 struct intr_config_hook hook = { 211 .ich_func = ich_func, 212 .ich_arg = &invocations 213 }; 214 215 printf("== Test config_intrhook_establish().\n"); 216 217 invocations = 0; 218 config_intrhook_establish(&hook); 219 assert(invocations == 1); 195 220 } 196 221 … … 205 230 swi_test_error_handler_null(); 206 231 swi_test_error_has_allready_exclusive(); 207 } 208 232 test_config_intrhook_establish(); 233 } 234
Note: See TracChangeset
for help on using the changeset viewer.