Changeset cf447b9 in rtems-libbsd
- Timestamp:
- 09/14/18 11:46:50 (6 years ago)
- Branches:
- 5, 5-freebsd-12, 6-freebsd-12, master
- Children:
- a85d900
- Parents:
- 08fbf18
- git-author:
- Sebastian Huber <sebastian.huber@…> (09/14/18 11:46:50)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (09/17/18 07:10:52)
- Location:
- freebsd/sys
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
freebsd/sys/kern/kern_timeout.c
r08fbf18 rcf447b9 224 224 #define CC_LOCK_ASSERT(cc) mtx_assert(&(cc)->cc_lock, MA_OWNED) 225 225 226 #ifndef __rtems__ 226 227 static int timeout_cpu; 228 #else /* __rtems__ */ 229 #define timeout_cpu 0 230 #endif /* __rtems__ */ 227 231 228 232 static void callout_cpu_init(struct callout_cpu *cc, int cpu); … … 373 377 * be removed. 374 378 */ 379 #ifndef __rtems__ 375 380 timeout_cpu = PCPU_GET(cpuid); 381 #endif /* __rtems__ */ 376 382 cc = CC_CPU(timeout_cpu); 377 383 cc->cc_callout = malloc(ncallout * sizeof(struct callout), … … 654 660 { 655 661 struct callout_cpu *cc; 662 #ifndef __rtems__ 656 663 int cpu; 657 664 … … 665 672 } 666 673 #endif 674 #endif /* __rtems__ */ 667 675 cc = CC_CPU(cpu); 668 676 CC_LOCK(cc); 677 #ifndef __rtems__ 669 678 if (cpu == c->c_cpu) 670 679 break; 671 680 CC_UNLOCK(cc); 672 681 } 682 #endif /* __rtems__ */ 673 683 return (cc); 674 684 } … … 1130 1140 #ifndef __rtems__ 1131 1141 int cancelled, direct; 1142 int ignore_cpu=0; 1132 1143 #else /* __rtems__ */ 1133 1144 int cancelled; 1134 1145 #endif /* __rtems__ */ 1135 int ignore_cpu=0;1136 1146 1137 1147 cancelled = 0; 1148 #ifndef __rtems__ 1138 1149 if (cpu == -1) { 1139 1150 ignore_cpu = 1; … … 1143 1154 panic("Invalid CPU in callout %d", cpu); 1144 1155 } 1156 #endif /* __rtems__ */ 1145 1157 callout_when(sbt, prec, flags, &to_sbt, &precision); 1146 1158 … … 1160 1172 #endif /* __rtems__ */ 1161 1173 cc = callout_lock(c); 1174 #ifndef __rtems__ 1162 1175 /* 1163 1176 * Don't allow migration of pre-allocated callouts lest they … … 1169 1182 cpu = c->c_cpu; 1170 1183 } 1184 #endif /* __rtems__ */ 1171 1185 1172 1186 if (cc_exec_curr(cc, direct) == c) { … … 1289 1303 callout_schedule(struct callout *c, int to_ticks) 1290 1304 { 1305 #ifndef __rtems__ 1291 1306 return callout_reset_on(c, to_ticks, c->c_func, c->c_arg, c->c_cpu); 1307 #else /* __rtems__ */ 1308 return callout_reset_on(c, to_ticks, c->c_func, c->c_arg, 0); 1309 #endif /* __rtems__ */ 1292 1310 } 1293 1311 … … 1595 1613 c->c_iflags = 0; 1596 1614 } 1615 #ifndef __rtems__ 1597 1616 c->c_cpu = timeout_cpu; 1617 #endif /* __rtems__ */ 1598 1618 } 1599 1619 … … 1611 1631 __func__)); 1612 1632 c->c_iflags = flags & (CALLOUT_RETURNUNLOCKED | CALLOUT_SHAREDLOCK); 1633 #ifndef __rtems__ 1613 1634 c->c_cpu = timeout_cpu; 1635 #endif /* __rtems__ */ 1614 1636 } 1615 1637 -
freebsd/sys/sys/_callout.h
r08fbf18 rcf447b9 60 60 short c_flags; /* User State */ 61 61 short c_iflags; /* Internal State */ 62 #ifndef __rtems__ 62 63 volatile int c_cpu; /* CPU we're scheduled on */ 64 #endif /* __rtems__ */ 63 65 }; 64 66
Note: See TracChangeset
for help on using the changeset viewer.