Changeset 34cb55d in rtems-libbsd
- Timestamp:
- 01/15/19 14:35:11 (5 years ago)
- Branches:
- 5-freebsd-12, 6-freebsd-12
- Children:
- 6e94aeb
- Parents:
- 1354d9b
- git-author:
- Sebastian Huber <sebastian.huber@…> (01/15/19 14:35:11)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (01/22/19 12:24:26)
- Location:
- rtemsbsd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
rtemsbsd/include/sys/epoch.h
r1354d9b r34cb55d 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
r1354d9b r34cb55d 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.