Changeset 33ed412 in rtems


Ignore:
Timestamp:
Sep 20, 2019, 7:16:17 AM (5 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
8798372
Parents:
a4e96cf
git-author:
Sebastian Huber <sebastian.huber@…> (09/20/19 07:16:17)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/20/19 07:22:46)
Message:

rtems: Add rtems_interrupt_server_entry_move()

The use case for this function is the libbsd. In FreeBSD, the interrupt
setup and binding to a processor is done in two steps. Message
based interrupts like PCIe MSI and MSI-X interrupts can be implemented
through interrupt server entries. They are setup at the default
interrupt server and may optionally move to an interrupt server bound to
a specific processor.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bsps/shared/irq/irq-server.c

    ra4e96cf r33ed412  
    639639}
    640640
     641rtems_status_code rtems_interrupt_server_entry_move(
     642  rtems_interrupt_server_entry *entry,
     643  uint32_t                      destination_server_index
     644)
     645{
     646  rtems_status_code sc;
     647  bsp_interrupt_server_context *s;
     648
     649  s = bsp_interrupt_server_get_context(destination_server_index, &sc);
     650  if (s == NULL) {
     651    return sc;
     652  }
     653
     654  entry->server = s;
     655  return RTEMS_SUCCESSFUL;
     656}
     657
    641658static void bsp_interrupt_server_entry_synchronize_helper(void *arg)
    642659{
  • cpukit/include/rtems/irq-extension.h

    ra4e96cf r33ed412  
    1010 * Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
    1111 *
    12  * Copyright (c) 2008, 2017 embedded brains GmbH.
     12 * Copyright (C) 2008, 2019 embedded brains GmbH
    1313 *
    1414 *  embedded brains GmbH
     
    562562
    563563/**
     564 * @brief Moves the interrupt server entry to the specified destination
     565 * interrupt server.
     566 *
     567 * Calling this function concurrently with rtems_interrupt_server_entry_submit()
     568 * with the same entry or while the entry is enqueued on the previous interrupt
     569 * server is undefined behaviour.
     570 *
     571 * @param[in,out] entry The interrupt server entry.  It must have be initialized
     572 *   before the call to this function.
     573 * @param destination_server_index The destination interrupt server index.
     574 *   Use @c RTEMS_INTERRUPT_SERVER_DEFAULT to specify the default server.
     575 *
     576 * @retval RTEMS_SUCCESSFUL Successful operation
     577 * @retval RTEMS_INCORRECT_STATE The interrupt servers are not initialized.
     578 * @retval RTEMS_INVALID_ID The destination interrupt server index is invalid.
     579 */
     580rtems_status_code rtems_interrupt_server_entry_move(
     581  rtems_interrupt_server_entry *entry,
     582  uint32_t                      destination_server_index
     583);
     584
     585/**
    564586 * @brief Destroys the specified interrupt server entry.
    565587 *
Note: See TracChangeset for help on using the changeset viewer.