Changeset 0389b30 in rtems-libbsd
- Timestamp:
- 01/15/19 14:35:11 (5 years ago)
- Branches:
- 5, master
- Children:
- 9e7f3b7
- Parents:
- 5aa6ee5
- git-author:
- Sebastian Huber <sebastian.huber@…> (01/15/19 14:35:11)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (01/22/19 12:14:33)
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
freebsd/sys/dev/e1000/e1000_osdep.h
r5aa6ee5 r0389b30 254 254 255 255 256 #if defined(INVARIANTS) 256 #if defined(INVARIANTS) && !defined(__rtems__) 257 257 #include <sys/proc.h> 258 258 -
freebsd/sys/sys/sx.h
r5aa6ee5 r0389b30 236 236 #endif /* LOCK_DEBUG > 0 || SX_NOINLINE */ 237 237 #if (LOCK_DEBUG > 0) 238 #ifndef __rtems__ 238 239 #define sx_slock_(sx, file, line) \ 239 240 (void)_sx_slock((sx), 0, (file), (line)) 241 #else /* __rtems__ */ 242 #define sx_slock_(sx, file, line) \ 243 (void)_sx_xlock((sx), 0, (file), (line)) 244 #endif /* __rtems__ */ 240 245 #define sx_slock_sig_(sx, file, line) \ 241 246 _sx_slock((sx), SX_INTERRUPTIBLE, (file) , (line)) -
freebsd/sys/vm/uma_core.c
r5aa6ee5 r0389b30 339 339 "Memory allocation debugging"); 340 340 341 #ifndef __rtems__ 341 342 static u_int dbg_divisor = 1; 342 343 SYSCTL_UINT(_vm_debug, OID_AUTO, divisor, … … 350 351 SYSCTL_COUNTER_U64(_vm_debug, OID_AUTO, skipped, CTLFLAG_RD, 351 352 &uma_skip_cnt, "memory items skipped, not debugged"); 353 #else /* __rtems__ */ 354 #define dbg_divisor 1 355 #endif /* __rtems__ */ 352 356 #endif 353 357 … … 2246 2250 2247 2251 #ifdef INVARIANTS 2252 #ifndef __rtems__ 2248 2253 TUNABLE_INT_FETCH("vm.debug.divisor", &dbg_divisor); 2249 2254 uma_dbg_cnt = counter_u64_alloc(M_WAITOK); 2250 2255 uma_skip_cnt = counter_u64_alloc(M_WAITOK); 2256 #endif /* __rtems__ */ 2251 2257 #endif 2252 2258 callout_init(&uma_callout, 1); … … 2793 2799 "uma_zalloc_domain: zone \"%s\"", zone->uz_name); 2794 2800 } 2801 #ifndef __rtems__ 2795 2802 KASSERT(curthread->td_critnest == 0 || SCHEDULER_STOPPED(), 2796 2803 ("uma_zalloc_domain: called with spinlock or critical section held")); 2804 #endif /* __rtems__ */ 2797 2805 2798 2806 return (zone_alloc_item(zone, udata, domain, flags)); … … 3475 3483 zone->uz_name); 3476 3484 3485 #ifndef __rtems__ 3477 3486 KASSERT(curthread->td_critnest == 0 || SCHEDULER_STOPPED(), 3478 3487 ("uma_zfree_domain: called with spinlock or critical section held")); 3488 #endif /* __rtems__ */ 3479 3489 3480 3490 /* uma_zfree(..., NULL) does nothing, to match free(9). */ … … 4358 4368 return (false); 4359 4369 4370 #ifndef __rtems__ 4360 4371 idx = (uintptr_t)mem >> PAGE_SHIFT; 4361 4372 if (keg->uk_ipers > 1) { … … 4369 4380 } 4370 4381 counter_u64_add(uma_dbg_cnt, 1); 4382 #endif /* __rtems__ */ 4371 4383 4372 4384 return (false); -
rtemsbsd/include/sys/epoch.h
r5aa6ee5 r0389b30 110 110 void (*callback) (epoch_context_t)); 111 111 112 int in_epoch(epoch_t epoch); 113 int in_epoch_verbose(epoch_t epoch, int dump_onfail); 112 int _bsd_in_epoch(epoch_t epoch); 113 #define in_epoch(epoch) _bsd_in_epoch(epoch) 114 #define in_epoch_verbose(epoch, dump_onfail) _bsd_in_epoch(epoch) 114 115 115 116 #define EPOCH_GET_RECORD(cpu_self, epoch) PER_CPU_DATA_GET_BY_OFFSET( \ -
rtemsbsd/rtems/rtems-kernel-epoch.c
r5aa6ee5 r0389b30 34 34 #include <sys/kernel.h> 35 35 #include <sys/epoch.h> 36 #ifdef INVARIANTS 37 #include <sys/systm.h> 38 #endif 36 39 37 40 #include <machine/cpu.h> … … 323 326 _Thread_Dispatch_enable(cpu_self); 324 327 } 328 329 #ifdef INVARIANTS 330 int 331 _bsd_in_epoch(epoch_t epoch) 332 { 333 Per_CPU_Control *cpu_self; 334 Thread_Control *executing; 335 struct epoch_record *er; 336 struct epoch_pcpu *epcpu; 337 struct epoch_tracker *tdwait; 338 int in; 339 340 in = 0; 341 cpu_self = _Thread_Dispatch_disable(); 342 executing = _Per_CPU_Get_executing(cpu_self); 343 epcpu = PER_CPU_DATA_GET(cpu_self, struct epoch_pcpu, epoch); 344 er = EPOCH_GET_RECORD(cpu_self, epoch); 345 346 TAILQ_FOREACH(tdwait, &er->er_tdlist, et_link) { 347 if (tdwait->et_td == executing) { 348 in = 1; 349 break; 350 } 351 } 352 353 _Thread_Dispatch_enable(cpu_self); 354 return (in); 355 } 356 #endif
Note: See TracChangeset
for help on using the changeset viewer.