Changeset dedc3e1d in rtems
- Timestamp:
- 11/23/20 15:34:26 (3 years ago)
- Branches:
- 5
- Children:
- 21ed8d11
- Parents:
- 1dbdf94e
- git-author:
- Sebastian Huber <sebastian.huber@…> (11/23/20 15:34:26)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (11/25/20 07:32:24)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bsps/shared/irq/irq-server.c
r1dbdf94e rdedc3e1d 507 507 #endif 508 508 509 rtems_interrupt_lock_initialize(&s->lock, "Interrupt Server");510 rtems_chain_initialize_empty(&s->entries);511 512 509 sc = rtems_task_create( 513 510 rtems_build_name('I', 'R', 'Q', 'S'), … … 519 516 ); 520 517 if (sc != RTEMS_SUCCESSFUL) { 521 return sc; 522 } 518 (*s->destroy)(s); 519 return sc; 520 } 521 522 rtems_interrupt_lock_initialize(&s->lock, "Interrupt Server"); 523 rtems_chain_initialize_empty(&s->entries); 523 524 524 525 #if defined(RTEMS_SMP) 525 526 sc = rtems_scheduler_ident_by_processor(cpu_index, &scheduler); 526 if (sc != RTEMS_SUCCESSFUL) { 527 /* Do not start an interrupt server on a processor without a scheduler */ 528 return RTEMS_SUCCESSFUL; 529 } 530 531 sc = rtems_task_set_scheduler(s->server, scheduler, priority); 532 _Assert(sc == RTEMS_SUCCESSFUL); 533 534 /* Set the task to processor affinity on a best-effort basis */ 535 CPU_ZERO(&cpu); 536 CPU_SET(cpu_index, &cpu); 537 (void) rtems_task_set_affinity(s->server, sizeof(cpu), &cpu); 527 528 /* 529 * If a scheduler exists for the processor, then move it to this scheduler 530 * and try to set the affinity to the processor, otherwise keep the scheduler 531 * of the executing thread. 532 */ 533 if (sc == RTEMS_SUCCESSFUL) { 534 sc = rtems_task_set_scheduler(s->server, scheduler, priority); 535 _Assert(sc == RTEMS_SUCCESSFUL); 536 537 /* Set the task to processor affinity on a best-effort basis */ 538 CPU_ZERO(&cpu); 539 CPU_SET(cpu_index, &cpu); 540 (void) rtems_task_set_affinity(s->server, sizeof(cpu), &cpu); 541 } 538 542 #else 539 543 (void) cpu_index;
Note: See TracChangeset
for help on using the changeset viewer.